CHGCMDCRQA (Change Command Change Request Activity) Command Description
Note: To use this command, have the 5722-SM1 (System Manager for iSeries) licensed program installed.
CHGCMDCRQA Command syntax diagram
Purpose
The Change Command Change Request Activity (CHGCMDCRQA) command changes a command activity in a change request description that runs a command on one or more remote systems.
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 authority to the 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.
- Authorization to the product specified on the activity is not verified until the activity runs.
- All conditions must be satisfied before the activity can run.
- The start times indicate when the activity can be started. Actual start times can be later due to network and system delays.
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 is 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: This 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.
- CMD
- Specifies the CL command to run. The command can be any command that is run in batch. The command must follow the OS/400 CL command format of 1 to 10 characters with the first character being in alphabetical order and the other nine characters alphanumeric.
command-string: Specify the command to run on the managed system.
Optional Parameters
- NODL
- Specifies that the node list parameter is the object name that contains a list of systems which 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:
*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.
*LOCAL: The local system is identified as the target system. If *LOCAL is specified, the command is run on the local system. Any spooled files created remain on the system.
*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.
- COND
- Specifies which conditions must be met before this activity can be performed. Each condition identifies an activity that must be 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.
The possible single value is *NONE.
*SAME: The value does not change.
Element 1: Conditioning Activity
The activity that must 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 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 be run before this activity.
Element 2: Relational Operator
This element is the relational operator to use when comparing the end code from a conditioning 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
This 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 was 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 codes used by the change request manager and recommended for applications 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 the 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 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 or 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 may run for that same node even though the conditioning activity specified may not have completed for all other nodes. In the case where this activity lists a node not in the conditioning activity, this activity may run for that node; the condition is ignored.
*NONE: There are no conditions for this activity.
- TEXT
- Specifies the activity description.
*SAME: The value does not change.
*GEN: A description is generated based on the action specified.
text-description: Specify a 50-character description of the activity.
- STRTIME
- Specifies the date and time when this activity can start on the central site system. The current date and time values and 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 any time on or after the time when the change request was 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 when the change request was submitted on the date specified on the start before date element.
start-before-time: Specify the time before the activity must be started. If the activity cannot be started before this time, it is never started. The time can be entered as 4 or 6 digits (hhmm or hhmmss) where h = hours, m = minutes, and s = 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 system 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 was started on the central site system.
start-after-time: Specify the time after which this function can be started 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 can start on the managed system on any date on or after the date this activity starts on the central site system.
*NEXT: This function can start on the managed system on any date after the date this activity starts on the central site system.
start-after-date: Specify the date after the function can start on the managed system. The date must be specified in the job date format.
Element 4: Start Before Time
This element is ignored if start before date is *ANY.
*SAME: The value does not change.
*ANY: The activity can start at any time on or after the start time.
*CURRENT: The activity must start before the time the change request was submitted on the date specified on the start before date element.
start-before-time: Specify the time before which the activity must be started. If the activity cannot be started before this time, then 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. With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds.
Element 5: Start Before Date
*SAME: The value does not change.
*ANY: The activity can start at any date on or after the start date.
*CURRENT: The activity must start before the date the change request was submitted.
*NEXT: The activity must start by the day after the date the change request was submitted.
start-before-date: Specify the date before which the activity must be started. If the activity cannot be started by this date, then it never starts. The date must be specified in the job date format.
Note: The special values *CURRENT and *NEXT cannot be specified for the date and the time when the time zone value *MGDSYS is specified.
- RTNSPLF
- Specifies whether the output spooled file from the remote command is returned.
*SAME: The value does not change.
*YES: The spooled files created from the remote command are returned from the remote system. The spooled files from all of the nodes are combined into one spooled file that can be viewed by displaying the command activity details of the change request.
*NO: The output data is not returned from the remote system.
*FAIL: The spooled file job log is returned from the remote system if the command fails when running.
- USRPRF
- Specifies the user profile under which the command runs at the managed systems. If the managed system is using the NetView Remote Operations Agent/400 product, this parameter is ignored at the managed system.
*SAME: The value does not change.
*NONE: No user profile is specified. The default user profile is used on each managed system.
user-profile: Specify the name of the user profile.
- PASSWORD
- Specifies the password for the remote user profile.
- Managed systems at releases prior to V5R1M0 accept only uppercased passwords up to 10 characters long. If a longer password is entered, SMU18A2 message with 100B0007 SNA sense code is returned, indicating that the request was rejected.
- Managed systems at release V5R1M0 and later, running with QPWDLVL system value:
- 0 or 1 -- truncate the received passwords to 10 characters.
- 2 or 3 -- accept passwords up to 128 characters.
*SAME: The value does not change.
*NONE: No password is specified.
*USRPRF: The password is the same as the user profile.
password: Specify the password for the user profile.
- ENCODE
- Specifies whether or not the command, user profile, and password are encoded when sent to the managed systems. If the managed system is running the NetView Remote Operations Agent/400 product, this parameter must be set to *NO.
*SAME: The value does not change.
*YES: The command, user profile, and password are encoded when the request is sent to the managed systems. The remote command key managed system attribute must be specified on both the central site system and the managed system. This attribute can be changed using the Change Managed System Attributes (CHGMGDSYSA) command. The remote command key must be the same on the central site system and the managed system.
*NO: The command, user profile, and password are not encoded when the request is sent to the managed systems.
- 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 CHGCMDCRQA
Example 1: Changing an Activity
CHGCMDCRQA CRQD(MYLIB/CR1) ACTIVITY(ACT01) CMD(STRSBS QCMN)This command changes an activity that starts the QCMN subsystem.
Example 2: Changing an Activity for a Node List
CHGCMDCRQA CRQD(MYLIB/CR2) ACTIVITY(ACT01) CMD(STRSBS QSNADS) NODL(MYLIB/STORES) RTNSPLF(*FAIL)This example shows how activity ACT01 runs the command to start the subsystem QSNADS on the systems identified in the STORES node list. The example also asks for the spooled file to be returned to the central site system if the command fails.
Example 3: Changing an Activity for Two Systems
CHGCMDCRQA CRQD(MYLIB/CR3) ACTIVITY(ACT02) CMD(PRODLIB/RUNREPORTS) CPNAME ((STORENET STOREA) (STORENET STOREB)) RMSTRTIME (*MGDSYS (19:00 11/20/02) (*ANY *CURRENT)) USRPRF(REPORTOPER) PASSWORD(OPERPASS) ENCODE(*YES)This example shows how activity ACT02 runs the detail reports for STOREA and STOREB after 7:00 p.m. on the managed system. The reports are run with the REPORTOPER user profile.
Error messages for CHGCMDCRQA
*ESCAPE Messages
- CPF9684 E
- Start after time of start time not valid.
- CPF9685 E
- Start before time of start time not valid.
- CPF968A E
- Activity name &1 not valid.
- CPF968E E
- Condition list or start time cannot be specified.
- CPF9691 E
- Start after date of start time not valid.
- CPF9692 E
- Start before date of start time not valid.
- CPF9693 E
- Activity not found.
- CPF9697 E
- Condition activity cannot equal activity name.
- CPF9698 E
- Maximum size of change request description exceeded.
- CPF9699 E
- Start time not valid.
- CPF9801 E
- Object &2 in library &1 not found.
- CPF9802 E
- Not authorized to object &2/&3 type &5.
- CPF9803 E
- Unable to allocate object &2/&3 type &5.
- CPF9810 E
- Library &1 not found.
- CPF9838 E
- User profile storage limit exceeded.
- SMU168C D
- Node list or control point names required.
- SMU16xx E
- Start after time of remote start time not valid.
- SMU16xx E
- Start before time of remote start time not valid.
- SMU16xx E
- Start after date of remote start time not valid.
- SMU16xx E
- Start before date of remote start time not valid.
- SMU16xx E
- Remote start time not valid.