Writting into Mainframe GDG

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Writting into Mainframe GDG

Post by mydsworld »

Please let me know whether DataStage can write into a Mainframe GDG or not. If yes, then how to do that.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

did you try the FTP stage
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post 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.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

simplest will be generating a sequential file and then FTP to the GDG
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post 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.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post 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 ?
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

1. After FTP , for the GDG parameter

2. Yes, If you was new version of GDG the <GDG NAME>(+1)
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post 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)
at095nb
Participant
Posts: 9
Joined: Fri Mar 25, 2005 1:43 pm

Re: Writting into Mainframe GDG

Post 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.
at095nb
Participant
Posts: 9
Joined: Fri Mar 25, 2005 1:43 pm

Re: Writting into Mainframe GDG

Post by at095nb »

Sorry, I was sloppy.
RECFM means RECord ForMat. In your case it's Variable Block.
Post Reply