Run SMG Object (RUNSMGOBJ)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Run System Manager Object (RUNSMGOBJ) command provides the capability of running an object or sending a command from the central site system to one or more managed systems.

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.

Restrictions:

  1. Only i5/OS program objects, or file members such as *CL, *REXX, and *UNSPEC can be run.
  2. The object cannot reside in the QTEMP library.
  3. 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.
Top

Parameters

Keyword Description Choices Notes
OBJ Object Qualified object name Required, Positional 1
Qualifier 1: Object Name
Qualifier 2: Library Name, *CURLIB
OBJTYPE Object type *FILE, *FILEDATA, *PGM Required, Positional 2
MBR Member Name Optional
DATATYPE Data type *UNSPEC, *CL, *REXX Optional
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
PARM Parameters Values (up to 20 repetitions): Not restricted Optional
Top

Object (OBJ)

Specifies the qualified program to be run.

The possible library values are one of the following:

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

The possible object name value is:

object-name
Specify that only characters A through Z, 0 through 9, dollar sign, at sign, and number sign are used in the object name.
Top

Object type (OBJTYPE)

Specifies the object to be used.

*PGM
When this is selected, a program object is to be run.
*FILEDATA
A CL input stream or a REXX procedure contained in a file is to be run.
*FILE
The name of the containing the member with the CL input stream to be run.
Top

Member (MBR)

Specifies the i5/OS physical file member. It is ignored unless the object type is *FILE. (Example: i5/OS CL input stream.)

member-name
Specify the name of the member to be run.
Top

Data type (DATATYPE)

Specifies the data type of the member. This parameter specifies the type of source file that runs on the managed system.

*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, a CL batch input stream.
*REXX
The file member contains a REXX procedure.
Top

Managed systems node list (NODL)

Specifies the node list 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.

The possible values are:

*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 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 that only the library named in the parameter is searched.

The possible node list name value is:

node-list-name
Specify the node list object name that contains the list of systems on which the activity is to be performed.
Top

Managed system node names (CPNAME)

Specifies the managed systems APPN control point names on which this activity is performed. Control point names cannot be specified if a node list is specified.

*NONE
The systems on which this activity is performed are not identified individually. A node list must be specified.
*NETATR
The local system network ID is used. This is useful when the node specified is in the same network as the local system.
network-identifier
Specify the managed system APPN network identifier on which the activity is performed.

The possible control point name value is:

control-point-name
Specify the managed system APPN control point name on which the activity is performed.
Top

Parameters (PARM)

Specifies that the parameters to be passed when starting the program. Up to 20 parameters can be specified.

The possible values are:

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

Examples

Example 1: Running a REXX Procedure

RUNSMGOBJ   OBJ(DEVLIB/QREXSRC)  OBJTYPE(*FILEDATA)
            MBR(REPORT1)  CPNAME((*NETATR DEVSYS))

This command runs the REXX procedure in member REPORT1 of file QREXSRC in library DEVLIB on the development system.

Example 2: Running a Program

RUNSMGOBJ   OBJ(SALESLIB/GENRPTS)  OBJTYPE(*PGM)
            NODL(SYSLIB/ALLSTORES)
            PARM('SALES ONLY' 'TODAY')

This command runs a program called GENRPTS in library SALELIB on all systems listed in the node list ALLSTORES in library SYSLIB. Two parameters are passed as input to the program. The first parameter has the value 'SALES ONLY' and the second parameter has the value 'TODAY'.

Top

Error messages

None

Top