CL Command Reference - ADDOBJCRQA
CL Command List > ADDOBJCRQA Reference
Description:
The Add Object Change Request Activity (ADDOBJCRQA) command adds an object distribution activity to a change request description. The object referred to in the activity can be an i5/OS object identified by an i5/OS object name or a global name, or a non-i5/OS object such as a PS/2 file which is identified by a global name. The object can also be an installable object which is identified by a global name. An installable object is an object created with more than one i5/OS object.
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 future date and time.
Restrictions:
1. You must have *CHANGE authority to change the request description and *EXECUTE authority to the library.
2. If a NODL value is specified, the node can only contain entries that have a value of *SNA for the address type.
3. An object can be specified using an i5/OS object name or a global name but not both.
4. The global name can be a maximum of 65-n characters in length, where n is the number of tokens. A maximum of 10 tokens can be specified.
5. The object to be distributed cannot reside in the QTEMP library.
Notes:
The following notes provide information on how the command works.
1. Authorization to the product specified on the activity is not verified until the activity runs.
2. All conditions must be satisfied before the activity can run.
3. The start times indicate when the activity can be started. Actual start times can be later due to network and system delays.
4. If a global name is used, the Add Distribution Catalog Entry (ADDDSTCLGE) command can be used to indicate where the object is located or stored.
5. Only i5/OS program objects or file members such as CL and REXX can be run.
6. The save and restore history for the object is not updated when it is sent or retrieved.
7. Active message queues are not saved when libraries (*LIB) are sent or retrieved.
8. Activities are not guaranteed to run in the same jobs. Therefore, references to objects in library QTEMP should be avoided because the scope of QTEMP is only within the job.
9. If you need to cancel an installation of a NetView Distribution Manager (NetView DM) change file or other non-i5/OS object, you must use the Add Change Management Activity (QNSADDCM) API.
Examples:
Example 1: Adding an Activity to a Change Request Description
ADDOBJCRQA CRQD(MYLIB/CR1) ACTIVITY(ACT01) ACTION(*RTV)
OBJ(QGPL/QXYZ) OBJTYPE(*JOBD) CPNAME((*NETATR SYS1))
This example shows how to add an activity to change request description CR1 in library MYLIB which retrieves the QGPL/QXYZ job description from the iSeries server SYS1 in the local network.
Example 2: Adding an Activity to an Accounting System
ADDOBJCRQA CRQD(MYLIB/CR2) ACTIVITY(ACT02) ACTION(*SND)
OBJ(ACCTLIB/TAXFILE) OBJTYPE(*FILE) MBR(DEDUCTIONS)
TGTRLS(*PRV) STRTIME((23:00:00 9/30/02))
NODL(NETLIB/ACCTSYS)
This example shows how to add an activity to send a tax table to all of the iSeries accounting servers in the ACCTSYS node list at 11 p.m. on 30 September 2002. The accounting systems are at the previous release level.
Example 3: Adding an Activity to Retrieve a Program
ADDOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(*GEN) ACTION(*RTV)
OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314)
CPNAME((CUSTNET DEVPS2))
ADDOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(*GEN) ACTION(*SND)
OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314)
NODL(NETLIB/PS2SE)
ADDOBJCRQA CRQD(MYLIB/CR3) ACTIVITY(*GEN) ACTION(*RUN)
OBJ(*GLOBAL) GLBNAME(CUSTNET PCSOFT WDWAPP VER5 020314)
COND((*PRV *EQ *SUCCESS *SAMENODE))
RMTSTRTIME((*MGDSYS (23:00:00 10/20/02))
NODL(NETLIB/PS2SE)
This command adds activities to retrieve a program from a PS/2, and sends it to all of the PS/2s in the southeast area. The PS/2s are identified in the PS2SE node list. It runs it on the PS/2s at 11 p.m. in the time zone where the PS/2 is located only if the send to the PS/2 was successful. The activity names are generated.
Example 4: Adding an Activity to Retrieve a File from Multiple Systems
ADDOBJCRQA CRQD(MYLIB/CR4) ACTIVITY(ONLY) ACTION(*RTV)
OBJ(*GLOBAL) GLBNAME(CUSTNET SALES *ANY *HIGHEST)
STRTIME((22:00:00 *CURRENT) (06:00:00 *NEXT))
NODL(NETLIB/STORES)
This command adds an activity to retrieve the most recent nightly sales file from each system identified in the STORES node list. The files are cataloged as CUSTNET SALES system-name date-created. The file must be retrieved after 10 p.m. on the day the request is submitted but before 6 a.m. the next morning when the stores open.
Example 5: Adding an Activity to Send an Installable Object
ADDOBJCRQA CRQD(MYLIB/CR1) ACTIVITY(01) ACTION(*SND)
OBJ(*GLOBAL) GLBNAME(CUSTNET ASOBJ PCKOBJ 01269 REF 0001)
CPNAME((*NETATR SYS1))
This command adds an activity to send an object that was previously packaged for installation in the central site to the iSeries server SYS1.
Example 6: Adding an Activity to Send and Install an Installable Object
ADDOBJCRQA CRQD(MYLIB/CR2) ACTIVITY(ACT02) ACTION(*SNDINS)
OBJ(*GLOBAL) GLBNAME(CUSTNET ASOBJ PCKOBJ 01270 REF 0002)
NODL(NETLIB/ACCTSYS) KEEPCLGE(*NO)
This command adds an activity to send and install an installable object that was previously packaged for installation to the node list ACCTSYS. The catalog entry in the managed system pointing to the installable object is not kept.
Example 7: Uninstalling an Installable Object
ADDOBJCRQA CRQD(MYLIB/CR4) ACTIVITY(ACT04) ACTION(*UNINS)
OBJ(*COMPNAME) COMPNAME(CUSTNET ASOBJ PCKOBJ 03000)
REFLVL(*ALL) CPNAME(*NETATR SYS4)
This command adds an activity to uninstall all the installable objects from the system SYS4 whose global name matches the component name CUSTNET ASOBJ PCKOBJ 03000, no matter what release level it has.