MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG Version Number

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Mon Dec 06, 2004 12:55 pm    Post subject: GDG Version Number Reply with quote

Hi,

Can anyone help me with this scenario:

I have to transfer the current version of a GDG dataset on daily basis using Connect:Direct.

The Connect:Direct requires &DSNT parameter, which points to the destination directory and member name.

The receiving end of my dataset is not using mainframes and they receive the file on Windows, so there is no concept of GDG's there. They have a requirement to receive the unique file names daily.

We can make the dataset name unique either by using the current date or the GDG Version.

Can anyone please suggest me that how can I achieve this.

Is there a way to get the GDG dataset name in the JCL and use the same name while trasferring the dataset.
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Dec 06, 2004 1:01 pm    Post subject: Reply with quote

Programmer1,

Please search before posting. This has been discussed earlier. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=138&highlight=endrec+gdg

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Mon Dec 06, 2004 1:46 pm    Post subject: Reply with quote

kolusu,

Thanks for the link. This post will help me getting the GDG name in a dataset.

Can you please suggest me that how can I use this name while writing the C : D parameters. (Connect Direct Parameters).
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Dec 06, 2004 1:53 pm    Post subject: Reply with quote

Programmer1,

Post your sample Connect Direct parameters and I will show you how to do it in sort.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Dec 06, 2004 1:53 pm    Post subject: Reply with quote

You also have available, of course, the CONNECT:Direct process variables for submission date/time values:

%JDATE - YYYYDDD
%SUBDATE - CYYMMDD
%SUBDATE1 - YYYYMMDD
%SUBDATE2 - YYYYDDMM
%SUBDATE3 - MMDDYYYY
%SUBDATE4 - DDMMYYYY
%SUBTIME - HHMMSS

all of which are documented in the appropriate Process Guides.
Back to top
View user's profile Send private message
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Mon Dec 06, 2004 2:22 pm    Post subject: Reply with quote

Hi,

Here is my C : D code:

//SYSUT1 DD *
SIGNON ESF=YES
SUBMIT CASE=YES -
PROC=COPY5 -
SNODE=TECUSD01 -
&NODEF=PNODE -
(&DSNF='My.GDG.To.Transfer(0)' -
&SYSOPTS='DATATYPE(BINARY) XLATE(NO)' -
(&DSNT='D:\ACCOUNT\DB\My.GDG.To.Transfer.G0001v06' -
&SYSOPTS='DATATYPE(BINARY)' -
&DISPT=NEW -
&ASCB=@@@@@@@@ &ECB=######## -
&COMPRESS=
SIGNOFF
/*

Now I want to avoid hard coding My.GDG.To.Transfer.G0001v06, which is the latest generation of the GDG My.GDG.To.Transfer
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Dec 06, 2004 2:52 pm    Post subject: Reply with quote

Programmer1,

Try this job.


Code:

//STEP0100 EXEC PGM=IKJEFT01                       
//*                                                 
//SYSTSPRT DD DSN=&L,                               
//            DISP=(,PASS),                         
//            SPACE=(CYL,(X,Y),RLSE),             
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)     
//SYSTSIN  DD *                                     
  LISTCAT ENT('GDG BASE NAME')                   
//*                                                 
//STEP0200 EXEC PGM=SORT           
//*                                 
//SYSOUT   DD SYSOUT=*               
//SORTIN   DD DSN=&L,DISP=(OLD,PASS)
//SORTOUT  DD DSN=YOUR NDM CONTROL CARDS,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1),RLSE)               
//SYSIN    DD *                     
  INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')
  INREC FIELDS=(1,80,SEQNUM,8,ZD)     
  SORT FIELDS=(81,8,ZD,D)             
  OUTFIL ENDREC=1,                                 
  OUTREC=(C'SIGNON ESF=YES',/,                     
          C'SUBMIT CASE=YES -',/,                   
          C'PROC=COPY5 -',/,                       
          C'SNODE=TECUSD01 -',/,                   
          C'&NODEF=PNODE -',/,                     
          C'(&DSNF=',                               
          C'''',                                   
          C'MY.GDG.TO.TRANSFER(0)',                 
          C'''',                                   
          C' -',/,                                 
          C'&SYSOPTS=',                             
          C'''',                                   
          C'DATATYPE(BINARY) XLATE(NO)',           
          C'''',                                   
          C' -',/,                                 
          C'(&DSNT=',                               
          C'''',                                   
          C'D:\ACCOUNT\DB\',                       
          17,44,                                   
          C'''',                                   
          C' -',/,                                 
          C'&SYSOPTS=',                             
          C'''',                                   
          C'DATATYPE(BINARY)',                     
          C'''',                                   
          C' -',/,                                 
          C'&DISPT=NEW -',/,                       
          C'&ASCB=@@@@@@@@ &ECB=######## -',/,     
          C'&COMPRESS=',/,                         
          C'SIGNOFF',80:X)                         
                                                   
/*                                                 



Hope this helps....

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Thu Dec 09, 2004 5:31 am    Post subject: Reply with quote

Thanks alot Kolusu & superk Smile
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group