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
 

 

how to get generation number in of a GDG in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to get generation number in of a GDG in JCL
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 07, 2009 12:31 pm    Post subject:
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    Post subject: Reply to: how to get generation number in of a GDG in JCL
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 07, 2009 12:43 pm    Post subject:
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    Post subject: Reply to: how to get generation number in of a GDG in JCL
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    Post subject: Reply to: how to get generation number in of a GDG in JCL
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

Senior Member


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

PostPosted: Thu Oct 08, 2009 11:15 am    Post subject:
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    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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts CPU time Vs Number of records Nileshkul JCL & VSAM 5 Mon May 09, 2016 4:05 pm


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