Created
November 10, 2023 21:28
-
-
Save statgeek/c88586561ba3d120844c350f4ef3145c to your computer and use it in GitHub Desktop.
Revisions
-
statgeek created this gist
Nov 10, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ *path to the zip file; filename src zip "/home/fkhurshed/Demo2/P_DR2IFF.zip"; *path to where to save the xpt file; filename xl "/home/fkhurshed/Demo2/P_DR2IFF.xpt" ; *extract file from zip - P_DR2IFF.XPT in the code below is the name of the file in the zipped file that is to be extracted; data _null_; /* using member syntax here */ infile src(P_DR2IFF.XPT) lrecl=256 recfm=F length=length eof=eof unbuf; file xl lrecl=256 recfm=N; input; put _infile_ $varying256. length; return; eof: stop; run; *where to store the SAS dataset; libname projfile '/home/fkhurshed/Demo2/'; *XPT file (same as filename xl as above); libname xptfile xport '/home/fkhurshed/Demo2/P_DR2IFF.xpt' access=readonly; *extract the SAS dataset from the XPT file; proc copy inlib=xptfile outlib=projfile; run;