Hi,
I have a SAS dataset (.sas7bdat file) saved on network share. Using BASE SAS 9.4, can you please provide the syntax to PROC UPLOAD this file into A NEW MAINFRAME SAS file which I can then read using WPS utility in JCL.
The code I am using:
/* Signon to WPS Mainframe */
%let host1=mvsd1.XXXXXXX.co.uk;
options compress=yes;
Options remote=host1 set=tcptn3270 0;
filename rlink "o:\tso13_wps.txt";
Options COMAMID=TCP;
signon;
filename locref '\\ABC\xyz\aaa\ccc';
rsubmit;
filename fref 'VPMS.D06.CAM.DROPPED';
proc upload infile=locref('dropped_cam.sas7bdat')
outfile=fref;
run;
When I am running this code, I am getting the below error:
5 filename fref 'VPMS.D06.CAM.DROPPED';
ERROR: IKJ56228I DATA SET VPMS.D06.CAM.DROPPED NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
^
ERROR: Dynamic allocation failed -- dataset "VPMS.D06.CAM.DROPPED" does not exist
6 proc upload infile=locref('dropped_cam.sas7bdat')
7 outfile=fref;
8 run;
ERROR: INFILE= and OUTFILE= options are not supported for SAS/Connect Communicate protocol
NOTE: Procedure upload step took :
real time : 0.000
cpu time : 0.000
EXCP count: 0
Talk to your systems team about how to create a new file on your mainframe. You might just need to use DISP=NEW option.
Check out the Z/OS companion documentation from SAS. http://documentation.sas.com/?docsetId=hosto390&docsetTarget=n0yrspsfthx1w5n1gyt6rgzh3qsu.htm&docset...
If you are uploading a SAS dataset then you should be using these options. I'm assuming here you want your SAS dataset converted to mainframe format so it can be used by other mainframe SAS programs. If this is not the case please advise.
libname locref '\\ABC\xyz\aaa\ccc';
rsubmit;
libname lref 'VPMS.D06.CAM.DROPPED' disp = new;
proc upload data=locref.dropped_cam
out=lref.dropped_cam;
run;
endrsubmit;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.