1 | Receiver variable | Output | Char(*) |
2 | Length of receiver variable | Input | Binary(4) |
3 | Format name | Input | Char(8) |
4 | Qualified program name | Input | Char(20) |
5 | Error Code | I/O | Char(*) |
The Retrieve Program Information (QCLRPGMI) API lets you retrieve program information and place it into a single variable in the calling program. The amount of information returned is limited to the size of the variable. This information is the same as the information returned using the Display Program (DSPPGM) command.
You can use the QCLRPGMI API to retrieve the following:
The variable that is to receive the information requested. The minimum size for this area is 8 bytes. You can specify the size of this area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.
The length of the receiver variable. If this value is larger than the actual size of the receiver variable, the results may not be predictable. The minimum value is 8.
The content and format of the information returned for the program.
The possible format names are:
PGMI0100 | Basic program information for OPM and ILE programs. |
PGMI0200 | Basic program information for OPM and ILE programs plus SQL statement information for OPM programs. |
PGMI0300 | ILE program size information. |
The first 10 characters contain the program name. The second 10 characters contain the name of the library where the program is located.
You can use these special values for the library name:
*CURLIB | The job's current library |
*LIBL | The library list |
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
The following information is returned for the PGMI0100 format. Some of the fields returned are blank or zero if they do not apply to the type of program specified. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Bytes returned |
4 | 4 | BINARY(4) | Bytes available |
Program creation information | |||
8 | 8 | CHAR(10) | Program name |
18 | 12 | CHAR(10) | Program library name |
28 | 1C | CHAR(10) | Program owner |
38 | 26 | CHAR(10) | Program attribute |
48 | 30 | CHAR(13) | Creation date and time |
61 | 3D | CHAR(10) | Source file name |
71 | 47 | CHAR(10) | Source file library name |
81 | 51 | CHAR(10) | Source file member name |
91 | 5B | CHAR(13) | Source file updated date and time |
104 | 68 | CHAR(1) | Observable information |
105 | 69 | CHAR(1) | User profile option |
106 | 6A | CHAR(1) | Use adopted authority |
107 | 6B | CHAR(1) | Log commands |
108 | 6C | CHAR(1) | Allow RTVCLSRC |
109 | 6D | CHAR(1) | Fix decimal data |
110 | 6E | CHAR(50) | Text description |
160 | A0 | CHAR(1) | Type of program |
161 | A1 | CHAR(1) | Teraspace storage-enabled program |
162 | A2 | CHAR(58) | Reserved |
Program statistics information | |||
220 | DC | BINARY(4) | Minimum number of parameters |
224 | E0 | BINARY(4) | Maximum number of parameters |
228 | E4 | BINARY(4) | Program size |
232 | E8 | BINARY(4) | Associated space size |
236 | EC | BINARY(4) | Static storage size |
240 | F0 | BINARY(4) | Automatic storage size |
244 | F4 | BINARY(4) | Number of MI instructions |
248 | F8 | BINARY(4) | Number of MI ODT entries |
252 | FC | CHAR(1) | Program state |
253 | FD | CHAR(14) | Compiler identification |
267 | 10B | CHAR(6) | Earliest release program can run |
273 | 111 | CHAR(10) | Sort sequence table name |
283 | 11B | CHAR(10) | Sort sequence table library name |
293 | 125 | CHAR(10) | Language identifier |
303 | 12F | CHAR(1) | Program domain |
304 | 130 | CHAR(1) | Conversion required |
305 | 131 | CHAR(20) | Reserved |
Program performance information | |||
325 | 145 | CHAR(1) | Optimization |
326 | 146 | CHAR(1) | Paging pool |
327 | 147 | CHAR(1) | Update program automatic storage area (PASA) |
328 | 148 | CHAR(1) | Clear program automatic storage area (PASA) |
329 | 149 | CHAR(1) | Paging amount |
330 | 14A | CHAR(18) | Reserved |
ILE information | |||
348 | 15C | CHAR(10) | Program entry procedure module |
358 | 166 | CHAR(10) | Program entry procedure module library |
368 | 170 | CHAR(30) | Activation group attribute |
398 | 18E | CHAR(1) | Observable information compressed |
399 | 18F | CHAR(1) | Run-time information compressed |
400 | 190 | CHAR(6) | Release program created on |
406 | 196 | CHAR(1) | Shared activation group |
407 | 197 | CHAR(1) | Allow update |
408 | 198 | BINARY(4) | Program CCSID |
412 | 19C | BINARY(4) | Number of modules |
416 | 1A0 | BINARY(4) | Number of service programs |
420 | 1A4 | BINARY(4) | Number of copyrights |
424 | 1A8 | BINARY(4) | Number of unresolved references |
428 | 1AC | CHAR(6) | Release program created for |
434 | 1B2 | CHAR(1) | Allow static storage reinitialization |
435 | 1B3 | CHAR(1) | All creation data |
436 | 1B4 | CHAR(1) | Allow bound *SRVPGM library name update |
437 | 1B5 | CHAR(10) | Profiling data |
447 | 1BF | CHAR(1) | Teraspace storage enabled modules |
448 | 1C0 | CHAR(1) | Storage model |
449 | 1C1 | CHAR(87) | Reserved |
The following information is returned for the PGMI0200 format. Some of the fields returned are blank or zero if they do not apply to the type of program specified. For detailed descriptions of the fields in the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Bytes returned |
4 | 4 | BINARY(4) | Bytes available |
Program creation information | |||
8 | 8 | CHAR(10) | Program name |
18 | 12 | CHAR(10) | Program library name |
28 | 1C | CHAR(10) | Program owner |
38 | 26 | CHAR(10) | Program attribute |
48 | 30 | CHAR(13) | Creation date and time |
61 | 3D | CHAR(10) | Source file name |
71 | 47 | CHAR(10) | Source file library name |
81 | 51 | CHAR(10) | Source file member name |
91 | 5B | CHAR(13) | Source file updated date and time |
104 | 68 | CHAR(1) | Observable information |
105 | 69 | CHAR(1) | User profile option |
106 | 6A | CHAR(1) | Use adopted authority |
107 | 6B | CHAR(1) | Log commands |
108 | 6C | CHAR(1) | Allow RTVCLSRC |
109 | 6D | CHAR(1) | Fix decimal data |
110 | 6E | CHAR(50) | Text description |
160 | A0 | CHAR(1) | Type of program |
161 | A1 | CHAR(1) | Teraspace storage-enabled program |
162 | A2 | CHAR(58) | Reserved |
Program statistics information | |||
220 | DC | BINARY(4) | Minimum number of parameters |
224 | E0 | BINARY(4) | Maximum number of parameters |
228 | E4 | BINARY(4) | Program size |
232 | E8 | BINARY(4) | Associated space size |
236 | EC | BINARY(4) | Static storage size |
240 | F0 | BINARY(4) | Automatic storage size |
244 | F4 | BINARY(4) | Number of MI instructions |
248 | F8 | BINARY(4) | Number of MI ODT entries |
252 | FC | CHAR(1) | Program state |
253 | FD | CHAR(14) | Compiler identification |
267 | 10B | CHAR(6) | Earliest release program can run |
273 | 111 | CHAR(10) | Sort sequence table name |
283 | 11B | CHAR(10) | Sort sequence table library name |
293 | 125 | CHAR(10) | Language identifier |
303 | 12F | CHAR(1) | Program domain |
304 | 130 | CHAR(1) | Conversion required |
305 | 131 | CHAR(20) | Reserved |
Program performance information | |||
325 | 145 | CHAR(1) | Optimization |
326 | 146 | CHAR(1) | Paging pool |
327 | 147 | CHAR(1) | Update program automatic storage area (PASA) |
328 | 148 | CHAR(1) | Clear program automatic storage area (PASA) |
329 | 149 | CHAR(1) | Paging amount |
330 | 14A | CHAR(18) | Reserved |
Program SQL information | |||
348 | 15C | BINARY(4) | Number of SQL statements |
352 | 160 | CHAR(18) | Relational database |
370 | 172 | CHAR(10) | Commitment control |
380 | 17C | CHAR(10) | Allow copy of data |
390 | 186 | CHAR(10) | Close SQL cursor |
400 | 190 | CHAR(10) | Naming convention |
410 | 19A | CHAR(10) | Date format |
420 | 1A4 | CHAR(1) | Date separator |
421 | 1A5 | CHAR(10) | Time format |
431 | 1AF | CHAR(1) | Time separator |
432 | 1B0 | CHAR(10) | Delay PREPARE |
442 | 1BA | CHAR(10) | Allow blocking |
ILE information | |||
452 | 1C4 | CHAR(10) | Program entry procedure module |
462 | 1CE | CHAR(10) | Program entry procedure module library |
472 | 1D8 | CHAR(30) | Activation group attribute |
502 | 1F6 | CHAR(1) | Observable information compressed |
503 | 1F7 | CHAR(1) | Run-time information compressed |
504 | 1F8 | CHAR(6) | Release program created on |
510 | 1FE | CHAR(1) | Shared activation group |
511 | 1FF | CHAR(1) | Allow update |
512 | 200 | BINARY(4) | Program CCSID |
516 | 204 | BINARY(4) | Number of modules |
520 | 208 | BINARY(4) | Number of service programs |
524 | 20C | BINARY(4) | Number of copyrights |
528 | 210 | BINARY(4) | Number of unresolved references |
532 | 214 | CHAR(6) | Release program created for |
538 | 21A | CHAR(1) | Allow static storage reinitialization |
Continuation of program SQL information | |||
539 | 21B | CHAR(10) | Default collection name |
549 | 225 | CHAR(10) | SQL package name |
559 | 22F | CHAR(10) | SQL package library name |
569 | 239 | CHAR(10) | Dynamic user profile |
579 | 243 | CHAR(10) | SQL sort sequence table name |
589 | 24D | CHAR(10) | SQL sort sequence table library name |
599 | 257 | CHAR(10) | SQL language identifier |
609 | 261 | CHAR(10) | Connection method |
619 | 26B | CHAR(1) | Reserved |
620 | 26C | BINARY(4) | SQL path offset |
624 | 270 | BINARY(4) | SQL path length |
628 | 274 | CHAR(91) | Reserved |
Continuation of ILE information | |||
719 | 2CF | CHAR(1) | All creation data |
720 | 2D0 | CHAR(1) | Allow bound *SRVPGM library name update |
721 | 2D1 | CHAR(10) | Profiling data |
731 | 2DB | CHAR(1) | Teraspace storage-enabled modules |
732 | 2DC | CHAR(1) | Storage model |
733 | 2DD | CHAR(87) | Reserved |
Program information through offsets | |||
CHAR(*) | SQL path |
The following information is returned for the PGMI0300 format. This format
is valid only for ILE programs. If an OPM program is specified, no data is
returned and an error is returned. For detailed descriptions of the fields in
the table, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Bytes returned |
4 | 4 | BINARY(4) | Bytes available |
ILE program size information | |||
8 | 8 | CHAR(10) | Program name |
18 | 12 | CHAR(10) | Program library name |
28 | 1C | BINARY(4) | Current total program size |
32 | 20 | BINARY(4) | Maximum program size |
36 | 24 | BINARY(4) | Current number of modules |
40 | 28 | BINARY(4) | Maximum number of modules |
44 | 2C | BINARY(4) | Current number of service programs |
48 | 30 | BINARY(4) | Maximum number of service programs |
52 | 34 | BINARY(4) | Current string directory size |
56 | 38 | BINARY(4) | Maximum string directory size |
60 | 3C | BINARY(4) | Current copyright string size |
64 | 40 | BINARY(4) | Maximum copyright string size |
68 | 44 | BINARY(4) | Current number of auxiliary storage segments |
72 | 48 | BINARY(4) | Maximum number of auxiliary storage segments |
76 | 4C | BINARY(4) | Minimum static storage size |
80 | 50 | BINARY(4) | Maximum static storage size |
84 | 54 | CHAR(4) | Reserved |
88 | 58 | BINARY(8) | Minimum static storage size - long |
96 | 60 | BINARY(8) | Maximum static storage size - long |
For more detailed information than that provided in the following field descriptions, refer to documentation for the command that was used to create the program. For information on non-SQL fields, this would normally be one of the following:
For information on SQL fields, (this would normally be a command of the form CRTSQLxxx) see DB2 Universal Database for iSeries SQL Programming Concepts. The xxx in the command name identifies the base language (RPG, COBOL, and so on) of the program.
Activation group attribute. The activation group attribute of this ILE program.
Possible values are:
*NEW | A new activation group with the same name as the program name is created when this program is called. The program runs in this activation group. |
*DFTACTGRP | The program uses one of two existing activation groups created when the process is started. One default activation group is reserved for system-state programs. The other default activation group is reserved for user-state programs. |
*CALLER | The program runs in the activation group of the program from which it is called. |
activation group name | The name of the activation group in which this program runs. If the activation group already exists when the program is called, the program runs in the existing activation group. If the activation group does not exist when the program is called, a new activation group is created and the program runs in it. |
Blank | This program is an OPM program. |
All creation data. Whether the ILE program has all creation data and if that data is observable or unobservable. All observable creation data is needed to re-create the program using the Change Program (CHGPGM) command. All creation data (either observable or unobservable) is needed to convert the program during restore.
Possible values are:
0 | *NO. Not all of the creation data is present. The creation template of the ILE program object could be missing or at least one of the modules in this program does not have creation data. |
1 | *YES. The ILE program has all creation data and all of that data is observable. |
2 | *UNOBS. The ILE program has all creation data but not all of that data is observable. |
Allow blocking. Whether blocking is used to improve the performance of certain SQL statements.
Possible values are:
*NONE | Blocking is not used. |
*READ | Blocking is used for read-only data cursors when running COMMIT(*NONE) and there are no EXECUTE or EXECUTE IMMEDIATE statements. |
*ALLREAD | Blocking is used for all read-only cursors when running COMMIT(*NONE) or COMMIT(*CHG). |
Blank | The program does not contain SQL statements or it is an ILE program. |
Allow copy of data. Whether a copy of the data can be used in the implementation of an SQL query.
Possible values are:
*NO | A copy of the data cannot be used. |
*YES | A copy of the data can be used when needed. |
*OPTIMIZE | The system determines whether a copy of the data is used for optimal performance. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Allow RTVCLSRC. The compiler allowed you to control this attribute through the ALWRTVSRC parameter if this program was created using the Create CL Program (CRTCLPGM) command.
Possible values are:
N | Source for the CL program is not saved with the program (*NO). |
Y | Source is saved (*YES). |
Source that is saved can be retrieved by using the Retrieve CL Source (RTVCLSRC) command. This information is blank if the program is not a CL program.
Allow static storage reinitialization. Whether program static storage can be reinitialized. The values are valid for ILE programs only.
Possible values are:
Y | Program static storage can be reinitialized. |
N | Program static storage cannot be reinitialized. |
Allow bound *SRVPGM library name update. Whether the Update Program (UPDPGM) command is allowed to change the bound *SRVPGM library names on this program. The values are valid for ILE programs only.
Possible values are:
Y | The UPDPGM command can specify a library name for the SRVPGMLIB parameter. |
N | The UPDPGM command cannot specify a library name for the SRVPGMLIB parameter. |
Allow update. Whether the Update Program (UPDPGM) command is allowed on this program. The values are valid for ILE programs only.
Possible values are:
Y | The UPDPGM command can be run on this program. |
N | The UPDPGM command cannot be run on this program. |
Associated space size. The size (in bytes) of the associated space used by this program.
Automatic storage size. The size (in bytes) of the automatic storage used by this program. This information is blank if the program is an ILE program.
Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.
Bytes returned. The number of bytes of data returned.
Clear program automatic storage area (PASA). The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program.
Possible values are:
N | Do not clear PASA storage (*NOCLRPASA). |
C | Clear PASA storage (*CLRPASA). |
Blank | The program is an ILE program. |
*NOCLRPASA reduces the time needed to call the program. However, if a program variable is referred to before it has been set, it may contain unpredictable data.
*CLRPASA increases the time needed to call the program. However, it ensures that if a program variable is referred to before it has been set, it will contain binary zeros instead of unpredictable data.
Close SQL cursor. Specifies when SQL cursors are implicitly closed and SQL-prepared statements are implicitly discarded.
Possible values are:
*ENDPGM | When the program that contains the SQL statements ends. This value is valid for OPM programs only. |
*ENDSQL | When the last program containing SQL statements ends. This value is valid for OPM programs only. |
*ENDJOB | When the job ends. This value is valid for OPM programs only. |
*ENDMOD | When the module ends. This value is valid for ILE programs only. |
*ENDACTGRP | When the activation group is deleted. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Commitment control. The level of commitment control that was specified on the SQL precompile.
Possible values are:
*NONE | No commitment control was specified on the SQL precompile. Uncommitted changes in other jobs can be seen. |
*CHG | Objects referred to in SQL COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements are locked until the end of the unit of work (transaction). Updated, deleted, and inserted rows (records) are locked until the end of the unit of work. Uncommitted changes in other jobs can be seen. |
*CS | Objects referred to in SQL COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements are locked until the end of the unit of work (transaction). Updated, deleted, and inserted rows (records) are locked until the end of the unit of work. A row (record) that is selected but not updated is locked until the next row (record) is selected. Uncommitted changes in other jobs cannot be seen. |
*ALL | Objects referred to in SQL COMMENT ON, CREATE, DROP, GRANT, LABEL ON, and REVOKE statements are locked until the end of the unit of work (transaction). All rows selected, updated, deleted, and inserted are locked until the end of the unit of work. Uncommitted changes in other jobs cannot be seen. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Compiler identification. The licensed program identifier, version, release, and modification level of the compiler. The field has a pppppppbVvRrMm format, where:
ppppppp | The licensed program identifier. |
b | A blank character. |
Vv | The character V is followed by a 1-character version number. |
Rr | The character R is followed by a 1-character release level. |
Mm | The character M is followed by a 1-character modification level. |
For programs created by the Create Program (QPRCRTPG) API, this field identifies the version of the operating system that the program was created under.
The field may be blank if the program is created without going through a compilation process or if it is an ILE program.
Connection method. The method used for establishing remote connections when running distributed programs.
Special values that can be returned are:
*RUW | Only one connection to a relational database is allowed. Consecutive CONNECT statements result in the previous connection being disconnected before a new connection is established. |
*DUW | Connections to several relational databases are allowed. Consecutive CONNECT statements to additional relational databases do not result in disconnection from previous connects. SET CONNECTION can be used to switch between connections. Read-only connections may result. |
Blank | The program does not contain SQL statements or is an ILE program. |
Conversion required. Indicates whether the program has been converted to reduced instruction-set computer (RISC) format or if conversion is still required.
Possible values are:
0 | Conversion is not required. The program has already been converted. |
1 | Conversion is required. |
Creation date and time. The date and time the program was created. The creation date and time field is in the CYYMMDDHHMMSS format as follows:
C | Century, where 0 indicates years 19xx and 1 indicates years 20xx. |
YY | Year |
MM | Month |
DD | Day |
HH | Hour |
MM | Minute |
SS | Second |
Current copyright string size. The ILE program's copyright string size.
Current number of auxiliary storage segments. The number of auxiliary storage segments in this ILE program.
Current number of modules. The number of modules bound into this ILE program.
Current number of service programs. The number of service programs bound to this ILE program.
Current string directory size. The ILE program's string directory size.
Current total program size. The total size of the ILE program, in kilobytes.
Date format. The format used when accessing date-result columns through SQL. All output date fields are returned in this format. For input date strings, the value you specify is used to determine whether the date is a valid format. This information is blank if the program does not contain SQL statements or if it is an ILE program.
Possible values are:
*USA | USA format (mm/dd/yyyy). |
*ISO | International Standards Organization format (yyyy-mm-dd). |
*EUR | European format (dd.mm.yyyy). |
*JIS | Japanese Industrial Standard Christian Era (yyyy-mm-dd). |
*MDY | Month/day/year format (mm/dd/yy). |
*DMY | Day/month/year format (dd/mm/yy). |
*YMD | Year/month/day format (yy/mm/dd). |
*JUL | Julian format (a numeric value from 1 to 365). |
blank | The program does not contain SQL statements, or it is an ILE program. |
Date separator. The separator used when accessing date-result columns. This information is blank if the program does not contain SQL statements or if it is an ILE program. However, the number of SQL statements field should be checked to determine if the program contains SQL statements. This is because a blank may be specified as a separator value.
Default collection name. The collection name used for the unqualified names of tables, views, indexes, and SQL packages.
Possible values are:
*NONE | There is no default collection name. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Delay PREPARE. Whether SQL prepare processing can be delayed until the statement is actually used.
Possible values are:
*YES | Prepare processing can be delayed. |
*NO | Prepare processing cannot be delayed. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Dynamic user profile. The user profile used for dynamic SQL statements.
The following special values can be returned:
*USER | Local dynamic SQL statements are run under the profile of the programs user. Distributed dynamic SQL statements are run under the profile of the SQL package's user. |
*OWNER | Local dynamic SQL statements are run under the profile of the programs owner. Distributed dynamic SQL statements are run under the profile of the SQL package's owner. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Earliest release program can run. The version, release, and modification level of the earliest release the program is allowed to run on. The compiler may have allowed you to control this through the TGTRLS parameter of the command used to create the program. The field has a VvRrMm format, where:
Vv | The character V is followed by a 1-character version number. |
Rr | The character R is followed by a 1-character release level. |
Mm | The character M is followed by a 1-character modification level. |
Fix decimal data. Whether decimal data that is not valid is corrected or an error is signaled. If the System/36 environment is loaded on your system, you can control this attribute through the fix decimal data (FIXDECDTA) parameter of the CRTS36CBL or CRTS36RPG command.
Possible values are:
N | An error is signaled to the program without correcting the data that is not valid (*NO). |
Y | Decimal data that is not valid is corrected (*YES). |
Blank | The program is an ILE program. |
Language identifier. Returns the 3-character language identifier used when the program was compiled. This information is blank if the module does not contain any language identification information.
The following special value can also be returned:
*JOBRUN | The language identifier associated with the job at the time the program is run. |
Log commands. The value specified for the LOG parameter of the CRTCLPGM command. This field is meaningful only if the program is a CL program. The possible values are N (*NO), Y (*YES), and J (*JOB). This information is blank if the program is not a CL program.
Maximum copyright string size. The maximum size of the copyright string in an ILE program.
Maximum number of auxiliary storage segments. The maximum number of auxiliary storage segments an ILE program can have.
Maximum number of modules. The maximum number of modules that can be bound into an ILE program.
Maximum number of parameters. The maximum number of parameters that may be received by the program when it is called. A value of -1 is returned if the information is not available.
Maximum number of service programs. The maximum number of service programs that can be bound to an ILE program.
Maximum program size. The maximum size that an ILE program can be, in kilobytes.
Maximum static storage size. The maximum static storage size (in bytes) that this program may need in order to run. A value of 4294967295 will be given if 4 gigabytes (4294967296) or greater is needed. In this case, the maximum static storage size - long field should be used instead.
Maximum static storage size - long. The maximum static storage size in bytes that this program may need in order to run.
Maximum string directory size. The maximum size that the string directory can be in an ILE program.
Minimum number of parameters. The minimum number of parameters that is to be received by the program when it is called. A value of -1 is returned if the information is not available.
Minimum static storage size. The minimum static storage size in bytes that this program needs in order to run. A value of 4294967295 will be given if 4 gigabytes (4294967296) or greater is needed. In this case, the minimum static storage size - long field should be used instead.
Minimum static storage size - long. The minimum static storage size in bytes that this program needs in order to run.
Naming convention. The convention used for naming objects in SQL statements.
Possible values are:
*SQL | The SQL naming convention is used. |
*SYS | The system naming convention is used. |
Blank | The module does not contain SQL statements or it is an ILE program. |
Number of copyrights. The number of copyrights in this ILE program. This field is zero if the program is an OPM program. Do not assume that a value of zero indicates that the program is an OPM program. ILE programs may not have any copyrights, so this value could be zero for an ILE program. Check the type of program field to determine whether the program is an OPM program or an ILE program.
Number of MI instructions. The number of machine interface (MI) instructions used by this program. A value of -1 is returned if the program is not observable. This information is zero if the program is an ILE program.
Number of MI ODT entries. The number of ODT (object definition table) entries for the program. This is the number of program objects declared by the compiler. Program objects include variables, constants, labels, operand lists, and exception descriptions. Typically, one or more ODT entries are used for each variable, constant, and label in your program. Some are used by the compiler for internal purposes. The number of internal ODT entries varies depending on the size and complexity of the program. There is a limit of 32 767 ODT entries in a program. A value of -1 is returned if the program is not observable. This information is zero if the program is an ILE program.
Number of modules. The number of modules bound into this program. This information is zero if the program is an OPM program.
Number of service programs. The number of service programs bound to this program. This information is zero if the program is an OPM program. Do not assume that a value of zero indicates that the program is an OPM program. ILE programs may not have any service programs bound to them, so this value could be zero for an ILE program. Check the type of program field to determine whether the program is an OPM program or an ILE program.
Number of SQL statements. The number of SQL statements contained in the program. This value is zero if the program does not contain SQL statements or if it is an ILE program.
Number of unresolved references. The number of symbols that could not be resolved at Create Program (CRTPGM) command time. This information is always zero if the program is an OPM program. If this is an ILE program, and if all references were resolved at the time the program was created, this value for this field could be zero.
Observable information. Whether the OPM program contains creation data and if that data is observable or unobservable. All observable creation data is needed to re-create the program using CHGPGM. All creation data (either observable or unobservable) is needed to convert the program during restore.
Possible values are:
A | *ALL. The program has all creation data and that data is observable. |
N | *NONE. The program does not have all creation data. |
U | *UNOBS. The program has all creation data but not all of that data is observable. |
Blank | The program is an ILE program. |
The observable information for most programs may be removed by using the remove observability (RMVOBS) parameter on the Change Program (CHGPGM) command.
Observable information compressed. Whether the observable information associated with the program is compressed.
Possible values are:
Y | The observable information is compressed. |
N | The observable information is not compressed. |
Blank | The program is an OPM program. |
Optimization. Indicates what was specified on the OPTIMIZE parameter when the program was created or changed.
Possible values are:
N | *NOOPTIMIZE was specified. |
O | *OPTIMIZE was specified. |
Blank | The program is an ILE program. |
Paging amount. The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program.
Possible values are:
N | Page the program one page at a time (*NOBLOCK). |
B | Page the program in eight-page blocks (*BLOCK). |
*BLOCK gives better performance in most situations. It is likely that more than one page in the block is referred to before being replaced by some other paging occurring in the storage pool.
*NOBLOCK can give better performance if the other pages that would have been brought in as a block are unlikely to be referred to before being replaced by some other paging.
Paging pool. The paging pool used for the program object. The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program.
The values returned are:
U | Use the user pool (*USER). |
B | Use the base pool (*BASE). |
M | Use the machine pool (*MACHINE). |
*USER is used by most system programs and all user programs, unless GENOPT(*MACHINE) is specified.
*BASE is used by certain system programs to avoid disturbing the user pool when they need to be paged in. These programs are not used frequently enough to belong in the machine pool. This value will only appear for OPM programs.
*MACHINE is used by a small number of system programs that are so highly used that their pages should remain almost constantly in main storage. The machine pool is intended to be a stable, low paging pool. If user programs page in the machine pool, there may be contention for main storage between system and user programs. This may adversely affect system performance and response times. To prevent paging contention, increase the QMCHPOOL system value with the Change System Value (CHGSYSVAL) command.
Profiling data. Specifies the profiling data attribute for this ILE program.
Possible values are:
*NOCOL | The collection of profiling data is not enabled and profiling data is not applied. |
*COL | The collection of profiling data is enabled for at least one module bound into this ILE program. Any applied profiling data has been removed. The QBNLPGMI API, format PGML0100, can be used to determine if a module bound into this ILE program is enabled to collect profiling data. |
*APYBLKORD | Block order profiling data has been applied to at least one module bound into this ILE program. The QBNLPGMI API, format PGML0100, can be used to determine if a module bound into this ILE program has block order profiling data applied. |
*APYPRCORD | Procedure order profiling data has been applied to this ILE program. |
*APYALL | Block order and procedure order profiling data has been applied to this ILE program. |
Blank | This program is an OPM program. |
Program attribute. The language the program is written in. (For example, the value is CLP for a CL program, and the value is RPG for an RPG program). This field can be blank. (For example, the program was created by the Create Program (QPRCRTPG) API or the program is created by a compilation process internal to IBM).
Program CCSID. The coded character set identifier (CCSID) for this ILE program. This is 65535 for ILE programs. This information is zero if the program is an OPM program.
Program domain. The domain of the program.
Possible values are:
S | The program can be called by system-state programs. |
U | The program can be called by user- or system-state programs. |
Program entry procedure module. The module name that contains the program entry procedure for this program. This information is blank if the program is an OPM program.
Program entry procedure module library. The library name that contained the module that contained the program entry procedure for this program when the bind was done. This information is blank if the program is an OPM program.
Program library name. The name of the library containing the program.
Program name. The name of the program.
Program owner. The name of the program owner's user profile.
Program size. The size (in bytes) of this program.
Program state. The state of the program.
Possible values are:
I | The program runs under (inherits) the same state as its caller. |
S | The program runs as a system-state program. |
U | The program runs as a user-state program. |
Relational database. The default relational database that was specified on the SQL precompile. A nonblank value other than *LOCAL specifies the name of the relational database to be resolved through the relational database directory.
The following special values can be returned:
*LOCAL | The program can only access data on the local system. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Release program created for. This is the release specified on the target release (TGTRLS) parameter of the Create Program (CRTPGM) command. The value specified for the TGTRLS parameter can affect the earliest release value on which the program can run.
Release program created on. The version, release, and modification level of the operating system on which the program was created.
Reserved. An ignored field.
Run-time information compressed. Whether the run-time information associated with the program is compressed.
Possible values are:
Y | The run-time information is compressed. |
N | The run-time information is not compressed. |
Blank | The program is an OPM program. |
Shared activation group. Whether the program runs in a shared activation group.
Y | The activation group is shared. |
N | The activation group is not shared. |
Sort sequence table library name. The name of the library the sort sequence table is in.
This information is blank if the program does not contain any sort sequence information or a special value was returned for the sort sequence table name.
The following special values can be returned:
*CURLIB | The job's current library |
*LIBL | The library list |
Sort sequence table name. The name of the sort sequence table used when the program was compiled. This does not apply to SQL statements in the program.
The following special values can be returned:
*HEX | No sort sequence is used. |
*JOBRUN | The sort sequence value that is associated with the job at the time the program runs. |
*LANGIDSHR | The shared sort sequence for the language identifier is used. |
*LANGIDUNQ | The unique sort sequence for the language identifier is used. |
Blank | The program does not contain SQL statements or it is an ILE program. |
Note: This sort sequence table does not apply to SQL statements. |
Source file library name. The name of the library that contains the source file used to create the program. The field is blank if a source file was not used to create the program or if it is an ILE program.
Source file member name. The name of the member in the source file. The field is blank if a source file was not used to create the program or if it is an ILE program.
Source file name. The name of the source file used to create the program. The field is blank if a source file was not used to create the program or if it is an ILE program.
Source file updated date and time. The date and time the member in the source file was last updated. The field is in the same format as the creation time and date. The field is blank if a source file was not used to create the program or if it is an ILE program.
SQL package library name. The name of the library the SQL package is in.
SQL package name. The name of the SQL package created on the relational database specified on the RDB parameter of the command that created this program.
*NONE | This is not a distributed program. |
Blank | The program does not contain SQL statements or it is an ILE program. |
SQL path. The list of libraries used during resolution of functions, procedures, and data types within SQL statements. The list is in the form of repeating library names, each surrounded by double quotes and separated by commas.
SQL path length. The length, in bytes, of the SQL path.
SQL path offset. The offset, in bytes, from the beginning of this format definition to the beginning of the SQL path.
SQL sort language identifier. The 3-character language identifier used when the program was compiled. This information is blank if the program does not contain any language identification information.
The following possible special value can be returned:
*JOBRUN | The language identifier is the LANGID associated with the job at the time the program is run. |
SQL sort sequence table name. The SQL sort sequence table returns the SQL sort sequence table name used when the program was compiled. This information is blank if the program does not contain any SQL sort sequence information or if this is an ILE program.
The following special values can be returned:
*HEX | No SQL sort sequence is used for the SQL statements. |
*JOBRUN | The SQL sort sequence is the SRTSEQ value associated with the job at the time the SQL statements within the program are run. |
*LANGIDSHR | The shared SQL sort sequence for the language identifier (LANGID) is used for the SQL statements. |
*LANGIDUNQ | The unique SQL sort sequence for the language identifier (LANGID) is used for the SQL statements. |
SQL sort sequence table library name. The name of the library the SQL sort sequence table is in. This information is blank if the program does not contain any SQL sort sequence information or a special value was returned for the SQL sort sequence table name.
The following special values can be returned:
*CURLIB | The job's current library |
*LIBL | The library list |
Static storage size. For OPM programs this is the size (in bytes) of the static storage used by the program. For ILE programs this is the maximum amount of static storage (in bytes) that may be needed to run the program. A value of 4294967295 will be given if 4 gigabytes (4294967296) or greater is needed. In this case, the maximum static storage size - long field should be used instead. The maximum static storage size - long field is available from the PGMI0300 format. OPM programs will always have less than 4 gigabytes of static storage.
Storage model. Where the automatic and static storage for this program is allocated at run time.
The following values can be returned:
0 *SNGLVL | Automatic and static storage are allocated from single-level storage. |
1 *TERASPACE | Automatic and static storage are allocated from teraspace. |
2 *INHERIT | Automatic and static storage are allocated from either single-level storage or teraspace, depending on the activation. |
Teraspace storage enabled modules. The teraspace storage capability of the modules bound to this program.
Possible values are:
'00'X | No modules bound to this program are teraspace storage enabled. |
'80'X | One or more modules bound to this program are teraspace storage enabled. The *PEP module, however, is not teraspace storage enabled. |
'C0'X | The *PEP module is teraspace storage enabled, and there may be more modules bound to this program that are teraspace storage enabled. |
'E0'X | All modules bound to this program are teraspace storage enabled. |
Teraspace storage enabled program. The teraspace storage capability of an OPM program. A program must be teraspace storage enabled to access teraspace storage.
Possible values are:
0 | This program is not teraspace storage enabled. |
1 | This program is teraspace storage enabled. |
Text description. The user text, if any, used to briefly describe the program and its function.
Time format. The format used when accessing time-result columns through SQL. All output time fields are returned in this format.
Possible values are:
*USA | USA format (hh:mm a.m. or p.m.). |
*ISO | International Standards Organization format (hh.mm.ss). |
*EUR | European format (hh.mm.ss). |
*JIS | Japanese Industrial Standard Christian Era (hh.mm.ss). |
*HMS | Hours/minutes/seconds format (hh:mm:ss). |
Blank | The program does not contain SQL statements or it is an ILE program. |
Time separator. The separator used when accessing time-result columns. This information is blank if the program does not contain SQL statements or if it is an ILE program. However, the number of SQL statements is checked to determine if the program contains SQL statements. This is because a blank may be specified as a separator value.
Type of program. Whether the program is an ILE program or an OPM program.
Possible values are:
Blank | OPM program |
B | ILE program |
Update program automatic storage area (PASA). The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program. This information is blank if the program is an ILE program.
Possible values are:
N | Do not update internal PASA stack information (*NOUPDPASA). |
U | Update internal PASA stack information (*UPDPASA). |
*NOUPDPASA reduces the time needed to call the program.
*UPDPASA increases the time needed to call the program but is used by some system programs that are dependent on updates of internal PASA stack information.
Use adopted authority. The value specified for the USEADPAUT option on the command used to change the program.
Possible values are:
Y | Uses program adopted authority from previous call levels when this program is running (*YES). |
N | Does not use program adopted authority from previous call levels when this program is running (*NO). |
User profile option. The value specified for the USRPRF option on the command used to create the program.
Possible values are:
U | The program runs under the current user's user profile (*USER). |
O | The program runs under both the current user's and the owner's user profiles (*OWNER). |
Message ID | Error Message Text |
---|---|
CPF2150 E | Object information function failed. |
CPF2151 E | Operation failed for &2 in &1 type *&3. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3CF1 E | Error code parameter not valid. |
CPF3C19 E | Error occurred with receiver variable specified. |
CPF3C21 E | Format name &1 is not valid. |
CPF3C24 E | Length of the receiver variable is not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF5CF5 E | &1 in library &2 not bound program. |
CPF8122 E | &8 damage on library &4. |
CPF8123 E | Damage on object information for library &4. |
CPF8129 E | Program &4 in &9 damaged. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9803 E | Cannot allocate object &2 in library &3. |
CPF9806 E | Cannot perform function for object &2 in library &3. |
CPF9807 E | One or more libraries in library list deleted. |
CPF9808 E | Cannot allocate one or more libraries on library list. |
CPF9810 E | Library &1 not found. |
CPF9811 E | Program &1 in library &2 not found. |
CPF9820 E | Not authorized to use library &1. |
CPF9821 E | Not authorized to program &1 in library &2. |
CPF9830 E | Cannot assign library &1. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Program and CL Command APIs | APIs by category |