|
View previous topic :: View next topic
|
| Author |
Message |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
Hello..I'm having a PDS of 300 eazytries, and I have to search these eazytrieves in a PDS of 500 JCLs. Is there any way to automate it?..
I saved the Eazytrieve member list as PS file and thinking of ISRSUPC utility, but I'm not finding correct way to automate it. Any suggestion would be really helpful. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10902 Location: italy
|
|
|
|
| what happened when you googled for srchfor multiple strings |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
I found this answer..
Change the string in SRCHFOR with the files you want to search & string in SELECT with the JOB names...just a JCL from 3.14 & modified for my needs.
Code:
//SEARCH EXEC PGM=ISRSUPC, *
// PARM=(SRCHCMP,
// 'ANYC')
//NEWDD DD DSN=XXXX.XXXXXX.JCLLIB,
// DISP=SHR
//OUTDD DD DSN=XXXXXX.FIANLIST.PROC.JOB,DISP=(,CATLG,CATLG)
//SYSIN DD *
SRCHFOR 'AGPROIND,AGPROIND'
SRCHFOR 'AGPROFLG,AGPROIND,AGRTRPRT,AGSETA,AGSETP,AGSETT,KOD505,LCD160'
SRCHFOR 'LCD160W,LFUSDA30,LFUSDA4P,LFUSDA40,LFUSDA50,LFUSDA60,LFUSDB40'
SRCHFOR 'LFUSDE30,LFUSDN30,LFUSDT30,LFUSIA90,LFUSIB90,LFUSIC90,LGGFDA60'
SRCHFOR 'LGUADA40,LGUADD40,LGUFDD40,LGUGDD40,LGUJDA40,LGUKDC40,LGUKDC41'
SRCHFOR 'LGULDC41,LGUSDA40,LGUSDA41,LGUSDA42,LGUSDA50,LGUSDA60,LGUSDA61'
SRCHFOR 'LGUSDB40,LGUSDB41,LGUSDD40,LGUUDA41,LGUXDA42,MBD110K,NJUSW25'
SRCHFOR 'PFUSI30,PF0KM028,QLC400,QLD145,QLD145,QLD150,QLD175,QLD400'
SRCHFOR 'QLD400T,QLI151,QLW200,QLW230,QLW300,QLW301,WN0KD010'
SELECT $JTWTEMP,@ESFDR,@JTJEGJB,@JTWCMPA,@JTWCMPC,@JTWCOMP
SELECT @PRINT,ABD00000,ABD10000,ABM13000,ABM20XCM,ABM20000
SELECT ABM60000,ABM61000,ABM62000,ABRT4700,ABR11000,ABR12000
SELECT ABR13000,ABR13001,ABR19000,ABR21000,ABR23000,ABR25000
SELECT ABR26000,ABR27000,ABR29000,ABR40000,ABR40500,ABR41000
SELECT ABR42001,ABR42002,ABR43000,ABR43600,ABR44000,ABR44300
/* |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
This is my current JCL..
//SEARCH EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//*
//NEWDD DD DSN=Dataset.JCL,DISP=SHR
//*
//OUTDD DD SYSOUT=*
//SYSIN DD DSN=PS Input File
SRCHFOR 'String'
/*
so, is it possible to read each record from PS file and search in the PDS library? |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2283 Location: USA
|
|
|
|
| First of all, this question is neither JCL, nor VSAM... |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
It's a Jcl!!!!!!!  |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
| Please do help in giving suggestions on what could be done. If I find any logic, then I'll definitely post back the Jcl here so that it would help others. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2283 Location: USA
|
|
|
|
| appu9jain wrote: |
It's a Jcl!!!!!!!  |
If you really suppose this is a JCL, I would suggest you to start learning IT from the beginning...
Everything here is related to zOS utilities, or Other IBM Tools. Nothing to do with JCL, at all...  |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2283 Location: USA
|
|
|
|
| appu9jain wrote: |
| so, is it possible to read each record from PS file and search in the PDS library? |
There are about 100500 ways to do this, if you have ever learned ANY zOS programming tools.
1) use DFSORT/SYNCSORT utilities
2) use FileAid utility
3) use any other text-manipulating utility
4) use any script in REXX/CLIST
5) use any program in COBOL, C/C++, PL/I, Assembler, 100,000 other tools
... etc. etc. etc... |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
| Cant post the complete JCL with full Job cards for security purposes, so I have posted only from EXEC. And we know that there are utilities to search the elements, but the requirement is to develop a JCL to search more number of elements like- to search 300 elements in a PDS of 500 JCLs. if anyone has any suggestions it would be really helpful, than pointing other things. |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 774 Location: Denmark
|
|
|
|
I am confused, as you write
//SYSIN DD DSN=PS Input File
which does take its input from a dataset as you requested.
However the proper syntax for appending instream data to a dataset in JCL is:
//SYSIN DD DSN=PS Input File
// DD *
SRCHFOR 'String' |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
Yeah your right, sry I missed mentioning..below is the JCL
//SEARCH EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC')
//*
//NEWDD DD DSN=Dataset.JCL,DISP=SHR
//*
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'String'
/*
So instead of passing any single string to SRCHFOR, I have a PS File with list of 300 strings that has to be searched in PDS of NEWDD. I need help in knowing if there is any way to pass value from Cobol to JCL and search each string after every read of PS. |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 774 Location: Denmark
|
|
|
|
You cannot pass info to JCL as such, you can generate records in a program in one JCL step which will be read by a program in a following JCL step. Or you can generate the entire job and write it to internal reader for submission.
In your case I think I would change the whole thing into a REXX program, which can call SUPERC and post-processing as many times as needed. |
|
| Back to top |
|
 |
appu9jain
New User
Joined: 07 Jun 2021 Posts: 15 Location: India
|
|
|
|
I agree, it makes sense. Thank you . I will try as you mentioned and post back here. thanks again |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|