PROGRAM_INFO view

The PROGRAM_INFO view returns information about programs.

The values returned for the columns in the view are closely related to the values returned by the DSPPGM (Display Program) and DSPSRVPGM (Display Service Program) CL commands (the *BASIC, *SIZE, *SIGNATURE, and *COPYRIGHT details for ILE programs and service programs) and the Retrieve Program Information (QCLRPGMI) and Retrieve Service Program Information (QBNRSPGM) APIs.

Authorization: The caller must have:
  • *EXECUTE authority to the library containing the program or service program, and
  • *READ authority to the program or service program.

The following table describes the columns in the view. The first set of columns, through CONVERSION_DETAIL, apply to all ILE and OPM programs and service programs. The next group of columns apply to only ILE programs and service programs. The final group of columns apply to only OPM programs. The system name is PGM_INFO. The schema is QSYS2.

Table 1. PROGRAM_INFO view
Column Name System Column Name Data Type Description
PROGRAM_LIBRARY PGM_LIB VARCHAR(10) The library containing the program or service program.
PROGRAM_NAME PGM_NAME VARCHAR(10) The program or service program.
PROGRAM_TYPE PGM_TYPE VARCHAR(3) The type of program or service program.
ILE
An Integrated Language Environment® program or service program.
OPM
An original program model program.
OBJECT_TYPE OBJ_TYPE VARCHAR(7) Object type for PROGRAM_NAME.
*PGM
A program.
*SRVPGM
A service program.
CREATE_TIMESTAMP CREATE_TS TIMESTAMP(0) The timestamp when the program or service program was created.
TEXT_DESCRIPTION TEXT VARCHAR(50)
Nullable
The user text, if any, used to briefly describe the program or service program.

Contains the null value if there is no text description.

PROGRAM_OWNER OWNER VARCHAR(10)
Nullable
The name of the program or service program owner's user profile.

Contains the null value if no program owner is available.

PROGRAM_ATTRIBUTE ATTRIBUTE VARCHAR(10)
Nullable
For an ILE program, the ILE language used for the module containing the program entry procedure (PEP).

For a service program, the language in which the modules of the service program are written.

For an OPM program, the language the program is written in.

Contains the null value is there is no attribute value or if a service program contains modules generated by different compilers.

USER_PROFILE USRPRF VARCHAR(6) The value specified for the USRPRF option on the command used to create the program or service program.
*OWNER
The program or service program runs under both the current user's and the owner's user profiles.
*USER
The program or service program runs under the current user's user profile.
USE_ADOPTED_AUTHORITY USEADPAUT VARCHAR(4) The value specified for the USEADPAUT option on the command used to change the program or service program.
*NO
Does not use program adopted authority from previous call levels when this program or service program is running
*YES
Uses program adopted authority from previous call levels when this program or service program is running.
PROGRAM_STATE STATE VARCHAR(8) The state of the program or service program.
*INHERIT
The program or service program runs under (inherits) the same state as its caller.
*SYSTEM
The program or service program can call user-domain or system-domain programs.
*USER
The program or service program can call only user-domain programs.
PROGRAM_DOMAIN DOMAIN VARCHAR(7) The domain of the program or service program.
*SYSTEM
The program or service program can be called by system-state programs.
*USER
The program can be called by user-state or system-state programs.
EARLIEST_POSSIBLE_RELEASE EARLY_REL CHAR(6) The version, release, and modification level of the earliest release the program or service program is allowed to run on, in VvRrMm format. The target release (TGTRLS) parameter of the command can affect this value.
RELEASE_CREATED_ON CREATE_ON CHAR(6)
Nullable
The version, release, and modification level of the operating system, in VvRrMm format, on which the program or service program was created.

Contains the null value for OPM programs.

TARGET_RELEASE TGTRLS CHAR(6)
Nullable
This is the release specified on the target release (TGTRLS) parameter of the command.

Contains the null value for OPM programs.

MINIMUM_NUMBER_PARMS MIN_PARMS INTEGER
Nullable
The minimum number of parameters that is to be received by the program when it is called.

Contains the null value if this is a service program or if the information is not available.

MAXIMUM_NUMBER_PARMS MAX_PARMS INTEGER
Nullable
The maximum number of parameters that may be received by the program when it is called.

