Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Searching in GDG and selecting the generation.

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

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Tue Dec 15, 2009 11:47 am    Post subject: Searching in GDG and selecting the generation.
Reply with quote

Have GDG's containing some date feild at the top. We should look for a particuler date and if found in any generation then we need to pick that generation of GDG and use in the later step of a job.
Can any one please help me in this regard.

Regards,
Kapil.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Dec 15, 2009 3:02 pm    Post subject: Reply to: Searching in GDG and selecting the generation.
Reply with quote

The best scenario I can think of is to, for each individual generation, run a search (the SuperC program) for the required date field, check the return-code (found/not-found) and apply that specific dataset name to the follow-up processing.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Tue Dec 15, 2009 3:15 pm    Post subject:
Reply with quote

Quote:
We should look for a particuler date and if found...
is this "particular date" always same?
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Tue Dec 15, 2009 3:38 pm    Post subject:
Reply with quote

@superK
I can check the date in GDG by giving sort card also and i will give GDG base while using the sort card for searching in all the generations.
but
after getting the required date value in GDG in any generation, how can i use that generation(which contain that date value) in later steps of my jcl.

@Anuj Dhawan
No, that date value we need to give in jcl and it will vary time to time.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Dec 15, 2009 3:56 pm    Post subject:
Reply with quote

Perhaps THIS topic may help you if you have DFSORT installed.
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Wed Dec 16, 2009 7:54 pm    Post subject:
Reply with quote

Hi all,
as per your suggestions i am getting this JCl which will be submitted ...
Code:

//STEP0100 EXEC  PGM=ICETOOL                   
//TOOLMSG  DD SYSOUT=*                         
//DFSMSG   DD SYSOUT=*                         
//OUT      DD DSN=DXY7B.ORDER.CYCDATE8,         
//            DISP=(OLD,CATLG,DELETE),         
//            UNIT=SYSDA,                       
//            SPACE=(CYL,(10,10),RLSE)         
//TOOLIN   DD *                                 
 COPY FROM(GDG001) TO(OUT) USING(C001)         
 COPY FROM(GDG002) TO(OUT) USING(C002)         
 COPY FROM(GDG003) TO(OUT) USING(C003)         
 COPY FROM(GDG004) TO(OUT) USING(C004)         
 COPY FROM(GDG005) TO(OUT) USING(C005)         
 COPY FROM(GDG006) TO(OUT) USING(C006)         
 COPY FROM(GDG007) TO(OUT) USING(C007)         
 COPY FROM(GDG008) TO(OUT) USING(C008)         
 COPY FROM(GDG009) TO(OUT) USING(C009)         
 COPY FROM(GDG010) TO(OUT) USING(C010)         
 COPY FROM(GDG011) TO(OUT) USING(C011)         
  COPY FROM(GDG012) TO(OUT) USING(C012)                                 
  COPY FROM(GDG013) TO(OUT) USING(C013)                                 
  COPY FROM(GDG014) TO(OUT) USING(C014)                                 
  COPY FROM(GDG015) TO(OUT) USING(C015)                                 
  COPY FROM(GDG016) TO(OUT) USING(C016)                                 
  COPY FROM(GDG017) TO(OUT) USING(C017)                                 
  COPY FROM(GDG018) TO(OUT) USING(C018)                                 
  COPY FROM(GDG019) TO(OUT) USING(C019)                                 
  COPY FROM(GDG020) TO(OUT) USING(C020)                                 
 //C001CNTL DD *                                                         
   INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
   OUTFIL FNAMES=OUT,REMOVECC,                                           
   HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5057V00                ')   
 //C002CNTL DD *                                                         
   INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
   OUTFIL FNAMES=OUT,REMOVECC,                                           
   HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5058V00                ')   
 //C003CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5059V00                ')   
//C004CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5060V00                ')   
//C005CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5061V00                ')   
//C006CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5062V00                ')   
//C007CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5063V00                ')   
//C008CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5064V00                ')   
//C009CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5065V00                ')   
//C010CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5066V00                ')   
//C011CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5067V00                ')   
//C012CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5068V00                ')   
//C013CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5069V00                ')   
//C014CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5070V00                ')   
//C015CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5071V00                ')   
//C016CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5072V00                ')   
//C017CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5073V00                ')   
//C018CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5074V00                ')   
//C019CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5075V00                ')   
//C020CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/24/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('STRING IN PXY0N.ORDER.CYCDATE.G5076V00                ')   
//GDG001   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5057V00                 
//GDG002   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5058V00                 
//GDG003   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5059V00                 
//GDG004   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5060V00                 
//GDG005   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5061V00                 
//GDG006   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5062V00                 
//GDG007   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5063V00                 
//GDG008   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5064V00                 
//GDG009   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5065V00                 
//GDG010   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5066V00                 
//GDG011   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5067V00                 
//GDG012   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5068V00                 
//GDG013   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5069V00                 
//GDG014   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5070V00                 
//GDG015   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5071V00                 
//GDG016   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5072V00                 
//GDG017   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5073V00                 
//GDG018   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5074V00                 
//GDG019   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5075V00                 
//GDG020   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5076V00


It is copying all the Text, defined in HEADER1 for every control card to output file DXY7B.ORDER.CYCDATE8.
As per my requirement:- if given condition in INCLUDE COND is getting match, then only it should copy the text given in its Header1 to output file.

Regards,
Kapil.
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Thu Dec 17, 2009 2:19 pm    Post subject:
Reply with quote

Hi all,
This is the simple JCl of the above post....

Code:

//STEP0100 EXEC  PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//OUT      DD DSN=DXY7B.ORDER.CYCDATE8,                                 
//            DISP=(OLD,CATLG,DELETE),                                 
//            UNIT=SYSDA,                                               
//            SPACE=(CYL,(10,10),RLSE)                                 
//TOOLIN   DD *                                                         
  COPY FROM(GDG001) TO(OUT) USING(C001)                                 
//C001CNTL DD *                                                         
  INCLUDE COND=(1,80,SS,EQ,C'11/25/09')                                 
  OUTFIL FNAMES=OUT,REMOVECC,                                           
  HEADER1=('HI                                                    ')   
//GDG001   DD DISP=SHR,DSN=PXY0N.ORDER.CYCDATE.G5058V00                 



Here i am NOT having "11/25/09" text at 1-8 position in PXY0N.ORDER.CYCDATE.G5058V00 file. but still i am getting "Hi" Text in DXY7B.ORDER.CYCDATE8 file.

My requirement is ,if Date is present in file PXY0N.ORDER.CYCDATE.G5058V00 then only i should get 'Hi' text in DXY7B.ORDER.CYCDATE8 file.

Please tell me where i am wrong.

Thanks In advance.

Regards,
Kapil.
Back to top
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Thu Dec 17, 2009 4:16 pm    Post subject:
Reply with quote

Hi Kapil,

I think you are almost there cross check the below code

Code:

INCLUDE COND=(1,80,SS,EQ,C'11/25/09') 


Is it 1,80 or 1,08. Check it out and let us know.
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Fri Dec 18, 2009 2:04 pm    Post subject:
Reply with quote

Hi karisurya,
Yes It is working now......


Thanks A lot 2 all of you. icon_smile.gif icon_smile.gif

Regards,
Kapil.
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 Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us