Change Program Data (QBNCHGPD) API


  Required Parameter Group:


  Optional Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Change Program Data (QBNCHGPD) API lets you change data for module, program and service program objects. The data available to be changed includes source file information, bound module library names, bound service program library names, and export source file information.

When the source file information is changed, the location of the source for debug source views is also changed. This will allow debug views that refer to a copy of the source (such as DBGVIEW(*SOURCE)), to be able to locate the creation source files if their location has changed.

When an object has been successfully updated by the API, the change date and time stamp (date and time the object was changed) field is also updated.


Authorities and Locks

Library Authority
*EXECUTE
*DLT and *ADD are also required to change ILE program and service program objects.
Object Authority
*OBJMGT *USE
Object Lock
*EXCL

Required Parameter Group

Qualified object name
INPUT; CHAR(20)

The object for which you want to change information and the library in which it is located. The first 10 characters contain the object name, and the second 10 characters contain the library name.

You can use these special values for the library name:


Object type
INPUT; CHAR(10)

The type of object for which you want to change the information. You must use one of these special values for the object type:


Format name
INPUT; CHAR(8)

The format of the Change records provided for the Changed object information parameter.

The possible format names are:


Changed object information
INPUT; CHAR(*)

The information for the object that you want to change. The information must be in the following format:


Error code
I/O; CHAR(*)

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


Optional Parameter Group

The optional parameters can be used to specify the bound modules and bound service programs that are to be selected for update for ILE program and service program objects. If the optional parameters are not specified, the API behavior will be as if *ALL was specified for both the Qualified bound module name and the Qualified bound service program name.

Qualified bound module name
INPUT; CHAR(20)

The bound modules for which you want to change information and the library that they were in when they were bound into this program/service program. The first 10 characters contain the module name, and the second 10 characters contain the library name. If this optional parameter is not specified, the behavior will be as if *ALL was specified for both the bound module name and the bound module library name.

You can use one of the following formats for the bound module name:

You can use these special values for the bound module library name:

Qualified bound service program name
INPUT; CHAR(20)

The bound service programs for which you want to change information and the library that they were in when they were bound into this program/service program. The first 10 characters contain the service program name, and the second 10 characters contain the library name. If this optional parameter is not specified, the behavior will be as if *ALL was specified for both the bound service program name and the bound service program library name.

You can use one of the following formats for the bound service program name:

You can use these special values for the bound service program library name:


Format for the Change Records--Format CHGP0100

The following table defines the format of the change records for format CHGP0100. These records are used to specify the type of data to be changed, the selection values used to determine which data items are to be changed, and the new values to which the data items are to be changed.

For this format, the data items indicated by the specified key value will be selected for update if they meet the selection critera specified by the "From" values. Selected data items will be changed to the value specified by the "To" values.

It is not an error to specify more than one change record for a particular key value. If a data item is affected by more than one change record, the value assigned by the last change record is used.


Field Descriptions

From file. The source file names that will be selected for update.

You can use one of the following formats for the From file:

From library. The library names that will be selected for update.

You can use one of the following formats for the From library:

From member. The source member names that will be selected for update.

You can use one of the following formats for the From member:

Key. Identifies the data to be changed by this change record. See Keys for the list of valid values.

To file. The name to which the source file is to be changed.

You can use one of the following formats for the To file:

To library. The name to which the library is to be changed.

You can use one of the following formats for the To library:

To member. The name to which the source member is to be changed. A value other than *SAME is only valid for this field when specific name values are also provided for the From library, From file, and From member fields. If the From library, From file, or From member fields contain a generic or *ALL value, then the To member must be *SAME.

You can use one of the following formats for the To member:



Keys

The following table lists the valid values for the key field of the change records for format CHGP0100, and specifies the object types for which each key is valid.

OPM refers to original program model, and ILE refers to Integrated Language Environment®.

For ILE program and service program objects, the creation source file fields apply to the bound modules.


Key Descriptions

Bound module library. This key is used to change the library name for bound modules. The name specified must be in a valid object name format. It is not required to be the name of an existing library on the system. An attempt to change a bound module library name is not allowed if the change results in a program or service program having duplicate qualified bound module names.

Bound service program library. This key is used to change the library name for bound service programs. The name specified must be the name of an existing library, and the corresponding service program must exist in that library.

Creation source files. This key is used to change the library, source file, and source member names for the source files that were used to create the object.

The source files that will be changed by this key are the root source file (the one that is displayed by the DSPMOD and DSPPGM comands), and if a source debug view was specified during object creation, the names of the include files that were used are stored as debug data, and will also be changed.

When changing the root source file, this API will attempt to change the "Source file change date/time" field to the current value for the source member at the newly specified location. If a source member can not be accessed at the newly specified location, the "Source file change date/time" field will be left unchanged.

Start of changeDisallow service program library name update. This key is used to prohibit further change to the library name for bound service programs. The attribute "Allow bound service program library update" will be changed to *NO at the completion of the API processing. Any change records with a key value of 4 (bound service program library) on this API call will be processed before the attribute is set to *NO. End of change

Start of changeProhibit update. This key is used to prevent further change to the program or service program via the UPDPGM and UPDSRVPGM commands. The attribute "Allow update" will be changed to *NO at the completion of the API processing. The "Allow bound service program library update" attribute is also changed to *NO as part of the processing of this key. Any change records with other key values on this API call will be processed before the attributes are set to *NO. End of change

Export source file. This key is used to change the library, source file, and source member names for the export source file. The name specified must be the name of an existing source file.


Error Messages




API introduced: V6R1

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