Contains the null value if this is a service program or if the information is not available.

ASSOCIATED_SPACE_SIZE ASSOC_SIZE INTEGER The size (in bytes) of the associated space used by this program or service program.
PAGING_POOL POOL VARCHAR(8) The paging pool used for the program or service program object.
*BASE
Use the base pool.
*MACHINE
Use the machine pool.
*USER
Use the user pool.
PAGING_AMOUNT PAGEAMOUNT VARCHAR(8) The paging behavior for the program or service program.
*BLOCK
Page the program or service program in multiple-page blocks.
*NOBLOCK
Page the program or service program one page at a time.
ALLOW_RTVCLSRC ALWRTVSRC VARCHAR(4)
Nullable
Value of the ALWRTVSRC parameter if this program was created using the Create CL Program (CRTCLPGM) command.
*NO
Source for the CL program is not saved with the program.
*YES
Source is saved.

Contains the null value if this is not a CL program.

CONVERSION_REQUIRED CONVREQ VARCHAR(4) Indicates whether the program or service program has been converted to the format required by the machine or if conversion is still required.
*NO
Conversion is not required.
*YES
Conversion is required.
CONVERSION_DETAIL CONVDETAIL VARCHAR(8) Indicates details about the conversion status.
*COMMON
The object is compatible and requires only features common to all systems supported by this release.
*COMPAT
The object is compatible, but requires features not present on all systems supported by this release.
*FEATURE
The object is not compatible. The format is current, but the object requires features not present on the current machine implementation.
*FORMAT
The object is not compatible because it is in an older format.

The following columns apply to ILE programs and service programs. They will contain the null value for OPM programs.

PROGRAM_ENTRY_PROCEDURE_
  MODULE_LIBRARY
PEP_LIB VARCHAR(10)
Nullable
The library name that contained the module that contained the program entry procedure for this program when the bind was done.

Contains the null value if this is a service program.

PROGRAM_ENTRY_PROCEDURE_MODULE PEP_MODULE VARCHAR(10)
Nullable
The module name that contains the program entry procedure for this program.

Contains the null value if this is a service program.

ACTIVATION_GROUP ACTGRP VARCHAR(10)
Nullable
The name of the activation group in which this program or service program runs. If the activation group already exists when the program or service program is called, it runs in the existing activation group. If the activation group does not exist, a new activation group is created and the program or service program runs in it. Can contain the following special values:
*CALLER
The program or service program runs in the activation group of the calling program.
*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.
*NEW
A new unnamed activation group is created when this program is called. The program runs in this activation group.
SHARED_ACTIVATION_GROUP SHARED_AG VARCHAR(4)
Nullable
Whether the program or service program runs in a shared activation group.
*NO
The activation group is not shared.
*YES
The activation group is shared.
OBSERVABLE_INFO_COMPRESSED OBS_COMP VARCHAR(4)
Nullable
Whether the observable information associated with the program or service program is compressed.
*NO
The observable information is not compressed.
*YES
The observable information is compressed.
RUNTIME_INFO_COMPRESSED RUN_COMP VARCHAR(4)
Nullable
Whether the run-time information associated with the program or service program is compressed.
*NO
The run-time information is not compressed.
*YES
The run-time information is compressed.
ALLOW_UPDATE ALWUPD VARCHAR(4)
Nullable
Whether the Update Program (UPDPGM) or Update Service Program (UPDSRVPGM) command is allowed on this program or service program.
*NO
The update command cannot be run.
*YES
The update command can be run.
ALLOW_BOUND_SRVPGM_LIBRARY_
  UPDATE
