Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Separate the results of SRCHFOR Option for different String

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Fri Feb 19, 2010 11:38 am    Post subject: Separate the results of SRCHFOR Option for different String
Reply with quote

I have one step in JCL that is using ISRSUPC program for searching the given keywords, this steps list out the member of specified PDS that contain the gievn keyword and write into in a sequential file.
This result is combined result of all keyword.
I need to seperate the result for each keyword.
Each time No. of keyword may vary.

Please give me suggesion if you have any.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 19, 2010 12:32 pm    Post subject:
Reply with quote

Works good for me ................
Code:
PARM=(SRCHCMP,'ANYC',IDPFX,XREF)
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Fri Feb 19, 2010 12:53 pm    Post subject:
Reply with quote

ya. it is working good,
But i want only the member name for the string, Nothing else,
it showing some unwanted data also.
Could you please suggest.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Feb 19, 2010 8:09 pm    Post subject:
Reply with quote

Quote:
it showing some unwanted data also.
Show us that outout from superc step(ISRSUPC).
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 19, 2010 8:14 pm    Post subject:
Reply with quote

Hello,

Quote:
Show us that outout from superc step(ISRSUPC).
And explain why it is a problem if there is some extra data.

If the output has more than is wanted, can it not simply be ignored when "read" by some other process. . .?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Feb 19, 2010 9:07 pm    Post subject:
Reply with quote

dick scherrer wrote:
And explain why it is a problem if there is some extra data.
That would be intresting to know.

Once they asked me to search some files in base-line PROC library and wanted just the name of PROCs - I had to play with the sort-tricks then...icon_smile.gif
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 10:12 am    Post subject:
Reply with quote

Code:
----- STRING="CHECK"                                                   
FINAL112     214  016494                 PERFORM 5000-CHECK-AMBS-HEADER
FINAL112     362  023010 5000-CHECK-AMBS-HEADER.                       
FINAL214     209  016411         PERFORM D2000-CHECK-AMBS-HEADER       
FINAL214     210  016412            THRU D2000-CHECK-AMBS-HEADER-EXIT 
FINAL214     219  016486            PERFORM D2000-CHECK-AMBS-HEADER   
FINAL214     220  016487               THRU D2000-CHECK-AMBS-HEADER-EXI
FINAL214     235  017401 D2000-CHECK-AMBS-HEADER.                     
FINAL214     256  017422 D2000-CHECK-AMBS-HEADER-EXIT.                 
GSCI200      704  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE
GSCI200C     704  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE
GSCI300      518  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE
GSC6100      610  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE
LISTJOB       13  SRCHFOR  'CHECK'                                     
MSG823        10  %                       SUCCESSFUL CHECK REPORTS     
----- STRING="REPORT"                                                 
BKCPAN08     116   IMPQFOUT = 'DGCVPG1.CMS1.SUNIL.REPORT.PS'           
BKCPAN08     174   IMPQFOUT = 'DGCVPG1.CMS1.SUNIL.REPORT.PS'           



My requirement is only to get member name in PDS for different string.
In above results i want only FINAL112, FINAL214,GSCI200,GSCI200C...For String "CHECK"
and BKCPAN08 and BKCPAN08 for STring "REPORT"

Except this i am also getting Header and footer that is not desired.
Please suggest me to remove duplicasy also.

Your suggestion is valuable for me.
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 10:17 am    Post subject:
Reply with quote

Extra data is a problem because i need to perform some action on these members. if these data are listed properly under a given string than i just need to read the file and can perform some action on members.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 22, 2010 10:20 am    Post subject:
Reply with quote

Hello,

Simply pass that "output" into another process that will retaiin the search string info and only 1 of each "key".

This probably can be done with your sort product or by writing an incredibly trivial bit of program code. . .
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 10:26 am    Post subject:
Reply with quote

Could you please eloberate your suggesion.
As per my understanding, i need to create one process that will filter out require data. For this which utility i should use.
What i need to do to remove column 9 to 80 and Hedater-footer.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Feb 22, 2010 11:27 am    Post subject:
Reply with quote

Hi,

which sort product are you using ?


Gerry
Back to top
View user's profile Send private message
sunil kumar purohit

New User


Joined: 10 Sep 2009
Posts: 37
Location: bangalore

PostPosted: Mon Feb 22, 2010 11:31 am    Post subject:
Reply with quote

Hi,
I am using DFSORT.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Feb 22, 2010 11:54 am    Post subject:
Reply with quote

Hi,

something like this might assist

Code:
//SELECT   EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTOUT  DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
----- STRING="CHECK"                                                   
FINAL112     214  016494                 PERFORM 5000-CHECK-AMBS-HEADER
FINAL112     362  023010 5000-CHECK-AMBS-HEADER.                       
FINAL214     209  016411         PERFORM D2000-CHECK-AMBS-HEADER       
FINAL214     210  016412            THRU D2000-CHECK-AMBS-HEADER-EXIT   
FINAL214     219  016486            PERFORM D2000-CHECK-AMBS-HEADER     
FINAL214     220  016487               THRU D2000-CHECK-AMBS-HEADER-EXI
FINAL214     235  017401 D2000-CHECK-AMBS-HEADER.                       
FINAL214     256  017422 D2000-CHECK-AMBS-HEADER-EXIT.                 
GSCI200      704  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE 
GSCI200C     704  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE 
GSCI300      518  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE 
GSC6100      610  //*             DONE, CHECK PROGRAM AROFIL1.  IF THE 
LISTJOB       13  SRCHFOR  'CHECK'                                     
MSG823        10  %                       SUCCESSFUL CHECK REPORTS     
----- STRING="REPORT"                                                   
BKCPAN08     116   IMPQFOUT = 'DGCVPG1.CMS1.SUNIL.REPORT.PS'           
BKCPAN08     174   IMPQFOUT = 'DGCVPG1.CMS1.SUNIL.REPORT.PS'         
//SYSIN    DD *                                                     
  SORT FIELDS=(1,8,BI,A)                                             
  SUM FIELDS=NONE                                                   
  INCLUDE COND=(16,1,FS,EQ,NUM,&,                                   
                17,2,CH,EQ,C'  ')                                   
  OUTFIL BUILD=(1,8,80:X)                                           
/*                                                                   


Gerry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us