List Service Program Information (QBNLSPGM) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The List Service Program Information (QBNLSPGM) API gives information about service programs, similar to the Display Service Program (DSPSRVPGM) command. The information is placed in a user space specified by you.

You can use the QBNLSPGM API to:


Authorities and Locks

User Space Authority
*CHANGE
User Space Library Authority
*EXECUTE
User Space Lock
*EXCLRD
Service Program Authority for SPGL0100 and SPGL0110 Formats
*USE
Service Program Authority for other Formats
*READ
Service Program Library Authority
*EXECUTE
Service Program Lock
*SHRRD

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)

The user space that is to receive the service program information. The first 10 characters contain the user space name. The second 10 characters contain the name of the library where the user space is located. The library name can be a specific library name or one of these special values:


Format name
INPUT; CHAR(8)

The content and format of the information to be returned about the specified service program(s). One of the following format names may be used:


Qualified service program name
INPUT; CHAR(20)

The name of the service program for which the information is to be listed. The first 10 characters contain the service program name. The second 10 characters contain the name of the library where the service program is located.

The service program name can be a specific service program name or one of the following special values:

The library name can be a specific library name or one of these special values:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of the Generated List

The user space contains:

For details about the user area and generic header, see User spaces. For descriptions of each field in the list returned, see Field Descriptions.

Input Parameter Section



Header Section



SPGL0100 Format

The SPGL0100 format includes information on all the modules that are bound into the programs specified. The modules are listed in the user space in the order the modules are bound into the program. You must have a service program authority of *USE to use this format. The following table shows how this information for each module is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0110 Format

The SPGL0110 format includes information on all the modules that are bound into the programs specified. The modules are listed in the user space in the order the modules are bound into the program. You must have a service program authority of *USE to use this format. The following table shows how this information for each module is organized. For detailed descriptions of the fields in the list, see Field Descriptions.

Note: Do not use the generic header entry size for this format. Use the Size of this entry field returned in this format for the size of each entry.



SPGL0200 Format

The SPGL0200 format includes information on all the service programs that are bound to the programs specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0300 Format

The SPGL0300 format lists data items exported to the activation group. The list data items are specified in the data export entry in the binding specifications component when the module was created. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0400 Format

The SPGL0400 format lists data item imports that were resolved by weak exports that had been exported to an activation group. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0500 Format

The SPGL0500 format includes copyright information for the service programs specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0600 Format

The SPGL0600 format includes procedure export information for the service programs specified. The following table shows how this information is organized.

Note: Check the subsetted list indicator in the generic header to determine if all the information that was available was returned. If the subsetted list indicator indicated there was data available that could not be returned, check the reason code in the header section for further details. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0610 Format

The following information is returned for the SPGL0610 format. All procedure export names available are returned in the SPGL0610 format, regardless of the size of the name. For detailed descriptions of the fields in the table, see .

Note: Do not use the generic header entry size for this format. Use the Size of this entry field returned in this format for the size of each entry.



SPGL0700 Format

The SPGL0700 format includes data export information for the service programs specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



SPGL0800 Format

The SPGL0800 format includes signature information for the service programs specified. The following table shows how this information is organized. For detailed descriptions of the fields in the list, see Field Descriptions.



Field Descriptions

Allow blocking. Whether blocking is used to improve the performance of certain SQL statements. The possible values are:

Allow copy of data. Whether a copy of the data can be used in the implementation of an SQL query. The possible values are:

Allow RTVCLSRC. Whether the module has CL source data that can be retrieved from the program. The possible values are:

APAR ID. The module was changed as the result of the authorized program analysis report (APAR) with this identification number. This is blank if the module was not changed at bind time.

Bound module library name. The name of the library containing the module bound into this service program at bind time.

Bound module name. The name of the module bound into this service program. This is a copy of the module that was bound into this service program. It is not the *MODULE object on the system.

Bound service program activation. Specifies when the bound service program is activated.