ALWLIBUPD VARCHAR(4)
Nullable
Whether the Update Program (UPDPGM) or Update Service Program (UPDSRVPGM) command is allowed to change the bound *SRVPGM library names on this program or service program.
*NO
The update command cannot specify a library name for the SRVPGMLIB parameter.
*YES
The update command can specify a library name for the SRVPGMLIB parameter.
ALL_CREATION_DATA ALL_CREATE VARCHAR(6)
Nullable
Whether the program or service program has all creation data and if that data is observable or unobservable. All observable creation data is needed to re-create the program or service program using the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) command. All creation data (either observable or unobservable) is needed to convert the program or service program during restore.
*NO
Not all of the creation data is present.
*UNOBS
All the creation data is present but not all of that data is observable.
*YES
All the creation data is present and all of that data is observable.
PROFILING_DATA PRF_DATA VARCHAR(10)
Nullable
Specifies the profiling data attribute for this program or service program.
*APYALL
Block order and procedure order profiling data are applied to this program or service program. The collection of profiling data is no longer enabled.
*APYBLKORD
Block order profiling data has been applied to at least one module bound into this program or service program.
*APYPRCORD
Procedure order profiling data has been applied to this program or service program.
*COL
The collection of profiling data is enabled for at least one module bound into this program or service program. Any applied profiling data has been removed.
*NOCOL
The collection of profiling data is not enabled and profiling data is not applied.
TERASPACE_STORAGE_ENABLED_
  MODULES
TERA_MOD VARCHAR(5)
Nullable
The teraspace storage capability of the modules bound to this program or service program.
*ALL
All modules bound to this program or service program are teraspace storage enabled.
*NONE
No modules bound to this program or service program are teraspace storage enabled.
*SOME
One or more modules bound to this program or service program are teraspace storage enabled.
TERASPACE_STORAGE_ENABLED_PEP TERA_PEP VARCHAR(4)
Nullable
Indicates whether the Program Entry Procedure (PEP) is teraspace enabled.
*NO
The PEP module is not teraspace storage enabled.
*YES
The PEP module is teraspace storage enabled.

Contains the null value if this is a service program.

STORAGE_MODEL STGMDL VARCHAR(10)
Nullable
Where the automatic and static storage for this program or service program is allocated at run time.
*INHERIT
Automatic and static storage are allocated from either single-level storage or teraspace, depending on the activation.
*SNGLVL
Automatic and static storage are allocated from single-level storage.
*TERASPACE
Automatic and static storage are allocated from teraspace.
ARGUMENT_OPTIMIZATION ARGOPT VARCHAR(4)
Nullable
Whether argument optimization was done during program or service program creation.
*NO
Argument optimization was not performed.
*YES
Argument optimization was performed.
NUMBER_OF_UNRESOLVED_REFERENCES UNRESOLVED INTEGER
Nullable
The number of symbols that could not be resolved at Create Program (CRTPGM) or Create Service Program (CRTSRVPGM) command time.
ALLOW_STATIC_STORAGE_REINIT ALWRINZ VARCHAR(4)
Nullable
Whether program or service program static storage can be reinitialized.
*NO
Static storage cannot be reinitialized.
*YES
Static storage can be reinitialized.
MINIMUM_STATIC_STORAGE_SIZE MIN_STATIC BIGINT
Nullable
The minimum static storage size, in bytes, that this program or service program needs in order to run.
MAXIMUM_STATIC_STORAGE_SIZE MAX_STATIC BIGINT
Nullable
The maximum static storage size, in bytes, that this program or service program may need in order to run.
AUXILIARY_STORAGE_SEGMENTS NBR_AUX INTEGER
Nullable
The number of auxiliary storage segments in this program or service program.
MAXIMUM_AUXILIARY_STORAGE_
  SEGMENTS
MAX_AUX INTEGER
Nullable
The maximum number of auxiliary storage segments an ILE program or service program can have.
PROGRAM_SIZE PGM_SIZE INTEGER
Nullable
The total size of the program or service program, in kilobytes.
MAXIMUM_PROGRAM_SIZE MAXPGMSIZE INTEGER
Nullable
The maximum size that an ILE program or service program can be, in kilobytes.
MODULES MODULES INTEGER
Nullable
The number of modules bound into this program or service program.
MAXIMUM_MODULES MAXMODS INTEGER
Nullable
The maximum number of modules that can be bound into an ILE program or service program.
SERVICE_PROGRAMS SRVPGMS INTEGER
Nullable
The number of service programs bound to this program or service program.
MAXIMUM_SERVICE_PROGRAMS MAXSRVPGMS INTEGER
Nullable
The maximum number of service programs that can be bound to an ILE program or service program.
STRING_DIRECTORY_SIZE STRDIRSIZE INTEGER
Nullable
The program or service program's string directory size.
MAXIMUM_STRING_DIRECTORY_SIZE MAXSTRDIR INTEGER
Nullable
The maximum size that the string directory can be in an ILE program or service program.
COPYRIGHTS COPYRIGHTS INTEGER
Nullable
The number of copyrights in this program or service program.
Start of changeCOPYRIGHT_STRINGSEnd of change Start of changeCOPYR_JSONEnd of change Start of changeCLOB(16M)
CCSID 1208
Nullable
End of change
Start of changeA list of copyrights. The value is returned as an array within a JSON object. It is formatted as: {"COPYRIGHT":["first-string", "second-string",...]}
Contains the null value if COPYRIGHTS is 0.
End of change
COPYRIGHT_STRING_SIZE CPYRSTRSIZ INTEGER
Nullable
The program or service program's copyright string size.
MAXIMUM_COPYRIGHT_STRING_SIZE MAXCPYRSTR INTEGER
Nullable
The maximum size of the copyright string in an ILE program or service program.
EXPORT_SOURCE_LIBRARY EXP_SRCLIB VARCHAR(10)
Nullable
The name of the library that contains the export source file. Can contain the following special value:
*LIBL
The library list.

