Posted: Thu Sep 18, 2008 5:27 am Post subject: Search with AND
Hi All,
I have a req that i have to search two strings with specified values in approx 500 modules.Manually its very tedious task.
Please let me know if this can be done by any tool or JCL.
Once again req is as follows:
This format is present in each module
but values of the string1....string5 might be different.
string1=1
string2=2
string3=3
string4=4
string5=5
I want only those modules where string1=1 and string5=5 are present.
Hope it helps..... _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Is not there any option by that i found only those modules where a particular combination of string1=1 and string5=5 can be searched.Here is more elaboration
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
Posted: Fri Sep 19, 2008 6:06 am Post subject:
Quite simple in REXX using ISPF
1) Main REXX EXEC
Code:
/* REXX *** LIST PDS AND INVOKE EDIT MACRO TO FIND CONDITIONS */
Address Ispexec "Control Errors Return"
Pds = "pds name"
mac = 'UPDATPD1'
x = msg('off')
x=outtrap(list.)
"LISTDS '"Pds"' MEM "
x=outtrap(off)
Do aa = 7 to list.0
"Ispexec edit dataset('"Pds!!"("!!Strip(list.aa)!!")') MACRO("mac")"
End
The Macro
Code:
/* REXX *** ISPF EDIT MACRO */
Address Ispexec "Control Errors Return"
"ISREDIT MACRO"
"ISREDIT F 'string 1 = abc' FIRST"
Rcx = RC
"ISREDIT F 'string 5 = xyz' FIRST"
Rcy = RC
If Rcx = 0 & Rcy = 0 then do
"ISREDIT (MEM) = MEMBER "
SAY 'Criteria found in member name ' mem
End
_________________ If it's true that we are here to help others,
then what exactly are the others here for ?
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
Posted: Fri Sep 19, 2008 6:23 am Post subject:
Mrinal,
I would myself prefer rexx solution, or combination of rexx and somehigh level language, then I will never be limited by these utilities.
Alternately use solution given by Sqlcode, I am sure it will be quick. Loadlib for file-aid might be different at your place. Ask your colleagues. Only problem with File-Aid and Sort is that the syntax is not obvious so you have to ask lot of people. Secodly it is difficult for third person to understand.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Sep 19, 2008 2:45 pm Post subject:
mrinalsolanki,
You can do this kind of thing more easily and efficiently with the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this
Posted: Sat Sep 20, 2008 9:04 pm Post subject: batch DSN
Mrinal,
I've tried the below to find out STEPLIB used by File-Aid at out site.....
1). Go to File-Aid and choose option 3.3 (Copy).
2). Choose BATCH process
Code:
Specify Execution Information:
Process online or batch ===> B (O = Online; B = Batch)
3). Specify SELECTION CRITERIA by either 'Q' or 'T'
4). Edit the JCL given by File-Aid
5). Inside that you will find the STEPLIB (Commented out).
Code:
//* YOU ARE VIEWING JCL THAT FILE-AID 8.9 HAS GENERATED TO
//* COPY DATASETS.
//*
//* YOU CAN CHANGE THIS JCL IF DESIRED AND USE THE SUBMIT PRIMARY
//* COMMAND TO SUBMIT THE JOB. THE CREATE OR REPLACE PRIMARY COMMAND
//* CAN BE USED TO KEEP THIS JOBSTREAM FOR FUTURE USE.
//*
//* USE THE END COMMAND TO EXIT WITHOUT SUBMITTING THE JOB.
//*
//* COPYRIGHT (C) 2006 BY COMPUWARE CORPORATION, ALL RIGHTS RESERVED.
//*
//FASTEP EXEC PGM=FILEAID,REGION=6M
//*STEPLIB DD DISP=SHR,DSN=SYS2A.COMPUWAR.LINKLIB
//SYSPRINT DD SYSOUT=*
You can try the same at your site and let me know.....
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
By runnig JCL given by u, I got maxcc=8.Reason is as follows:
Code:
DD01 DSN=MY.ABC.DS OPENED AS PO,
RECFM=FB,LRECL=80,BLKSIZE=6160,VOL=STGG01
$$DD01 PRINTMEM EXPAND=Y,FORM=JCL
BVE06-DD01SC MUST BE A PDS.
.....SKIPPING TO NEXT $$DD CARD
Reason is clear ,dataset provided in jcl is not PS but I just wanted to know how i would search in PO oriented datasets?
I tried that but problem with that method is ,i didn't get desired results,
reason being that AND qualifier search both strings in a record but my problem is that both strings are in to different records.
is that any other parameter by which i combine 5 records into 1 and then do search
on that record set?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum