IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to search multiple members of a PDS in another PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Mon Jun 07, 2021 3:48 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10796
Location: italy

PostPosted: Mon Jun 07, 2021 3:59 pm
Reply with quote

what happened when you googled for srchfor multiple strings
Back to top
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Mon Jun 07, 2021 4:12 pm
Reply with quote

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
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Mon Jun 07, 2021 4:25 pm
Reply with quote

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
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Mon Jun 07, 2021 7:28 pm
Reply with quote

First of all, this question is neither JCL, nor VSAM...
Back to top
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Mon Jun 07, 2021 7:30 pm
Reply with quote

It's a Jcl!!!!!!! icon_rolleyes.gif
Back to top
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Mon Jun 07, 2021 7:34 pm
Reply with quote

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
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Tue Jun 08, 2021 1:29 am
Reply with quote

appu9jain wrote:
It's a Jcl!!!!!!! icon_rolleyes.gif

If you really suppose this is a JCL, I would suggest you to start learning IT from the beginning... 358.gif

Everything here is related to zOS utilities, or Other IBM Tools. Nothing to do with JCL, at all... 12.gif
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1140

PostPosted: Tue Jun 08, 2021 1:42 am
Reply with quote

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
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Tue Jun 08, 2021 10:26 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 480
Location: Denmark

PostPosted: Tue Jun 08, 2021 12:48 pm
Reply with quote

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
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Tue Jun 08, 2021 12:59 pm
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 480
Location: Denmark

PostPosted: Tue Jun 08, 2021 1:08 pm
Reply with quote

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
View user's profile Send private message
appu9jain

New User


Joined: 07 Jun 2021
Posts: 10
Location: India

PostPosted: Tue Jun 08, 2021 1:11 pm
Reply with quote

I agree, it makes sense. Thank you icon_smile.gif. I will try as you mentioned and post back here. thanks again
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. How to search multiple strings in a PDS IBM Tools 3
No new posts Combining Multiple Row Values into Si... DB2 3
No new posts SORT - Multiple Conditions DFSORT/ICETOOL 4
No new posts How to submit multiple jobs with parm... JCL & VSAM 3
No new posts rexx pgm to create multiple ps file IBM Tools 7
Search our Forums:

Back to Top