Bound service program library name. The name of the library containing the service program bound to this service program at bind time. This is the library name in which the activation expects to find the service program at run time. Hexadecimal zeros indicate the library list is used at the time the service program is needed.

Bound service program name. The name of the service program bound to this service program.

Bound service program signature. The current signature of the service program at the time the service program was bound to this service program.

Close SQL cursor. Specifies when SQL cursors are implicitly closed and SQL-prepared statements are implicitly discarded. The possible values are:

Commitment control. The level of commitment control that was specified on the SQL precompile. The possible values are:

Connection method. The method used for establishing remote connections when running distributed service programs.

Special values that can be returned are:

Copyright. The copyright string included in this service program.

Creation data. Whether the bound module has all the creation data and if that data is observable or unobservable. The possible values are:

Copyright length. The length of the copyright string.

Data item CCSID. The coded character set identifier (CCSID) of this data item.

Data item export name. Data items that are exported to an activation group. These data items can be used outside of the module or service program that they are defined in.

Data item export name CCSID. The coded character set identifier (CCSID) for the name of this data item export.

Data item export name length. The length of the name of the data export item.

Data item import name. The name of the data item imports that were resolved by weak exports that had been exported to the activation group.

Data item import name CCSID. The coded character set identifier (CCSID) for the name of this data item import.

Data item import name length. The length of the name of the data import item.

Data item name. Service program data items that are allowed to be exported.

Data item name length. The length of the data item name.

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. The values returned are:

Date separator. The separator used when accessing date-result columns. This information is blank if the module does not contain SQL statements. However, the number of SQL statements field should be checked to determine if the module contains SQL statements. This is because a blank may be specified as a separator value.

Debug data. Whether debug data was generated when this module was created. If debug data exists, the module may be debugged using the source debugger. The possible values are:

Default collection name. The collection name used for the unqualified names of tables, views, indexes, and SQL packages. Possible values are:

Delay PREPARE. Whether SQL prepare processing can be delayed until the statement is actually used. The possible values are:

Dynamic user profile. The user profile used for dynamic SQL statements. The following special values can be returned:

Enable performance collection. The level of performance collection enabled for this module. The following values can be returned:

Format name specified. The format name that was passed to this API on the call in the format parameter.

Language identifier. Returns the 3-character language identifier used when the module was compiled. The following special values can also be returned:

Length of Licensed Internal Code options. The size, in two-byte characters, of the Licensed Internal Code options string. This will be 0 if no Licensed Internal Code options were used for this module.

Length of long procedure export name. The actual size, in bytes, of the long procedure export name for this entry.

Licensed Internal Code options. The Licensed Internal Code options that are in use by the module. This field is specified in UCS-2 (CCSID 13488).

Licensed program. If the module was part of a licensed program at bind time, this field shows the product number and the level of the licensed program. This is blank if the module is not part of a licensed program at bind time.

Long procedure export CCSID. The coded character set identifier (CCSID) of this procedure export name.

Long procedure export name. Service program procedures that are allowed to be exported.

Maximum optimization level. The highest level of optimization this module could have at bind time. If observability has been removed from the module, this maximum optimization level value might not be the same as the one specified at module creation. The possible values are:

Module attribute. The language in which the module is written. This field can be blank (for example, a module created by a compilation process internal to IBM).

Module CCSID. The coded character set identifier (CCSID) for this module.

Module creation date and time. The date and time the module was created. The creation date and time field is in the CYYMMDDHHMMSS format as follows:

Naming convention. The convention used for naming objects in SQL statements. The possible values are:

Number of procedures. The number of procedures defined in the module. This number includes the program entry procedure (PEP), if one was generated by the compiler for this module.

Number of procedures block-order measured. The number of procedures defined in the module that had block-order profiling data collected at the time block-order profiling data was applied. If the module does not have block-order profiling data applied, this value will be zero.

Number of procedures block reordered. The number of procedures defined in the module that are block reordered. If the module does not have block-order profiling data applied, this value will be zero. This value can decrease if the service program in which this bound module is contained is retranslated.

