Hi,
In respect "We're going to use SMS allocation in our z/OS 1.4 Production
systems. I have a little problem: a lot of our job batch use IEHLIST utility
LISTPDS command to retrieve the member list of some PDS. With this utility, you
have to put the right volser to make it working...
But, with our SMS constructs, we won't know the volser and we don't want to
know it :-)"
There may be better alternatives to resolve this issue but as an exercise in
getting the "little grey cells" working this morning I experimented with REXX
and the results are included here.
Sample REXX Routine to drive IEHLIST
/* REXX to run IEHLIST against SMS managed PDS's */
Parse Upper Arg dsn . /* get PDS or PDSE dsn */
"DROPBUF 0" /* Clear the stack for safety. */
Call Get_file_names /* Get file names from User */
Call alloc_files /* Allocate the required files */
Call do_iehlist /* Execute IEHLIST now */
Exit cc /* Exit with Cond Code */
Get_file_names: /* Obtain PDS or PDSE data set name */
hdr = ' LISTPDS DSNAME='
testdsn = "'"||dsn||"'"
rc = LISTDSI(testdsn)
Say SYSDSORG
If SYSDSORG ¬= 'PO' Then Do
Say 'Data Set not partitioned'
Exit 16
End
ieh.1 = LEFT(hdr||dsn||',VOL='||SYSUNIT||'='||SYSVOLUME,80)
Return
alloc_files: /* Allocate all other files */
"EXECIO 1 DISKW SYSIN (STEM ieh. FINIS"
Return
do_iehlist: /* Get all PDS(E) members */
Address LINK 'IEHLIST' /* Execute IEHLIST dynamically */
cc = rc /* Save as current Cond Code */
Return
Sample Batch job used to test the REXX
//IBMUSERT JOB CLASS=A,NOTIFY=&SYSUID,MSGCLASS=X
// SET PDS='userid.REXX.CLIST'
//S0010 EXEC PGM=IKJEFT1B,
// PARM='PDSLIST &PDS'
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSEXEC DD DSN=userid.REXX.EXEC,DISP=SHR
//DDA DD DISP=SHR,DSN=&PDS
//SYSPRINT DD SYSOUT=*
//SYSIN DD UNIT=SYSDA,SPACE=(80,1),LRECL=80,RECFM=F,BLKSIZE=80
If the sample job above is created as a procedure with the dsname being a
symbolic on both the EXEC PARM field and the DDA DD statement, then the routine
will allocate the correct device for IEHLIST and build the approripate control
ststement.
Kind regards - Terry
Terry Sambrooks
Director
KMS-IT Limited
228 Abbeydale Road South
Dore
Sheffield
S17 3LA
UK
Tel: +44 (0)114 262 0933
WEB:
www.legac-e.co.uk
Reg: England & Wales 3767263 at the above address
All outgoing E-mails are scanned but it remains the recipients responsibility
to ensure that their system is protected from viruses, trojans, worms, and
spy-ware.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html