For example the following commands:
REMOVE I1612XX GROUP(MYGROUP) OWNER(MYGROUP)
REMOVE I171 GROUP(MYGROUP) OWNER(MYGROUP)
CONNECT I151 GROUP(MYGROUP) OWNER(MYGROUP) AUTHORITY(USE)
CONNECT I151 GROUP(MYGROUP) OWNER(MYGROUP) AUTHORITY(USE)
The simplest way is to to go to ISPF and go to option 6. Then execute each command manually .
But the tweek in my case was to execute these commands in batch and collect the command logs, ie, whether these commands were executed or not and all details.
So, here is the utility IKJEFT01 which we can use. Its other name is terminal utility program.
Whatever we want to execute in the pannel screen can be executed from batch as well using ikjeft01.
So, lets have the JCL for using this utility.
Way1
//STEP001 EXEC PGM=IKJEFT01Way 2
//SYSTSIN DD DSN=Your-Dataset,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//STEP002 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
tso commands here
your-dataset would be the ps file having all the commands which needs to be executed
or give all the commands in SYSTSIN DD *
Now if we explore further we can use this utility to perform many functions which in some cases may turn out to be very useful
Few useful commands which we can perform in batch
1. Rename a dataset
2. Copy a file to some new name (we can use other ibm utilities as well)
3. Copy pds member to a new pds with a new name or same name
4 . Check job status and many other useful functions.
There are lot many others as well...
Have a look into jobs for some of the functions:
//STEP001 EXEC PGM=IKJEFT01The first step STEP001 copies pds members to other pds
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SMCOPY FDS('USER12.JCL(TEST1)') -
TDS('USER22.SAS(TEST2)') NOTRANS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//* *****copy files
//STEP002 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SMCOPY FDS('USER-ID.TST.FILE1') -
TDS('USER-ID.TST.FILE2.FILE3') NOTRANS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
The next step,STEP002 copies files
SMCOPY is the command to copy. FDS and TDS means From dataset and To dataset respectively.
Will explore some more and update as time permits!.
No comments:
Post a Comment