Hello,
I use SAS in pc and mainframe.
I have 3 JCL FILES at mainframe under AAAAAAAA.BBBBBBBB.MYLIBS.PDS
I want to transfer the three jcl files(please note, I want transfer regular files, not SAS dataset) from mainframe to my pc. please help me on my code:
LIBNAME pc_lib "C:\TEMP5"; %connect(...,...);/*a macro can connect to mainframe*/ rsubmit remote=abasa; libname M_lib "AAAAAAAA.BBBBBBBB.MYLIBS.PDS"; proc download inlib=M_lib outlib=pc_lib; run; endrsubmit; signoff;
Thanks!
What help do you want?
Did you get an error, warning or no result ? POST the LOG with the submitted code. XXXX out any sensitive bits before posting though.
You should be able to use FTP to transfer the members of a Mainframe PDS the same way that you can transfer individual files from a directory on windows or linux computer. You should be able to use cd command and/or the mget command.
cd AAAAAAAA.BBBBBBBB.MYLIBS.PDS
mget *
or
mget AAAAAAAA.BBBBBBBB.MYLIBS.PDS(*)
That said you can use PROC DOWNLOAD to copy the files. There is even an example in the documentation.
Basically make a local fileref that points to the folder you want to write the files and a remote fileref that points to the PDS.
filename locdir 'some_local_directory';
rsubmit;
filename inpds 'mfhost.sas.programs' shr;
proc download infile=inpds('*') outfile=locdir;
run;
endrsubmit;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.