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

how to get generation number in of a GDG in JCL


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

New User


Joined: 21 Apr 2009
Posts: 12
Location: philippines

PostPosted: Wed Oct 07, 2009 12:29 pm
Reply with quote

dear experts,
im coding a program that will send out a report to certain users if a specific gdg file met the duplication tolerance level. i have coded the program logic correctly, it's just that, i need to include the generation number of the GDG in the automated email that will be sent.

example : file is PROD.A123-001.G12345V00 has met the duplication tolerance, i need the "G12345V00" appear in the email that will be sent prior to job completion.

please help.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 07, 2009 12:31 pm
Reply with quote

What language is the program written in.

Also search the forum because there are some good examples of code that chases the z/OS control blocks for this information.
Back to top
View user's profile Send private message
beck19

New User


Joined: 21 Apr 2009
Posts: 12
Location: philippines

PostPosted: Wed Oct 07, 2009 12:33 pm
Reply with quote

program is written in COBOL. i have searched and found LISTC option, but that doesnt give me what i need....

thanks,
beck
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 07, 2009 12:43 pm
Reply with quote

try this http://www.ibmmainframes.com/viewtopic.php?t=35300
Back to top
View user's profile Send private message
beck19

New User


Joined: 21 Apr 2009
Posts: 12
Location: philippines

PostPosted: Wed Oct 07, 2009 12:58 pm
Reply with quote

ok. thanks expat. i will reply with feedback as soon as i get a result.....
Back to top
View user's profile Send private message
beck19

New User


Joined: 21 Apr 2009
Posts: 12
Location: philippines

PostPosted: Thu Oct 08, 2009 9:10 am
Reply with quote

i was able to get the generation number and use it in the file using IDCAMS..
here is my code :

Code:

//STEP10  EXEC PGM=IDCAMS                                               
//DD1       DD DSN=TEST.FILEA.G123-001(0),DISP=SHR                       
//SYSPRINT  DD   DSN=TST.G000-001,UNIT=SYSDA,                           
//             SPACE=(CYL,(20,20),RLSE),RECFM=VBA,                     
//             LRECL=125,BLKSIZE=0,                                     
//             DISP=(,PASS)                                   
//SYSIN     DD *                                                       
 PRINT INFILE(DD1) COUNT(0) CHAR                       
/*                 
//*--------------------------------------------------------------------*
//STEP11      EXEC PGM=SORT                         
//SYSOUT      DD   SYSOUT=*
//SYSIN       DD   *                                                   
  OPTION COPY                                                     
  OUTREC FIELDS=(1:1,4,5:27,26)                                         
  INCLUDE COND=(27,13,CH,EQ,C'TEST.FILEA.G123-001')
/*
//SORTIN      DD   DSN=TST.G000-001,DISP=SHR                           
//SORTOUT     DD   DSN=TST.G000-002,UNIT=SYSDA,         
//             SPACE=(CYL,(20,20),RLSE),
//             DISP=(,CATLG,DELETE)               


my output looks like this

Code:

TEST.FILEA.G123-001.G6200V00                                                     


which is the current generation of the GDG file i was referencing.

this forum is VERY useful!!! thanks experts!!!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Oct 08, 2009 11:15 am
Reply with quote

Quote:
this forum is VERY useful!!! thanks experts!!!
I take it for me and as 'am changing my shop today, so I'll drink to that... icon_biggrin.gif
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 Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
Search our Forums:

Back to Top