BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dawn3
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

DISP=SHR sets the LIBNAME to read-only. Try DISP=OLD to write to an existing file.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

DISP=SHR sets the LIBNAME to read-only. Try DISP=OLD to write to an existing file.

Dawn3
Calcite | Level 5

Thanks SASKiwi! Yes, it works!.

SASKiwi
PROC Star

@Dawn3  - great to know. Haven't touched a mainframe in over 15 years but its surprising what you remember...Smiley Happy

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1392 views
  • 2 likes
  • 2 in conversation