I've written the following JCL to audit group access and push it out to all other systems, where PROD is the system name. I've written a huge jobcard that includes this for over 90 different systems. The job then XMITs the created dataset back to the system I sent it from and I have to RECEIVE it. My question: Does anyone know a way to combine/merge these datasets into one, while also pulling the dataset as a variable and putting it in between the dataset information so I know what access is on what system?
//VRARBLDJ PROC RSIZE=6M,
// SMALL='VANGRD.DPSEC.RA196',
// MEDIUM='VANGRD.DPSEC.RA197',
// COMMAND='XXXX.AUDIT.PROD',
// CUNIT=DISK,
// CSPACE=50
//STEP01 EXEC PGM=IEFBR14
//DELETE1 DD SPACE=(CYL,(###CSPACE,###CSPACE),RLSE),
// UNIT=###CUNIT,
// DSN=###COMMAND,
// DISP=(MOD,DELETE)
//STEP02 EXEC PGM=VRAAARB,REGION=###RSIZE
//STEPLIB DD DSN=SYS1.VANGUARD.VANLOAD,DISP=SHR
//SVSAM DD DSN=###SMALL.,DISP=SHR
//MVSAM DD DSN=###MEDIUM.,DISP=SHR
//VIPOPTS DD DSN=SYS1.VANGUARD.VANOPTS,DISP=SHR
//COMMAND DD SPACE=(CYL,(###CSPACE,###CSPACE),RLSE),
// UNIT=###CUNIT,
// DSN=###COMMAND,
// DISP=(,CATLG,DELETE),
// DCB=BLKSIZE=23440,BUFNO=50
//* DCB=BLKSIZE=23440,RETPD=001,BUFNO=50
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//VIPOUT DD SYSOUT=*
// PEND
//*
//GO EXEC VRARBLDJ
//STEP02.SYSIN DD * PLACE INPUT COMMAND HERE
COMMAND(REBUILD GROUP)
INCLUDE(CONNECT PERMIT)
????
COMMAND(END) /*
//VRABATCH EXEC PGM=IKJEFT01,DYNAMNBR=25
//OUTRPT OUTPUT DEST=DEV,CLASS=*
//SYSPROC DD DSN=SYS1.SYSSOFT.CLISTLIB,DISP=SHR
//VIPOPTS DD DSN=SYS1.VANGUARD.VANOPTS,DISP=SHR
//SYSTSPRT DD SYSOUT=*,OUTPUT=(*.OUTRPT)
//SYSTSIN DD *
XMIT DEV.XXXX DA([color=#FF0000]'XXXX.AUDIT.RESULTS') [/color]
/*
Example of what I'm pulling back:
SYS1.AUDIT.PROD (dataset name)
co xxxx group(grpname)
co yyyy group(grpname)
pe 'xxxx.**' id(grpname) ac(a) g
-----------------------------------------------------------
SYS1.AUDIT.DEV (dataset name)
co xxxx group(grpname)
co yyyy group(grpname)
pe 'xxxx.**' id(grpname) ac(a) g
I want it to be in one dataset (SYS1.AUDIT.RESULTS) that looks like this:
DEV
co xxxx group(grpname)
co yyyy group(grpname)
pe 'xxxx.**' id(grpname) ac(a) g
PROD
co xxxx group(grpname)
co yyyy group(grpname)
pe 'xxxx.**' id(grpname) ac(a) g