BookmarkSubscribeRSS Feed
kumarsandip975
Pyrite | Level 9

Dear Members,

 

Can you please help how to create mainframe dataset through data step on SAS STUDIO.

Note: I have already remote signon macro where I can login mainframe platform and code data step inside rsubmit/endrsubmit.

 

Code sample:

%remote_signon();

Rsubmit;
LIBNAME LIB1 "MAINFRAME.PDS" ;
Data LIB1.TEST1;
Var1="ABCD";
run;
Endrsubmit ;

4 REPLIES 4
Tom
Super User Tom
Super User

Did that work?  If not then what error messages did you get?

SASKiwi
PROC Star

It's been many years since I last used SAS on a mainframe, but I don't think you use PDSs (Partitioned Datsets) to store SAS datasets. From recollection you use normal sequential files. Here's the type of LIBNAME I'd expect to see:

libname newlib 'abc.my.saslib' disp=(new,catlg);
Kurt_Bremser
Super User

Libraries on a mainframe have to be partitioned sets, otherwise you would not have a means to find individual datasets quickly, or update them without having to rewrite the whole library.

 

PS it seems that mainframe SAS today mainly uses the UNIX-style filesystem, where a library is a directory. Which would imply that one has to use a UNIX absolute path for the LIBNAME to work.

SASKiwi
PROC Star

@Kurt_Bremser - After some research I found this very helpful reference regarding mainframe SAS libraries: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hosto390/p0zcnanujjomx7n16r8vajm70x0s.htm

 

It appears z/OS SAS library files are analogous to z/OS PDSs but are not the same.  z/OS PDSs use a DSORG of PO while SAS library files use DSORG of PS.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1615 views
  • 0 likes
  • 4 in conversation