05-21-2015 02:51 PM
I have a mainframe GDG file with about 50 generations and I need to read all of those through SAS on Unix.
Could you please tell me of a way through which I may just need to mention the infile statement once for the GDG base and it may read all of the generations of the g of that GDG.
05-21-2015 02:58 PM
Not sure I understand the question. Doesn't the JCL take care of what generation it reads. Do you want exact 50 or all generations.
Does this thread help?
05-21-2015 03:18 PM
Thanks for your prompt response... The files I want to read are on mainframes(all generations of a GDG) but my SAS process and jobs are in UNIX environment through which I need to read all these files hence I can not do it through JCL.
05-21-2015 03:33 PM
It's been a few years since I last touched a mainframe but you can use the SAS FILENAME statement to allocate GDGs just like JCL:
filename GDG 'name1.gdg' disp = shr; or filename GDG 'name1.gdg(0)' disp = shr; if you just want a single generation.
05-22-2015 05:33 AM
Create macro loop from 1 to 50 like
%macro loop ;
%do i=1 %to 50;
libname X1&i. " GDG name (&I.)" disp=shr;