Please how to update mainframe SAS dataset that is part of PDS (partitioned data set)?
Using PROC DOWNLOAD the content of the MF member gets downloaded to LAN. After another SAS process updates this dataset (.sas7bdat file) I need to upload the new content from LAN overwriting the original MF dataset. Using this method produced authorization error:
. . .
signon . . .;
RSUBMIT;
LIBNAME MFDAT 'AAA.BBB.CCC.SASDATA.A0100 ' DISP=SHR;
PROC UPLOAD DATA=TEST.SOURCE OUT=MFDAT.TARGET;
RUN;
LIBNAME MFDAT CLEAR;
ENDRSUBMIT;
Note that I do have proper authorization and the same statement above with:
LIBNAME MFDAT 'AAA.BBB.CCC.SASDATA.B0100 ' DISP=NEW;
does create new B0100 dataset. When I PROC Download it, change the content, and try to PROC Upload it with:
LIBNAME MFDAT 'AAA.BBB.CCC.SASDATA.B0100 ' DISP=SHR;
PROC UPLOAD DATA=TEST.SOURCE OUT=MFDAT.TARGET;
I receive the authorization error.
ERROR: Write access to member AAA.BBB.CCC.SASDATA.B0100 is denied.
The datasets are relatively small so space is not a problem.
The environment is z/OS, SAS 9.4 EG 5.1
Thanks a lot
DISP=SHR sets the LIBNAME to read-only. Try DISP=OLD to write to an existing file.
DISP=SHR sets the LIBNAME to read-only. Try DISP=OLD to write to an existing file.
Thanks SASKiwi! Yes, it works!.
@Dawn3 - great to know. Haven't touched a mainframe in over 15 years but its surprising what you remember...
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.