Run SMG Command (RUNSMGCMD)
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.
Keyword |
Description |
Choices |
Notes |
CMD |
Command to run |
Command string |
Required, Positional 1 |
NODL |
Managed systems node list |
Element list |
Optional |
Element 1: Node list |
Single values: *NONE Other values: Qualified object name |
Qualifier 1: Node list |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
CPNAME |
Managed system node names |
Single values: *NONE Other values (up to 50 repetitions): Element list |
Optional |
Element 1: Network identifier |
Communications name, *NETATR |
Element 2: Control point |
Communications name |
RMTSTRTIME |
Start time on managed system |
Element list |
Optional |
Element 1: Time zone |
*LCLSYS, *MGDSYS |
Element 2: Start after |
Element list |
Element 1: Time |
Time, *CURRENT |
Element 2: Date |
Date, *CURRENT, *NEXT |
Element 3: Start before |
Element list |
Element 1: Time |
Time, *ANY, *CURRENT |
Element 2: Date |
Date, *ANY, *CURRENT, *NEXT |
RTNSPLF |
Return spooled file |
*YES, *NO, *FAIL |
Optional |
USRPRF |
User profile |
Simple name, *NONE |
Optional |
PASSWORD |
Password |
Character value, *USRPRF, *NONE |
Optional |
ENCODE |
Encode command |
*YES, *NO |
Optional |
Command to run (CMD)
Specifies the command to run. The command can be any command that is run in batch mode. The command must follow the i5/OS CL command format of 1 to 10 characters with the first character alphabetic and the other nine characters alphanumeric. You can use F4 to enable prompting for a CL command.
Managed systems node list (NODL)
Specifies the node list object name that contains a list of systems which are the destinations for the request. It cannot be specified if control point name (CPNAME) parameter is also specified.
The possible value is:
- *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 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.
The possible node list name value is:
- node-list-name
- Specify the node list object name which contains the list of systems on which the command is to be performed.
Managed system node names (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.
The possible value is:
- *NONE
- The systems on which this activity is to be performed are not identified individually. A node list must be specified.
The possible values are:
- *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
- The APPN network identifier of the managed system on which the activity is to be performed.
The possible control point name value is:
- control-point-name
- The APPN control point name of the managed system on which the activity is to be performed.
Start time on managed system (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.
The possible time zone values are:
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.
The possible start after time values are:
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).
The possible start after date values are:
- *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.
The possible start before time values are:
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).
The possible start before date values are:
- *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 if the time zone value *MGDSYS is specified.
Return spooled file (RTNSPLF)
Specifies that the output spooled files from the remote command that was submitted returns.
The possible values are:
- *YES
- All spooled files created from the remote command is returned from the managed 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.
User profile (USRPRF)
Specifies the user profile under which the command runs at the remote system. If the remote system is running, the NetView Remote Operations Agent/400 product this parameter is ignored at the remote system.
The possible values are:
- *NONE
- No user profile is specified. The default user profile is used on each remote system.
- user-profile
- Specify the name of the user profile.
Password (PASSWORD)
The password for the remote user profile.
- Managed Systems at releases prior to V5R1M0 only accept 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 above, running with QPWDLVL system value:
- 0 or 1 -- truncate the received passwords to 10 characters.
- 2 or 3 -- accept passwords up to 128 characters.
The possible values are:
- *NONE
- No password is specified.
- *USRPRF
- The password is the same as the user profile.
- password
- Specify the password for the user profile.
Encode command (ENCODE)
The password for the remote user profile.
The possible values are:
- *NO
- The command, user profile, and password are not encoded when the request is sent to the remote system.
- *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.
RUNSMGCMD CMD(STRSBS QSNADS) NODL(MYLIB/SALESOFC)
RTNSPLF(*FAIL)
This command sends a command to start subsystem QSNADS to the systems identified in node list SALESOFC in library MYLIB. Job log spooled files will be returned if the STRSBS command fails.