Page 1 of 1

Writting into Mainframe GDG

Posted: Fri Aug 01, 2008 7:21 am
by mydsworld
Please let me know whether DataStage can write into a Mainframe GDG or not. If yes, then how to do that.

Posted: Fri Aug 01, 2008 7:34 am
by keshav0307
did you try the FTP stage

Posted: Fri Aug 01, 2008 8:24 am
by mydsworld
I haven't tried, just wondering how we'll do that with FTP stage. Say, I have a family of GDG's called 'XYZ.ABC'. How do I use this in FTP stage.

Posted: Fri Aug 01, 2008 8:37 am
by keshav0307
simplest will be generating a sequential file and then FTP to the GDG

Posted: Fri Aug 01, 2008 8:42 am
by mydsworld
Thanks for your reply.

Could you plz tell me where shd I mention the GDG name in FTP stage, I think it is not in URI.

Posted: Fri Aug 01, 2008 8:45 am
by keshav0307
simplest will be generating a sequential file and then FTP to the GDG
for this use OS command line FTP, may be in a after job routine execute command..

example :
ftp -inv << EOF
open $vHost
user $vUsr $vPwd
quote site RECFM=VB LRECL=256
ascii
put $UnixFileName $vMVS
close
bye
EOF

Posted: Fri Aug 01, 2008 8:57 am
by mydsworld
Thanks again.

Please explain the following lines :

1. quote site RECFM=VB LRECL=256

Is it setting some parameter before FTP?

2. put $UnixFileName $vMVS

Is $vMVS the GDG name ?

Posted: Fri Aug 01, 2008 9:31 am
by keshav0307
1. After FTP , for the GDG parameter

2. Yes, If you was new version of GDG the <GDG NAME>(+1)

Posted: Fri Aug 01, 2008 9:53 am
by DSguru2B
FTP stage can very well handle it. In the remote file name provide the fully qualified name of the dataset, eg: 'xyz.abcd.aaaaaa.gdgname(+1)'. This way every time it will create a new generation on the mainframe.

Posted: Fri Aug 01, 2008 10:02 am
by mydsworld
I am very new to Mainframe & haven't come across this term GDG before.

Could you plz tell me :

1. What do these parameters RECFM=VB and LRECL=256 suggest.
2. What is meant by <GDG Name>(+1)

Re: Writting into Mainframe GDG

Posted: Fri Aug 01, 2008 11:18 am
by at095nb
RECFM means [u]REC[/u]ord [u]F[/u]or[u]M[/u]at. In this case it's [u]V[/u]ariable [u]B[/u]lock.
LRECL means record lenght. In this case it's = 256 bites
GDG means Generation Data Group - a collection of historical related data sets that are arranged in chronological order.
The name HLQ.ABCS.EFG(0) means current data set, the most recent existing file.
The numbers may go in both directions.
HLQ.ABCD.EFG(-1) means previous data set.
HLQ.ABCD.EFG(+1) means new data set.

Re: Writting into Mainframe GDG

Posted: Fri Aug 01, 2008 11:21 am
by at095nb
Sorry, I was sloppy.
RECFM means RECord ForMat. In your case it's Variable Block.