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 ;
Did that work? If not then what error messages did you get?
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);
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.
@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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.