First, create a fixed block, 80 lrecl dataset called DSNS.DATA. In this dataset, put fully-qualified dataset names that you want to search. There's no limit on the number of datasets. If you want to exclude a dataset from searching, put an asterisk in the first column.
The program reads 100 datasets at a time, and creates output called SEARCHx.REPORT. The 'x' starts with 1 and increments for each block of 100. In the CLIST below, change 'XXXXXX' to your MVS login ID.
/* REXX */
/* Use this program to loop through a file
of DSNs and run
SUPERCE against each file in
the list
*/
TRACE O
SQ = "'"
REPNUM = 1
ADDRESS TSO
"DEL SEARCH."REPNUM".REPORT"
"FREE F(TEMP2)"
"ALLOC F(TEMP) DA(DSNS.DATA) SHR REU"
/*------------------------------------------------------------*/
/* Set up the job card */
"ALLOC F(TEMP2) DA(SEARCH.CNTL) OLD
REU"
LN.1 = '//XXXXXXA JOB (AMER-HHFD02Z),'''Y2K
SEARCH''','
LN.2 = '//
MSGCLASS=Q,NOTIFY=XXXXXX'
'EXECIO 2 DISKW TEMP2 ( STEM LN. FINIS'
/*------------------------------------------------------------*/
/* Read the dataset containing DSNs to search
*/
'EXECIO * DISKR TEMP ( FINIS'
J = 0;
DO WHILE QUEUED() > 0
IF J < 100 THEN DO;
/* Get line
off stack */
PARSE PULL
DSN N1 N2 ;
/* Skip lines
with an asterisk */
IF SUBSTR(DSN,1,1)
= '*' THEN DO ;
NOP ;
END ;
ELSE DO ;
J = J + 1;
"FREE F(TEMP2)" ;
"ALLOC F(TEMP2) DA(SEARCH.CNTL) MOD REU" ;
LN.1 = '//SRCH'J 'EXEC PGM=ISRSUPC,
*' ;
LN.2 = '// PARM=(SRCHCMP,'ANYC'),COND=(EVEN)'
;
LN.3 = '//NEWDD DD DSN='DSN',' ;
LN.4 = '// DISP=SHR' ;
IF J = 1 THEN DO;
LN.5 = '//OUTDD DD DSN=X97MJC.DYLSRCH.REPORT'REPNUM','
LN.6 = '//
UNIT=SYSDA,DISP=(NEW,KEEP),'
LN.7 = '//
SPACE=(TRK,(20,10)),'
LN.8 = '// DCB=(RECFM=FB,LRECL=133,BLKSIZE=13300)'
END;
ELSE DO;
LN.5 = '//OUTDD DD DSN=X97MJC.DYLSRCH.REPORT'REPNUM','
LN.6 = '//
UNIT=SYSDA,DISP=(MOD,KEEP)'
LN.7 = '//*'
LN.8 = '//*'
END;
LN.9 = "SRCHFOR 'YYMMDD'"
LN.10 = "SRCHFOR 'MMDDYY'"
LN.11 = "SRCHFOR 'TODAY' "
LN.12 = "SRCHFOR 'DATE' "
LN.13 = "SRCHFOR '''19' "
LN.14 = "SRCHFOR '19<' "
LN.15 = "SRCHFOR '19&' "
LN.16 = "SRCHFOR 'YMD' "
LN.17 = "SRCHFOR 'MDY' "
LN.18 = "SRCHFOR 'DMY' "
LN.19 = "SRCHFOR 'CHGDAT'"
LN.20 = "SRCHFOR '_DTE' "
LN.21 = "DPLINE '-*',1:2 "
'EXECIO * DISKW TEMP2 ( STEM LN. FINIS' ;
/*
SAY DSN ;
*/
END ;
END ; /* j<100
*/
ELSE DO ;
REPNUM = REPNUM + 1;
"DEL DYLSRCH."REPNUM".REPORT"
"ALLOC F(TEMP2) DA(SEARCH.CNTL) OLD REU" ;
LN.1 = '//XXXXXXA JOB (AMER-HHFD02Z),'''Y2K SEARCH''',';
LN.2 = '// MSGCLASS=Q,NOTIFY=XXXXXX'
;
'EXECIO 2 DISKW TEMP2 ( STEM LN. FINIS' ;
J = 0 ;
END ; /* J = 100 */
END ; /* while queued() */
/* Flush out last time */
IF J > 0 THEN DO;
'SUB SEARCH.CNTL' ;
END;
SRCHFOC SYSIN
A1 F 80 Trunc=80 Size=14
Line=0 Col=1 Alt=0 |...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
00000 * * * Top of File * * * 00001 SRCHFOR 'YYMMDD' 00002 SRCHFOR 'MMDDYY' 00003 SRCHFOR 'TODAY' 00004 SRCHFOR 'DATE' 00005 SRCHFOR '''19' 00006 SRCHFOR '19<' 00007 SRCHFOR '19&' 00008 SRCHFOR 'YMD' 00009 SRCHFOR 'MDY' 00010 SRCHFOR 'DMY' 00011 SRCHFOR 'CHGDAT' 00012 SRCHFOR '_DTE' 00013 DPLINE '-*',1:2 00014 SELECTF * FOCEXEC A 00015 * * * End of File * * * |
The last line contains the CMS filename,
filetype, and disk letter you're going to search. The example above
assumes you're only going to search your A disk. To
search multiple disks, each disk needs
a separate line, for example:
Save your changes and return to CMS.
From the CMS prompt, type 'ISPF' and
press ENTER.
From the main menu, type 3.14 and press
ENTER. You should see a screen as follows:
----------------------------
SEARCH-FOR UTILITY ----------------------------
OPTION ===> blank - Search Files
E - Edit Statements File
Fn Ft Fm / Project.Group.Type
CAPS ===>
Selection List
===> YES
( YES/ NO )
F1=HELP F2=SPLIT
F3=END F4=RETURN F5=RFIND
F6=RCHANGE
|