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

Separate the results of SRCHFOR Option for different String


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Feb 19, 2010 12:32 pm
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
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

Superior Member


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

PostPosted: Fri Feb 19, 2010 8:09 pm
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

Moderator Emeritus


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

PostPosted: Fri Feb 19, 2010 8:14 pm
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

Superior Member


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

PostPosted: Fri Feb 19, 2010 9:07 pm
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
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
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

Moderator Emeritus


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

PostPosted: Mon Feb 22, 2010 10:20 am
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
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: 1702
Location: Australia

PostPosted: Mon Feb 22, 2010 11:27 am
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
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: 1702
Location: Australia

PostPosted: Mon Feb 22, 2010 11:54 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
Search our Forums:

Back to Top