The SAS Output Delivery System and reporting techniques

How to read previous 2 versions of SAS GDG files in SAS program?

Reply
N/A
Posts: 0

How to read previous 2 versions of SAS GDG files in SAS program?

I want to read 3 previous versions of SAS GDG files in SAS(I am Using JCL to RUN).
SAS Super FREQ
Posts: 8,862

Re: How to read previous 2 versions of SAS GDG files in SAS program?

Posted in reply to deleted_user
Super Contributor
Super Contributor
Posts: 3,174

Re: How to read previous 2 versions of SAS GDG files in SAS program?

Posted in reply to Cynthia_sas
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.
N/A
Posts: 0

Re: How to read previous 2 versions of SAS GDG files in SAS program?

Hi,

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


Narayana
Super Contributor
Super Contributor
Posts: 3,174

Re: How to read previous 2 versions of SAS GDG files in SAS program?

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: How to read previous 2 versions of SAS GDG files in SAS program?

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
Super Contributor
Super Contributor
Posts: 3,174

Re: How to read previous 2 versions of SAS GDG files in SAS program?

Posted in reply to deleted_user
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.
Ask a Question
Discussion stats
  • 6 replies
  • 966 views
  • 0 likes
  • 3 in conversation