Contains the null value if EXPORT_SOURCE_FILE is null.

EXPORT_SOURCE_FILE EXP_SRCF VARCHAR(10)
Nullable
The name of the export source file that contains the export source file member.

Contains the null value if this is not a service program, if there is no export source, if the export source was not specified using a source file, or if you are not authorized to this information.

EXPORT_SOURCE_FILE_MEMBER EXP_SRCM VARCHAR(10)
Nullable
The name of the member in the export source file that was used to create this service program.

Contains the null value if EXPORT_SOURCE_FILE is null.

EXPORT_SOURCE_STREAM_FILE EXP_STMF VARGRAPHIC(5000) CCSID 1200
Nullable
The path name of the stream file that contains the export source for this service program.

Contains the null value if this is not a service program or if the export source was not specified using a stream file.

PROCEDURE_EXPORTS PROCEXP INTEGER
Nullable
The number of procedures exported from this service program.

Contains the null value if this is not a service program.

MAXIMUM_PROCEDURE_EXPORTS MAXPROCEXP INTEGER
Nullable
The maximum number of procedures that can be exported by a service program.

Contains the null value if this is not a service program.

DATA_EXPORTS DATAEXP INTEGER
Nullable
The number of data items exported from this service program.

Contains the null value if this is not a service program.

MAXIMUM_DATA_EXPORTS MAXDATAEXP INTEGER
Nullable
The maximum number of data items that can be exported by a service program.

Contains the null value if this is not a service program.

SIGNATURES SIGNATURES INTEGER
Nullable
The number of signatures for this service program. This is the number of entries returned in EXPORT_SIGNATURES.

Contains the null value if this is not a service program.

EXPORT_SIGNATURES EXP_SIG BLOB(557038)
Nullable
The list of export signatures for this service program. Each signature is a binary string with a length of 16. A single hexadecimal 00 character separates values.

The current export signature of this service program is the first one in the list.

Contains the null value if this is not a service program.

MAXIMUM_SIGNATURES MAXSIGS INTEGER
Nullable
The maximum number of signatures that can be in a service program.

Contains the null value if this is not a service program.


The following columns apply to OPM programs. They will contain the null value for ILE programs and service programs.

SOURCE_FILE_LIBRARY SRCLIB VARCHAR(10)
Nullable
The name of the library that contains the source file used to create the program..

Contains the null value if no source file was used to create the program.

SOURCE_FILE SRCFILE VARCHAR(10)
Nullable
The name of the source file used to create the program.

Contains the null value if no source file was used to create the program.

SOURCE_FILE_MEMBER SRCMBR VARCHAR(10)
Nullable
The name of the member in the source file.

Contains the null value if no source file was used to create the program.

SOURCE_FILE_CHANGE_
  TIMESTAMP
SRCF_CHGTS TIMESTAMP(0)
Nullable
The timestamp of when the member in the source file was last updated.

Contains the null value if no source file was used to create the program.

SORT_SEQUENCE_LIBRARY SRTSEQ_LIB VARCHAR(10)
Nullable
The name of the library that contained the sort sequence table used when the module was compiled. This does not apply to SQL statements in the module. Can contain the following special values:
*LIBL
The sort sequence table is found in the library list when PROGRAM_NAME runs this module.
*CURLIB
The sort sequence table is found in the current library when PROGRAM_NAME runs this module.

