> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of SUBSCRIBE IBM-MAIN Jim
> Sent: Wednesday, July 09, 2008 8:03 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: wildcard utilities
> 
> I have been struggling with a way to use wildcards as a means 
> of not having 
> to know all dataset names that may be created within a day's 
> time.  I know 
> you can use wildcards within a IDCAMS using the LISTCAT ENTRIES 
> statement, but what I would really like is to be able to copy 
> all the wildcard 
> datasets to another single dataset for reporting type 
> purposes.  We have 
> quite a few products on our mainframe, but I really don't 
> know the best 
> approach or software.  Below is a brief example of what I 
> want to accomplish.
> 
>  All the datasets are -  ORG of PS, RECFM = FB, LRECL = 133, 
> BLKSIZE = 5985
>  
> 
>  DISK.TEST.DATASETA
>  DISK.TEST.DATASETB
>  DISK.TEST.DATASETC
> 
>  Hopefully use wildcard of DISK.TEST.** to pick up ALL 
> datasets and then 
> copy to any other name I choose - DISK.BACKUP.DATASETS.  Then 
> using that 
> dataset to print out a single report in a viewable format.
> 
> Thanks in advance for any and all suggestions.

ISPF's LMDLIST can do that. I don't know really what you want to do, but
below is an example in REXX.

/* REXX */
PARSE ARG PATTERN
ADDRESS ISPEXEC
"LMDINIT LISTID(LISTID) LEVEL("PATTERN")"
IF RC <> 0 THEN DO
   SAY "LMDINIT RC="RC
   EXIT RC
END
DSN=" "
DO FOREVER
   "LMDLIST LISTID("LISTID") OPTION(LIST) DATASET(DSN) STATS(YES)"
   IF RC <> 0 THEN LEAVE
   SAY "PROCESSING DSN="DSN
   /* DO WHATEVER YOU WANT WITH THIS DSN HERE */
   /* COPY CONTENTS OF DSN */
   ADDRESS TSO "ALLOC DDN(SYSUT1) DSN('"DSN"') SHR REUSE"
   ADDRESS TSO "CALL *(IEBGENER)"
   ADDRESS TSO "FREE DDN(SYSUT1)"
END
"LMDLIST LISTID("LISTID") OPTION(FREE)"

JCL to execute the above example would look like:

//STEP010  EXEC  PGM=IKJEFT1B,
//             REGION=4096K,TIME=NOLIMIT,
//             PARM=''
//SYSTSPRT DD  SYSOUT=*
//ISPPROF  DD  SPACE=(TRK,(10,10,100)),
//             DCB=(SYS1.MACLIB)
//ISPLOG   DD  SYSOUT=*,
//             LRECL=121,RECFM=FBA,
//             BLKSIZE=121,BUFNO=1
//ISPLIST  DD  SYSOUT=*,
//             LRECL=121,RECFM=FBA,
//             BLKSIZE=121,BUFNO=1
//ISPPLIB  DD  DSN=ISP.SISPPENU,
//             DISP=SHR
//ISPTLIB  DD  DSN=ISP.SISPTENU,
//             DISP=SHR
//ISPMLIB  DD  DSN=ISP.SISPMENU,
//             DISP=SHR
//ISPSLIB  DD  DSN=ISP.SISPSLIB,
//             DISP=SHR
//SYSPROC  DD  DSN=ISP.SISPCLIB,
//             DISP=SHR
//SYSEXEC  DD  DSN=TSH009.REXX.EXEC,
//             DISP=SHR
//         DD  DSN=ISP.SISPEXEC,
//             DISP=SHR
//SYSTSIN  DD  *
EXECUTIL SEARCHDD(YES)
PROFILE PREFIX(myid)
ISPSTART CMD(%LMDLIST TSH009.**)
/*
//SYSUT2 DD DSN=MY.OUTPUT.DSN,
// DISP=(MOD,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(CYL,(200,100),RLSE),
// DCB=(...)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY



--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

----------------------------------------------------------------------
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

Reply via email to