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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.