Contains the null value if SORT_SEQUENCE contains a special value or is null.

SORT_SEQUENCE SRTSEQ VARCHAR(10)
Nullable
The name of the sort sequence table used when the program was compiled. This does not apply to SQL statements in the program. Can contain the following special values:
*HEX
No sort sequence is used.
*JOBRUN
The sort sequence value 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.

Contains the null value if the program does not contain any sort sequence information.

LANGUAGE_ID LANGID VARCHAR(7)
Nullable
The language identifier used when the program was compiled. This does not apply to SQL statements in the program. Can contain the following special value:
*JOBRUN
The language identifier associated with the job at the time the program is run.

Contains the null value if the program does not contain any language identification information.

OBSERVABLE OBSERVABLE VARCHAR(6)
Nullable
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.
*ALL
The program has all creation data and that data is observable.
*NONE
The program does not have all creation data.
*UNOBS
The program has all creation data but not all of that data is observable.
OPTIMIZATION OPTIMIZE VARCHAR(11)
Nullable
Indicates what was specified on the OPTIMIZE parameter when the program was created or changed.
*NOOPTIMIZE
*NOOPTIMIZE was specified.
*OPTIMIZE
*OPTIMIZE was specified.
LOG_COMMANDS LOGCMD VARCHAR(4)
Nullable
The value specified for the LOG parameter of the CRTCLPGM command.
*JOB
Logging of commands in a running CL program depends on the status of the job's logging flag.
*NO
Commands are not logged.
*YES
Commands are logged in all cases.

Contains the null value if the program is not a CL program.

FIX_DECIMAL_DATA FIXDECDATA VARCHAR(4)
Nullable
Whether decimal data that is not valid is corrected or an error is signaled.
*NO
An error is signaled to the program without correcting the data that is not valid.
*YES
Decimal data that is not valid is corrected.
UPDATE_PASA UPDPASA VARCHAR(10)
Nullable
The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program.
*NOUPDPASA
Do not update internal program automatic storage area (PASA) stack information.
*UPDPASA
Update internal PASA stack information.
CLEAR_PASA CLRPASA VARCHAR(10)
Nullable
The compiler may have allowed you to control this attribute through the GENOPT parameter of the command used to create the program.
*CLRPASA
Clear PASA storage.
*NOCLRPASA
Do not clear PASA storage.
COMPILER_ID COMPILER VARCHAR(14)
Nullable
The licensed program identifier, version, release, and modification level of the compiler. The value 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.
TERASPACE_STORAGE_ENABLED_PROGRAM TS_PGM VARCHAR(4)
Nullable
The teraspace storage capability of the program. A program must be teraspace storage enabled to access teraspace storage.
*NO
This program is not teraspace storage enabled.
*YES
This program is teraspace storage enabled.
OPM_PROGRAM_SIZE OPMPGMSIZE INTEGER
Nullable
The size (in bytes) of this program.
STATIC_STORAGE_SIZE STATIC_STG INTEGER
Nullable
The size (in bytes) of the static storage used by the program.
AUTOMATIC_STORAGE_SIZE AUTO_STG INTEGER
Nullable
The size (in bytes) of the automatic storage used by this program.
NUMBER_MI_INSTRUCTIONS MI_INSTR INTEGER
Nullable
The number of machine interface (MI) instructions used by this program.

Contains the null value if the program is not observable.

NUMBER_MI_ODT_ENTRIES MI_ODT INTEGER
Nullable
The number of ODT (object definition table) entries for the program. There is a limit of 32767 ODT entries in a program.

Contains the null value if the program is not observable.

SQL_STATEMENT_COUNT NBRSTMTS INTEGER
Nullable
The number of SQL statements contained in the program.

Contains 0 if there are no SQL statements in the program.

SQL_RELATIONAL_DATABASE RDB VARCHAR(18)
Nullable
The default relational database that was specified on the SQL precompile. Can contain the following special value:
*LOCAL
The program can only access data on the local system.

Contains the null value if no package was created for the program by the SQL precompiler or if the program does not contain SQL statements.

