RUNSMGCMD (Run System Manager Command)

Note: To use this command, have the 5722-SM1 (System Manager for iSeries) licensed program installed.

RUNSMGCMD Command syntax diagram

 

Purpose

The Run System Manager Command (RUNSMGCMD) command provides the capability of sending a command from the central site system to one or more managed systems.

Restriction: 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.

Note: A change request is automatically submitted that can be viewed to determine the status of this command. A message is returned identifying the name of the change request.

 

Required Parameters

CMD
Specifies the 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 alphabetic and the other nine characters alphanumeric. Use F4 to enable prompting for a CL command.

 

Optional Parameters

NODL
Specifies the node list object name that contains a list of systems that are the destinations for the request. It cannot be specified if the control point name (CPNAME) parameter is also specified.

*NONE: The systems on which this activity is to be performed are not identified 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 that only the library named in this parameter is searched.

node-list-name: Specify the node list object name that contains the list of systems on which the command 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.

*NONE: The systems on which this activity is to be 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.

RMTSTRTIME
Specifies the date and time when the activity can begin running on the managed system. The current date and time values and 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.

*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.

*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

*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.

Element 4: Start Before Time

This element is ignored if start before date is *ANY.

*ANY: The activity can start at any time on or after the start time.

*CURRENT: The activity must start before the time when the change request is 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 start 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 (:). With a time separator, specify a string of 5 or 8 digits (hh:mm or hh:mm:ss).

Element 5: Start Before Date

*ANY: The activity can start at any date on or after the start date.

*CURRENT: The activity must start on 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, 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 time when the time zone value *MGDSYS is specified.

RTNSPLF
Specifies that the output spooled files from the remote command that was submitted returns.

*YES: All spooled files created from the remote command are returned from the remote system. The spooled files from all 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 managed system.

*FAIL: The spooled file job log is returned from the managed system if the command fails when running.

USRPRF
Specifies the user profile under which the command runs at the managed system. If the managed system is running the NetView Remote Operations Agent/400 product, this parameter is ignored at the managed system.

*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
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.

*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.

*NO: The command, user profile, and password are not encoded when the request is sent to the managed systems.

*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.

Example for RUNSMGCMD

RUNSMGCMD  CMD(STRSBS QSNADS)  NODL(MYLIB/SALESOFC)
  RTNSPLF(*FAIL)

Sends a command to start subsystem QSNADS to 20 systems identified in node list SALESOFC. Return the job log information if the command fails.

Error messages for RUNSMGCMD

*ESCAPE Messages

CPF9838 E
User profile storage limit exceeded.
SMU1604 C
Change request &1 &2 submitted.
SMU1607 E
Not able to process change request &1 &2.
SMU168C D
Node list or control point names required.
SMU16xx E
Start after time of remote stat 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 stat time not valid.
SMU16xx E
Remote start time not valid.