Number of SQL statements. The number of SQL statements contained in the module. This value is zero if the module does not contain SQL statements.

Object control level. The object control level for the module at the time it was bound into this service program. You can compare the object control level of a module to the object control level of a listing to make sure they match.

Offset to Licensed Internal Code options. The offset from the beginning of the user space where the Licensed Internal Code options begin. This will be 0 if no Licensed Internal Code options were used for this module.

Offset to long procedure export name. The offset from the beginning of the user space where this procedure export name is stored.

Optimization level. Optimization levels cause the translator to produce machine code that reduces the amount of system resources necessary to run the program. The more optimization, the more efficiently the module runs on the system. Also, with more optimization you may not be able to change or view variables that have been optimized. The possible values are:

Procedure export name. Service program procedures that are allowed to be exported.

Procedure export CCSID. The coded character set identifier (CCSID) of this procedure name export.

Procedure export name length. The length of the procedure export name.

Profiling data. The profiling data attribute for the module that is bound into this service program. Possible values follow:

PTF number. The program temporary fix (PTF) that resulted in the creation of the module. This field is blank for user-created modules.

Reason code. The reason code describing why the returned list is only a subset. The following values can be returned:

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:

Release module created for. The version, release, and modification level of the operating system for which the module was created. The field has a VvRrMm format, where:

Release module created on. The version, release, and modification level of the operating system on which the module was created. The field has a VvRrMm format, where:

Reserved. An ignored field.

Service program library name. The name of the library containing the service program.

Service program library name specified. The service program library name that was passed to this API on the call in the qualified service program name parameter.

Service program name. The name of the service program.

Service program name specified. The service program name that was passed to this API on the call in the qualified service program name parameter.

Signature. A valid signature of this service program.

Size of data item export. The size, in bytes, of the data item export.

Size of this entry. The size, in bytes, of this entry.

Sort sequence table library name. 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. This information is blank if the module 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:

Sort sequence table name. The name of the sort sequence table used when the module was compiled. This does not apply to SQL statements in the module. The following special values can be returned:

Source file library name. The name of the library that contains the source file used to create the module. The field is blank if no source file was used to create the module.

Source file member name. The name of the member in the source file. The field is blank if no source file was used to create the module.

Source file name. The name of the source file used to create the module. The field is blank if no source file was used to create the module.

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 module creation date and time field. The field is blank if no source file was used to create the module.

SQL language identifier. The 3-character language identifier used when the module was compiled. This information is blank if the module does not contain any language identification information. The following possible special value can be returned:

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 module. Possible values are:

SQL path. The list of libraries used during resolution of functions 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. Even though 3483 bytes are reserved, the path's length is determined by the SQL path length entry.

SQL path length. The length, in bytes, of the SQL path.

SQL sort sequence table library name. The name of the library that is used to locate the SQL sort sequence table. This information is blank if the module 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:

SQL sort sequence table name. The sort sequence table name used when the module was compiled. This information is blank if the module does not contain any SQL sort sequence information. The following special values can be returned:

Storage model. Where the automatic and static storage for this bound module is allocated at run time. The following values can be returned:

Teraspace storage enabled. The teraspace storage capability for this bound module. Possible values are:

Time format. The format used when accessing time-result columns through SQL. All output time fields are returned in this format. The values returned are:

Time separator. The separator used when accessing time-result columns. This information is blank if the module does not contain SQL statements. However, the number of SQL statements field should be checked to determine if the module contains SQL statements. This is because a blank may be specified as a separator value.

User-modified. Whether the module was changed by the user. The possible values are:

User space library name specified. The user space library name that was passed to this API on the call in the qualified user space name parameter.

User space library name used. The name of the library that contains the user space that receives the service program information requested.

User space name specified. The user space name that was passed to this API on the call in the qualified user space name parameter.

User space name used. The name of the user space that receives the service program information requested.

Uses argument optimization (ARGOPT). Whether or not the service program export uses argument optimization. The possible values are:



Error Messages



API introduced: V2R3

[ Back to top | Program and CL Command APIs | APIs by category ]