Send SMG Object (SNDSMGOBJ)

The Send System Manager Object (SNDSMGOBJ) command provides the capability of sending an IBM i object from the central site system to one or more managed systems.

Note: A change request is 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 IBM i program objects or file members such as *REXX, *CL, 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.

Error messages for SNDSMGOBJ

None

Parameters

Keyword Description Choices Notes
OBJ Object Qualified object name Required, Positional 1
Qualifier 1: Object Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OBJTYPE Object type Character value Required, Positional 2
MBR Member Name, *ALL, *FIRST, *LAST 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
TGTRLS Target release *CURRENT, *PRV, V5R4M0, V6R1M0, V7R1M0 Optional
REPLACE Replace object *NO, *YES Optional
DTACPR Data compression *NONE, *SNA Optional
RUNPGM Run program *NO, *YES Optional
PARM Parameters Values (up to 20 repetitions): Not restricted Optional

Object (OBJ)

Specifies the qualified name to be sent.

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.
*CURLIB
The current library for the job is used to locate the object.
library-name
Specify only the library named in this parameter is searched.

The possible object name value is:

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

Object type (OBJTYPE)

Specifies the object.

*FILEDATA
A file member should be sent without the file attributes.
object-type
Specify the object type.

Member (MBR)

Specifies the IBM i physical file member name. It is ignored unless the object type is *FILE or *FILEDATA.

*ALL
The entire file is sent. *ALL must be used if the file is not a physical file. *ALL cannot be used if RUNPGM(*YES) is selected or if *FILEDATA is selected.
*FIRST
This is used only if the first member is sent. The member name is determined when the activity is run.
*LAST
Only the last member is sent. The member name is determined when the activity is run by the date the member was added to the physical file.
member-name
Specify the name of the member to be sent.

Data type (DATATYPE)

Specifies the data type of the member. This parameter needs to be specified only when sending a source file that runs on the managed system. DATATYPE is specified only when running *FILEDATA.

*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 such as the IBM i CL batch input stream.
*REXX
Specifies the file member contains a REXX procedure.

Managed systems node list (NODL)

Specifies the node list name contains a list of systems which are the destinations for the activities. This parameter cannot be specified if control point name (CPNAME) parameter is also specified.

The possible values are:

*NONE
The systems on which this activity is 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 containing the list of systems on which the activity is to be performed.

Managed system node names (CPNAME)

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

*NONE
The systems on which this request 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 request is performed.

The possible control point name value is:

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

Target release (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 SystemView distribution repository or for actions other than send or retrieve.

*CURRENT
The object is used on the release of the operating system currently running on your system. If V7R1M0 is running on your system, *CURRENT means that you intend to use the object on a system with V7R1M0 installed. The object can also be used on a system with any later release of the operating system installed.
*PRV
The object is intended for a system which is at the previous release level compared to the local system.
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 object (REPLACE)

Specifies that the object should be replaced if it already exists.

The possible values are:

*NO
An error is returned if the object already exists.
*YES
The object is replaced if it already exists.

Data compression (DTACPR)

Specifies that the data is compressed when sent. This parameter is valid only if the object type *FILEDATA is specified. SNA compression character or blank is performed.

*NONE
The file data is not compressed when sent.
*SNA
The file data is compressed when sent.

Run program (RUNPGM)

Specifies running the program when it arrives at the managed system. This parameter can only be specified if the object type is *PGM or if the object type is *FILEDATA and the data type is *CL or *REXX.

*NO
The program is not run.
*YES
Specify that the program is run as soon as it is received by the managed system.

Parameters (PARM)

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

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.

Examples

Example 1: Sending a Library to Systems in a Node List

SNDSMGOBJ   OBJ(ACCTLIB)  OBJTYPE(*LIB)  NODL(SYSLIB/SALESOFC)

This command sends library ACCTLIB to 20 systems identified in node list SALESOFC.

Example 2: Sending a Program to All Systems in the Node List

SNDSMGOBJ   OBJ(SALESLIB/GENRPTS)  OBJTYPE(*PGM)
            NODL(SYSLIB/ALLSTORES)
            RUNPGM(*YES)  PARM(SALES 'ONE DAY')

This command sends the program GENRPTS in library SYSLIB to all the systems listed in node list ALLSTORES in library SYSLIB. It then runs the program on each of those systems. Two parameters are passed as input to the program. The first has the value SALES and the second has the value 'ONE DAY'.

Error messages

None