05-10-2017 03:45 PM - edited 05-10-2017 03:47 PM
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;
05-10-2017 03:52 PM
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.
05-10-2017 04:08 PM
05-15-2017 12:14 PM - edited 05-15-2017 12:40 PM
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 *
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;