CHGOBJCRQA (Change Object Change Request Activity)
Note: To use this command, have the 5722-SM1 (System Manager for iSeries) licensed program installed.
CHGOBJCRQA Command syntax diagram
Purpose
The Change Object Change Request Activity (CHGOBJCRQA) command changes an object distribution activity in a change request description. The object referred to in the activity can be an OS/400 object identified by an OS/400 object name or a global name, or a non-OS/400 object such as a PS/2 file which is identified by a global name.
The activity can be conditioned so that it only runs after one or more other activities have completed (successfully or unsuccessfully). The activity can also be scheduled to run at a date and time in the future.
Restrictions
- You must have *CHANGE authority to the change request description and *EXECUTE to the library.
- An object can be specified using an OS/400 object name or a global name but not both.
- The global name can be a maximum of 65-n characters in length, where n is the number of tokens. A maximum of 10 tokens can be specified.
- Only OS/400 program objects or file members such as CL and REXX can be run.
- The object to be distributed cannot reside in the QTEMP library.
- If a node list (NODL) value is specified, the node list can only contain entries that have a value of *SNA for the address type.
Notes
The following notes provide information on how the command works.
- When you add the activity, you do not need to be authorized to any objects that are to be manipulated. When you submit a change request, be authorized to any objects that are manipulated.
- The save and restore history for the object is not updated when it is sent or retrieved.
- Active message queues are not saved when libraries (*LIB) are sent or retrieved.
- All conditions must be satisfied before the activity can be run.
- The start times indicate when the activity can be started. Actual start times can be later due to network delays and system delays.
- If a global name is to be used, the Add Distribution Catalog Entry (ADDDSTCLGE) command can be used to indicate where the object is located or is to be stored.
- Authorization to the object specified on the activity is not verified until the activity runs.
Required Parameters
- CRQD
- Specifies the change request description object name.
The possible library values are the following:
*LIBL: All of the libraries in the user and in the system portions of the job's library list are searched.
*CURLIB: The current library for the job used to locate the object.
library-name: Specify that only the library named in this parameter is searched.
change-request-description: Specify the name of the change request description object.
- ACTIVITY
- Specifies the name of the activity to change in the change request description.
*LAST: The activity is the last to run in the change request. When *LAST is specified for the activity (ACTIVITY) parameter, the condition (COND) parameter and the start time (STRTIME) parameter cannot be specified. Only one activity named *LAST can exist in the change request description.
activity-name: Specify a 10-character activity name.
- ACTION
- Specifies the object distribution functions to be performed.
*SAME: The value does not change.
*SND: Sends the specified object to the specified managed system or systems.
*RTV: Retrieves the specified object from the specified managed system or systems. To retrieve an object from more than one system, a global name with an *ANY token is required so that each retrieved object has a unique global name. Global names with unspecified tokens (*ALL, *HIGHEST, or *LOWEST) are stored in the distribution repository when they are retrieved.
*DLT: Deletes the specified object on the specified system or systems.
*RUN: Runs the specified program on the specified system or systems. OS/400 program objects (*PGM), REXX programs, or file members, containing a CL input stream or a REXX procedure, can be run on iSeries managed systems.
*SNDRUN: Sends the specified program and runs it on the specified system or systems. The program that is sent deletes on completion.
*INS: Sends the specified program and runs it on the specified managed system or systems. Only installable objects can be installed.
*SNDINS: Sends the objects, previously packaged for installation, on the specified managed system or systems, and installs them. Only objects identified by global names can be installed.
*UNINS: Removes the objects installed on the specified managed system or systems. Only objects identified by global names can be deleted.
- OBJ
- Specifies the name of the object that is run, sent, retrieved, or deleted. For send and retrieve actions, the object name represents the name of the object on both the central site system and the managed systems.
*SAME: The value does not change.
*GLOBAL: The object is identified by the global name specified on the GLBNAME parameter.
*COMPNAME: The object is identified by the component name specified on the COMPNAME parameter.
The possible library values are one of the following:
*LIBL: All of the libraries in the user and in the system portions of the job's library list are searched.
*CURLIB: The current library for the job is used to locate the object.
library-name: Specify that only the library named in this parameter is searched.
object name: Specify the object name. Only characters A through Z and 0 through 9 can be used in the object names.
Optional Parameters
- GLBNAME
- Specifies a global name, which is a series of tokens that uniquely identify an object in an SNA network. The global name represents the name that is used to locate the appropriate catalog entry on both the central site system and the managed systems. The catalog entry specifies the object that is used on that system. For example, if a retrieve action is specified, the global name is used to determine the object that is retrieved on the managed system. Also, the global name shows the location where it is to be stored on the central site system.
Special values in a token position indicate how to search for the object. By specifying *ANY in a token position, the token is ignored when searching for the correct object. If multiple objects are found matching the tokens specified, an error is returned.
If an object is sent, the global name must have been previously cataloged so that it is associated with a local object name or loaded into the distribution repository. Retrieved objects for which no catalog entry exists are placed in the distribution repository. The GLBNAME parameter is ignored if the object name is not *GLOBAL.
GLBNAME is not valid when ACTION(*UNINS) is specified. When the OBJ is *GLOBAL and the global name maps to an installable object, the global name must have the following structure:
ComponentName REF RefreshLevelIn the previous example:
- Component name are the tokens before the token with the REF value. It is used to distinguish objects from an installable object from those from another. The component can be between 1 and 7 tokens.
- The REF token is required to identify the global name as an installable object, and can only be specified from the second to the eighth token in the global name.
- The refresh level is a token with a numeric value. The refresh level shows the level of the installable object and must follow the token with the REF value.
*SAME: The value does not change.
Element 1: Token 1
*NETID: The first global name token value is a network ID generated by the command from the network attributes. The network ID is determined by the current value of the LCLNETID network attribute value.
global-name-token: Specify the first token of the global name. The first token is recommended to be the registered enterprise ID or network ID.
Element 2-10: Token 2-10
*ANY: Any token value matches when searching for the object where the action is performed. This is useful when retrieving objects for which some of the tokens in the global name are not known or vary between systems.
*HIGHEST: The object with the highest token value has the action performed on it. The token must be ordered. This is useful when a token in a global name is used to indicate a different version of the object and you need to manipulate the object with the highest version level.
*LOWEST: The object with the lowest token value has the action performed on it. The token must be ordered. This is useful when a token in a global name is used to indicate a different version of the object and you need to manipulate the object with the lowest version level.
*NETID: The network ID of this system is used. The network ID is determined by the current value of the LCLNETID network attribute value.
*CPNAME: The control point name of this system is used. The control point is determined by the current value of the LCLCPNAME network attribute value.
*SERVER: This token is stored within the change request activity with the value &SERVER, and is replaced by the short name of the change control server when the object is distributed.
*TARGET: This token is stored within the change request activity with the value &TARGET, and is replaced by the short name of the target when the object is distributed.
*MDDATE: This token is stored within the change request activity with the value &DATE, and is replaced when distributed by the date that the object was last changed.
*MDTIME: This token is stored within the change request activity with the value &TIME, and is replaced when distributed by the time that the object was last changed.
global-name-token: Specify one of a series of 1 to 16 character tokens that uniquely identify the object on which the action is to be performed. Characters A through Z and 0 through 9 can be used. Other special values (@, #, and $) can be used for tokens that represent network IDs and system names.
- OBJTYPE
- Specifies the object type. It is ignored if a global name is used.
*SAME: The value does not change.
*FILEDATA: A file member should be transferred without the file attributes. This is used to move files between an iSeries server and a non-iSeries server. The *FILE object type can be used with a iSeries server to preserve the file attributes.
object-type: Specify the OS/400 object type.
- MBR
- Specifies the physical file member name. This cannot be specified unless the object type is *FILE or *FILEDATA.
*SAME: The value does not change.
*ALL: The action should be performed on all members within the physical file. The object type must be *FILE. *ALL must be used for file types that do not have members such as device files. *ALL is not allowed when the action is *SNDRUN or *RUN, or *FIRST and *LAST for the *RUN action.
*FIRST: The action should be performed on the first member (by date added) in the physical file. The member name is determined when the activity is run.
*LAST: The action should be performed on the last member (by date added) in the physical file. The member name is determined when the activity is run.
member-name: Specify the member name on which the action should be performed.
- DATATYPE
- Specifies the data type of the member. It is used to specify the type of source file that is run on the managed system. This parameter is ignored when a file is not being sent or run.
*SAME: The value does not change.
*UNSPEC: Unspecified file member type. If the data type cannot be determined at the managed system, or if the name of the file where this member resides is QCLSRC, then the file member is treated as a CL batch input stream. If the source file is named QREXSRC, the file member is treated as a REXX procedure.
*CL: The file member contains control language, in other words, an OS/400 CL batch input stream.
*REXX: The file member contains a REXX procedure.
- COMPNAME
- A component name, which is the set of tokens of a global name previous to the REF token. It is the object on which the *UNINS action acts on. COMPNAME is only valid when ACTION(*UNINS) and OBJ(*COMPNAME) are specified.
The possible single value:
*SAME: The value does not change.
Element 1: Token 1
*NETID: The network ID of this system is used. The network ID is determined by the current value of the LCLNETID network attribute value.
component-name-token: One of a series of 1 to 16 character tokens that uniquely identifies the object on which the action is to be performed. Characters A through Z and 0 through 9 can be used. Other special values (@, #, and $) can be used for tokens that represent network IDs and system names.
Elements 2-7: Tokens 2-7
*NETID: The network ID of this system is used. The network ID is determined by the current value of the LCLNETID network attribute value.
*CPNAME: The control point name of this system is used. The network ID is determined by the current value of the LCLCPNAME network attribute value.
component-name-token: One of a series of 1 to 16 character tokens that uniquely identifies the object on which the action is to be performed. Characters A through Z and 0 through 9 can be used. Other special values (@, #, and $) can be used for tokens that represent network IDs and system names.
- REFLVL
- The refresh level is the level of the installable object that will be uninstalled. REFLVL is only valid when ACTION(*UNINS) and OBJ(*COMPNAME) are specified.
*SAME: The value does not change.
*ALL: All the installable objects with different levels will be uninstalled.
refresh-level: Specify the level of the installable object to be uninstalled. The level is a numeric value up to 16 characters.
- NODL
- Specifies that the node list parameter is the object name that contains a list of systems that are the destinations for the activity. This parameter cannot be specified if the control point name (CPNAME) parameter is also specified.
*SAME: The value does not change.
*NONE: The systems on which this activity is to be performed are not specified by a node list. Individual control point names must be specified.
The possible library values are one of the following:
*LIBL: All of the libraries in the user and system portions of the job's library list are searched for the node list object.
*CURLIB: The current library for the job is used to locate the node list object.
library-name: Specify the name of the library to be searched.
node-list-name: Specify the node list object name containing the list of systems on which the activity is to be performed.
- CPNAME
- Specifies the APPN control point names of the managed systems on which this activity is to be performed. Control point names cannot be specified if the node list (NODL) parameter is specified.
*SAME: The value does not change.
*NONE: The systems on which this activity is performed are not identified individually. A node list must be specified.
*NETATR: The network ID of the local system is used. This is useful when the node being specified is in the same network as the local system.
network-identifier: Specify the APPN network identifier of the managed system on which the activity is to be performed.
control-point-name: Specify the APPN control point name of the managed system on which the activity is to be performed. For NetView Distribution Management Agents, the control point name is the change control client which supports numeric characters (0-9) in the first position of control point names that are valid in other platforms.
- TGTRLS
- Specifies the release of the operating system on which you intend to use the object. This parameter is ignored for objects with global names that are in the distribution repository or for actions other than send or retrieve.
*SAME: The value does not change.
*CURRENT: The object is used on the release of the operating system currently running on your system. If V5R2M0 is running on your system, *CURRENT means that you intend to use the object on a system with V5R2M0 installed. The object can also be used on a system with any later release of the operating system.
*PRV: The object is intended for a system that is at the previous release level compared to the local system.
Note: Modification levels are not supported. release-level: Specify the release level in the VxRxMx format. The object is used on a system with the specified release or with any later release of the operating system installed.
Valid values depend on the current version, release, and modification level and they change with each new release.
- REPLACE
- Specifies whether the object should be replaced if it already exists. This parameter is ignored for actions other than for send, send and run, or retrieve.
*SAME: The value does not change.
*NO: An error is returned if the object already exists.
*YES: The object is replaced if it already exists.
- DTACPR
- Specifies that data be compressed when sending or retrieving. This parameter is ignored for actions other than for *SND, *SNDRUN, and *RTV of *FILEDATA object types. SNA compression with a prime compression character of blank is performed.
*SAME: The value does not change.
*NONE: The file data is not compressed when sent or when retrieved.
*SNA: The file data is compressed when sent or when retrieved.
Objects that are globally named can have compression information specified when they were added to the distribution catalog (ADDDSTCLGE) command.
- KEEPCLGE
- Specifies if the catalog entry and associated save file corresponding to the installable object will be kept in the specified system or systems. The KEEPCLGE parameter is only valid when ACTION(*SNDINS) or ACTION(*INS) is specified.
*SAME: The value does not change.
*NO: The catalog entry and associated save file are not kept.
*YES: The catalog entry and associated save file are kept.
- PARM
- Specifies parameters to be passed when starting the program. This is ignored if the action is not *RUN or *SNDRUN. Up to 20 parameters can be specified.
*SAME: The value does not change.
*NONE: There is no special value.
parameter: Specify a 1 to 253 character parameter. The prompt panel initially allows 50 characters to be entered. By entering an ampersand (&) in position 1, the field expands for larger parameters.
- COND
- Specifies which conditions must be met before this activity can be performed. Each condition identifies an activity that must run before this activity and the value the end code from that activity must have to allow this activity to run. The default condition is that the previous activity (in alphabetical order) must complete successfully before this activity can be run.
*SAME: The value does not change.
*NONE: There are no conditions for this activity.
Element 1: Conditioning Activity
The activity that must be run before this activity.
*PRV: This activity is conditioned on the previous activity. Activities are ordered alphabetically by activity name. If the activity being added is the first activity, a previous activity does not exist and any condition with *PRV is marked as having been met.
conditioning-activity-name: Specify the name of the activity that must be run before this activity. The activity name specified in the activity (ACTIVITY) parameter cannot be specified in the conditioning activity name. An activity cannot be conditioned on itself.
generic*-conditioning-activity-name: Specify the generic name of the activities that must run before this activity.
Element 2: Relational Operator
This element is the relational operator to use when comparing the end code from an activity.
*EQ Equal
*GT: Greater than
*LT: Less than
*NE: Not equal
*GE: Greater than or equal
*LE: Less than or equal
Element 3: Condition Code
The element is the value compared to the actual end code of the conditioning activity.
*SUCCESS: The activity ended successfully (0 <= end code <= 9). This end code can only be specified with relational operator *EQ or *NE.
*FAIL: The activity failed (10 <= end code <= 89). This end code can only be specified with relational operator *EQ or *NE.
*NOTRUN: The activity never started (90 <= end code <= 99). This end code is only specified with relational operator *EQ or *NE.
*ANY: The activity ended with any end code. This end code is only specified with relational operator *EQ.
end-code: Specify an integer value (0-99) that indicates the result of an activity (success or failure). The end code ranges and descriptions are:
- 00
- Activity completed successfully.
- 01-09
- Activity completed with warning messages.
- 10-29
- Activity did not complete successfully.
- 30-39
- Activity was canceled by a user before it completed.
- 30 = Activity ended with *CNTRLD option
- 35 = Activity ended with *IMMED option
- 39 = Activity ended with *FRCFAIL option
- 40-49
- Activity was not run due to errors detected by the application.
- 40 = Activity not run for security reasons
- 90-99
- Activity was not run because conditions or schedules were not met.
- 95 = Scheduled start time expired
- 99 = Conditions cannot be met
Element 4: Condition Mode
This element indicates which systems the conditioning activity must have completed on before this activity can be performed.
*ALLNODES: The conditioning activity specified must complete on all nodes before this activity runs.
*SAMENODE: When the conditioning activity specified completes for a given node, the activity specified on the ACTIVITY parameter can run for that same node even though the conditioning activity specified cannot have completed for all other nodes. In the case where this activity can run for that node, the condition is ignored.
- STRTIME
- Specifies the date and the time when this activity can be started on the central site system. The current date and time values and the next date values are determined when the change request is submitted.
Element 1: Start After Time
*SAME: The value does not change.
*CURRENT: This activity can start on or after the time when the change request is submitted.
start-after-time: Specify the time when this activity can start. The time can be entered as 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Seconds are optional. The time can be specified with or without a time separator such as a colon (:). With a time separator, specify a string of 5 or 8 digits (hh:mm or hh:mm:ss).
Element 2: Start After Date
*SAME: The value does not change.
*CURRENT: This activity can start on or after the date on which the change request is submitted.
*NEXT: The activity can start on any date after the date the change request is submitted.
start-after-date: Specify the date after this activity can start. The date must be specified in the job date format.
Element 3: Start Before Time
This element is ignored if the start before date is *ANY.
*SAME: The value does not change.
*ANY: The activity can start at any time on or before the start before date.
*CURRENT: The activity must start before the time at which the change request was submitted on the date specified on the start before data element. This value cannot be specified if the start before date is *CURRENT.
start-before-time: Specify the time before which the activity must start. If the activity cannot be started before this time, it never starts. The time can be entered as 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Seconds are optional. The time can be specified with or without a time separator such as a colon (:). With a time separator, specify a string of 5 or 8 digits (hh:mm or hh:mm:ss).
Element 4: Start Before Date
*SAME: The value does not change.
*ANY: The activity can start at any time after the start after time and the start after date.
*CURRENT: The activity must start on the date the change request is submitted.
*NEXT: The activity must start by the day after the date the change request is submitted.
start-before-date: Specify the date before the activity must start. If the activity cannot be started by this date, it never starts. The date must be specified in the job date format.
- RMTSTRTIME
- Specifies the date and time when the activity can begin running on the managed system. The current date and time values and the next date values are determined when the activity begins running at the central site systems based on the central site date and time.
Element 1: Time Zone
The time zone of the remote start time.
*SAME: The value does not change.
*LCLSYS: The remote start time is specified in the time zone of the central site system.
*MGDSYS: The remote start time is specified in the time zone of the managed system.
Element 2: Start After Time
This is the definition of the time after which the activity is to start.
*SAME: The value does not change.
*CURRENT: This function can start on the managed system at any time on or after the time this activity is started on the central site system on the date specified in element 3.
start-after-time: Specify the time when this function can start on the managed system. The time can be entered as 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Seconds are optional. The time can be specified with or without a time separator. With a time separator, specify a string of 5 or 8 digits (hh:mm or hh:mm:ss).
Element 3: Start After Date
This is the start after date.
*SAME: The value does not change.
*CURRENT: This function starts on the managed system on any date on or after the activity starts on the central site system.
*NEXT: This function starts on the managed system on any date after the activity starts on the central site system.
start-after-date: Specify the date after the functions start on the managed system. The date must be specified in the job date format.
Notes
- The special values *CURRENT and *NEXT cannot be specified for the date and the time when the time zone value *MGDSYS is specified.
- This parameter can only be specified when *RUN, *SNDRUN, *INS, *SNDINS, and *UNINS actions are specified.
- TEXT
- Specifies the activity description.
*SAME: The value does not change.
*GEN: A description is generated based on the action selected.
text-description: Specify a 50-character description of the activity.
- HOLD
- Specifies that the activity be held when the change request is submitted.
*SAME: The value does not change.
*NO: The activity is not held. It runs when all conditions and the start time are met.
*YES: The activity is held for all nodes when the change request is submitted. It must be released by you before it runs.
Examples for CHGOBJCRQA
Example 1: Retrieving a Job Description
CHGOBJCRQA CRQD(MYLIB/CR1) ACTIVITY(ACT01) ACTION(*RTV) OBJ(QGPL/QXYZ) OBJTYPE(*JOBD) CPNAME((*NETATR SYS1))This command changes an activity to retrieve the QGPL/QXYZ job description from the iSeries server SYS1.
Example 2: Sending a File to All Systems in the Network
CHGOBJCRQA CRQD(MYLIB/CR2) ACTIVITY(ACT02) ACTION(*SND) OBJ(ACCTLIB/TAXFILE) OBJTYPE(*FILE) TGTRLS(*PRV) MBR(DEDUCTIONS) STRTIME(23:00:00 9/30/02)) NODL(MYLIB/ACCTSYS)This command changes an activity to send a tax table to all of the iSeries accounting servers identified in the ACCTSYS node list at 11 p.m. on 30 September 2002. The accounting systems are at the previous release level.
Example 3: Retrieving a Program
CHGOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(ACT03) ACTION(*RTV) OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314) CPNAME((CUSTNET DEVPS2))CHGOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(ACT03) ACTION(*SND) OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314) NODL(MYLIB/PS2SE)CHGOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(ACT03) ACTION(*RUN) OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314) COND((*PRV *EQ *SUCCESS *SAMENODE)) RMTSTRTIME(*MGDSYS (23:00 10/21/02)) NODL(MYLIB/PS2SE)This command changes activities to retrieve a program from a PS/2, send it to all of the PS/2s in the PS2SE node list, and run it on the PS/2s at 11 p.m. in the time zone where the PS/2 is located. The program runs at each PS/2 after October 21, 2002.
Example 4: Retrieving a File after 10 p.m.
CHGOBJCRQA CRQD(MYLIB/CR4) ACTIVITY(ACT04) ACTION(*RTV) OBJ(*GLOBAL) GLBNAME(CUSTNET SALES *ANY *HIGHEST) STRTIME((22:00:00 *CURRENT) (06:00:00 *NEXT)) NODL(MYLIB/STORES)This command changes an activity to retrieve the most recent nightly sales file from each system identified in the STORES node list. The files are cataloged as CUSTNET SALES system-name date-created. The file must be retrieved after 10 p.m. on the day the request is submitted but before 6 a.m. the next morning when the stores open.
Example 5: Changing an Activity to Send and Install an Object
CHGOBJCRQA CRQD(MYLIB/CR1) ACTIVITY(ACT01) ACTION(*SNDINS) TEXT('New text for changed CRQ')This command changes an activity from sending the object to sending and installing the object. The text is also changed.
Error messages for CHGOBJCRQA
*ESCAPE Messages
None