BookmarkSubscribeRSS Feed
mmehr3
Calcite | Level 5

Hi,

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.

-Thanks

Mohit

4 REPLIES 4
Tom
Super User Tom
Super User

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?

https://groups.google.com/forum/#!topic/bit.listserv.ibm-main/jYS29gyG310

mmehr3
Calcite | Level 5

Hi Tom,

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.

-Regards

  Mohit

SASKiwi
PROC Star

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.

ravi_paradkar
Calcite | Level 5

Create macro loop from 1 to 50 like

%macro loop ;

%do i=1 %to 50;

libname X1&i. " GDG name (&I.)" disp=shr;

data test;

   set X1&i;

run;

so on..

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3109 views
  • 1 like
  • 4 in conversation