BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to read 3 previous versions of SAS GDG files in SAS(I am Using JCL to RUN).
6 REPLIES 6
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Just to be clear here, are you referencing the use of SAS Generation Data Sets as Cynthia referenced or MVS (IBM mainframe) GDG (Generation Data Group) datasets using your JCL? If MVS GDG is correct, the next question would be to ask whether you have the SAS GDG "data library" on disk or is your SAS GDG "sequential format" data on tape?

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Hi,

MVS GDG is correct and SAS GDG "sequential format" data on tape.


Narayana
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
If you wish to process all of the SAS observations together, you must combine them together in a DATA step, using a SET statement with each JCL DDNAME defined uniquely in your batch JCL.

Also, if you want to minimize the number of tape drive allocations, you can use a combination of the UNIT=AFF=ddname JCL DD parameter and also use the OPEN=DEFER parameter on SET.

Refer to the SAS z/OS Companion Guide and the LIBNAME statement discussion on concatenation.

Scott Barry
SBBWorks, Inc.

SAS 9.1.3 Companion for z/OS
http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/base_zoscom_8406.pdf
deleted_user
Not applicable
Thanks Barry

You mean to say like the followig code? If not Please give me sample code.
Data Test;
Set lib1.file1
lib2.file2
lib3.file2;
Run;

//lib1 DD DSN=VXXXXX.Test.File1.V00,Disp=SHR
//lib2 DD DSN=VXXXXX.Test.File2.V01,Disp=SHR
//lib3 DD DSN=VXXXXX.Test.File3.V02,Disp=SHR
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Yes - correct, however you will use 3 tape drives even though you only need 1.

Again, from my previous reply, consider using the JCL DD parameter UNIT=AFF= and also the OPEN=DEFER on the SET statement, both coded for efficiency / optimization.

And you will want to confirm the SAS dataset name on the tape with PROC CONTENTS -- do not presume the names are "file1" and "file2".

My suggestion: setup the JCL batch jobstream and submit it - you will see the results of your efforts.

Scott Barry
SBBWorks, Inc.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 2195 views
  • 0 likes
  • 3 in conversation