SQL_COMMITMENT_CONTROL ISOLATION VARCHAR(5)
Nullable
The level of commitment control that was specified on the SQL precompile.
*ALL
Read stability.
*CHG
Uncommitted read.
*CS
Cursor stability.
*NONE
No commit.
*RR
Repeatable read.

Contains the null value if the program does not contain SQL statements.

SQL_NAMING NAMING VARCHAR(4)
Nullable
The convention used for naming objects in SQL statements.
*SQL
The SQL naming convention is used.
*SYS
The system naming convention is used.

Contains the null value if the program does not contain SQL statements.

SQL_DATE_FORMAT DATFMT VARCHAR(4)
Nullable
The date format attribute.
*DMY
Day/month/year format (dd/mm/yy).
*EUR
European format (dd.mm.yyyy).
*ISO
International Standards Organization format (yyyy-mm-dd).
*JIS
Japanese Industrial Standard format (yyyy-mm-dd).
*JUL
Julian format (yy/dds).
*MDY
Month/day/year format (mm/dd/yy).
*USA
USA format (mm/dd/yyyy).
*YMD
Year/month/day format (yy/mm/dd).

Contains the null value if the program does not contain SQL statements.

SQL_DATE_SEPARATOR DATSEP CHAR(1)
Nullable
The date separator attribute.

Contains the null value if the program does not contain SQL statements.

SQL_TIME_FORMAT TIMFMT VARCHAR(4)
Nullable
The time format attribute.
*EUR
European format (hh.mm.ss).
*HMS
Hours/minutes/seconds format (hh:mm:ss).
*ISO
International Standards Organization format (hh.mm.ss).
*JIS
Japanese Industrial Standard format (hh.mm.ss).
*USA
USA format (hh:mm a.m. or p.m.).

Contains the null value if the program does not contain SQL statements.

SQL_TIME_SEPARATOR TIMSEP CHAR(1)
Nullable
The time separator attribute.

Contains the null value if the program does not contain SQL statements.

SQL_SORT_SEQUENCE_LIBRARY SQL_SSEQLB VARCHAR(10)
Nullable
The name of the library that is used to locate the SQL sort sequence table. The following special values can be returned:
*CURLIB
The SQL sort sequence table is found by looking in the current library.
*LIBL
The SQL sort sequence table is found by looking in the library list.

Contains the null value if SQL_SORT_SEQUENCE contains a special value or if the program does not contain SQL statements.

SQL_SORT_SEQUENCE SQL_SRTSEQ VARCHAR(10)
Nullable
The sort sequence table name specified when the program was compiled. 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 theprogram 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.

Contains the null value if the program does not contain SQL statements.

SQL_LANGUAGE_ID SQL_LANGID VARCHAR(7)
Nullable
The language identifier specified when the program was compiled. The following special value can be returned:
*JOBRUN
The language identifier is the LANGID associated with the job at the time the program is run.

Contains the null value if the program does not contain SQL statements.

SQL_DEFAULT_SCHEMA DFTRDBCOL VARCHAR(10)
Nullable
The schema name used for unqualified names of tables, views, indexes, and SQL packages in static statements.

Contains the null value if there is no default schema name or if the program does not contain SQL statements.

SQL_PATH SQLPATH VARCHAR(3483)
Nullable
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.

Contains the null value if the program does not contain SQL statements.

SQL_DYNAMIC_USER_PROFILE DYNUSRPRF VARCHAR(10)
Nullable
The user profile used for dynamic SQL statements. The following special values can be returned:
*OWNER
Local dynamic SQL statements are run under the profile of the program's owner. Distributed dynamic SQL statements are run under the profile of the SQL package's owner.
*USER
Local dynamic SQL statements are run under the profile of the job or thread. Distributed dynamic SQL statements are run under the profile of the application server job.

Contains the null value if the program does not contain SQL statements.

SQL_ALLOW_COPY_DATA ALWCPYDTA VARCHAR(9)
Nullable
Whether a copy of the data can be used in the implementation of an SQL query.
*NO
A copy of the data is not allowed.
*OPTIMIZE
A copy of the data is allowed whenever it might result is better performance.
*YES
A copy of the data is allowed, but only when necessary.

Contains the null value if the program does not contain SQL statements.

SQL_CLOSE_SQL_CURSOR CLOSQLCSR VARCHAR(10)
Nullable
Specifies the CLOSQLCSR attribute.
*ENDJOB
SQL cursors remain open between calls and can be fetched without running another OPEN statement. The programs higher on the call stack do not need to have run SQL statements. SQL cursors are left open, SQL prepared statements are preserved, and LOCK TABLE locks are held when the first SQL program on the call stack ends. SQL cursors are closed, SQL prepared statements are discarded, and LOCK TABLE locks are released when the job ends.
*ENDPGM
SQL cursors are closed and SQL prepared statements are discarded when the program ends. LOCK TABLE locks are released when the first SQL program on the call stack ends.
*ENDSQL
SQL cursors remain open between calls and rows can be fetched without running another OPEN statement. One of the programs higher on the call stack must have run at least one SQL statement. The SQL cursors are closed, SQL prepared statements are discarded, and LOCK TABLE locks are released when the first SQL program on the call stack ends. If you specify *ENDSQL for a program that is the first SQL program called (the first SQL program on the call stack), the program is treated as if *ENDPGM was specified.

Contains the null value if the program does not contain SQL statements.

SQL_DELAY_PREPARE DLYPRP VARCHAR(4)
Nullable
Indicates the delay prepare attribute.
*NO
Dynamic statement validation is performed when the dynamic statements are prepared.
*YES
Dynamic statement validation is delayed until the dynamic statements are used.

Contains the null value if the program does not contain SQL statements.

SQL_ALLOW_BLOCK ALWBLK VARCHAR(8)
Nullable
Whether blocking is used to improve the performance of certain SQL statements.
*ALLREAD
Rows are blocked for read-only cursors.
*NONE
Rows are not blocked for retrieval of data for cursors.
*READ
Rows are blocked for read-only retrieval of data for cursors when:
  • The commitment control value is *NONE.
  • The cursor is declared with a FOR READ ONLY clause or there are no dynamic statements that could run a positioned UPDATE or DELETE statement for the cursor.

Contains the null value if the program does not contain SQL statements.

SQL_PACKAGE_LIBRARY SQLPKGLIB VARCHAR(10)
Nullable
The name of the library the SQL package is in.

Contains the null value if the program is not distributed or if the program does not contain SQL statements.

SQL_PACKAGE SQLPKG VARCHAR(10)
Nullable
The name of the SQL package created on the relational database specified on the RDB parameter of the command that created this program.

Contains the null value if the program is not distributed or if it does not contain SQL statements.

SQL_RDB_CONNECTION_METHOD RDBCNNMTH VARCHAR(4)
Nullable
Specifies the semantics used for CONNECT statements:
*DUW
CONNECT (Type 2) semantics are used to support distributed unit of work.
*RUW
CONNECT (Type 1) semantics are used to support remote unit of work

Contains the null value if the program is not distributed or if it does not contain SQL statements.

Examples

  • Summarize the activation group usage for all ILE programs in APPLIB.
    SELECT ACTIVATION_GROUP, COUNT(*) AS ACTIVATION_GROUP_NAME_COUNT
      FROM QSYS2.PROGRAM_INFO
      WHERE PROGRAM_LIBRARY = 'APPLIB'
            AND PROGRAM_TYPE = 'ILE'
      GROUP BY ACTIVATION_GROUP
      ORDER BY 2 DESC;
  • Examine the ownership of programs and service programs in APPLIB.
    SELECT PROGRAM_OWNER, OBJECT_TYPE, COUNT(*) AS APPLICATON_OWNER_COUNT
      FROM QSYS2.PROGRAM_INFO
      WHERE PROGRAM_LIBRARY = 'APPLIB'
      GROUP BY PROGRAM_OWNER, OBJECT_TYPE
      ORDER BY 2, 3 DESC;
  • Start of changeList all the copyrights for ILE programs in APPLIB.
    SELECT PROGRAM_LIBRARY, PROGRAM_NAME, PROGRAM_TYPE, COPYRIGHT
      FROM QSYS2.PROGRAM_INFO, 
          JSON_TABLE(COPYRIGHT_STRINGS, 'lax $.COPYRIGHTS'
                     COLUMNS (COPYRIGHT VARCHAR(500) PATH 'lax $[*]' ))
     WHERE PROGRAM_LIBRARY = 'APPLIB';
    
    End of change