The syntax of proc copy is:
proc copy in=<input_library> out=<output_library>;
select <dataset names separated by space>;
run;
What you wanted to do is probably:
data dataout;
set transprt;
run;
I wanted to import CDBRFS10.XPT file to SAS and used the following code. I keep getting the error that physical file does not exist.
LIBNAME TRANSPRT XPORT 'C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT';
LIBNAME DATAOUT 'C:\Users\Zahid Hasan Dipu\Document';
PROC COPY IN=TRANSPRT OUT=dataout;
RUN;
According to error message"
ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT.
it seems to me that you need to copy or move the file:
C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT
to next location using OS tools:
/pbr/biconfig/940/Lev1/SASApp/
then adapt the libname of transprt
LIBNAME TRANSPRT XPORT '/';
or something alike, depending on your sas platform.
using SAS UE it would be:
LIBNAME TRANSPRT XPORT '/folders/myfolders/...';
@zahidhasandipu wrote:
/pbr/biconfig/940/Lev1/SASApp/
This file path, is it in C drive? I do not find any pbr folder, I am so sorry to bother you!
This path is the Current Working Directory of your SAS session; you should not have write permission there (unless the SAS installation is seriously misconfigured).
The directory where you surely do have write permission is your personal home directory on the server, represented by the system environment variable $HOME; this usually corresponds to the Home you find (below Libraries) when you open your server in EG's server list.
@Shmuel wrote:
/pbr/biconfig/940/Lev1/SASApp/
If a user running a workspace server can actually write there, the SAS admin has fucked up big time; this is the SASApp configuration directory, where end users must have read and execute permissions only.
@Kurt_Bremser , it was my failure not to associate the /pbr/... path to the work space.
So I agree with you that file should be copied to some owner's directory.
In case it is not SAS Enterprise Guide environment but a personal computer, the owner may need sometimes the admin privilege - as in next case: when sas blew you out of session the worksapce folder remains, while at normal exit it is deleted. I had such issues in the past and once in a time I had to delete old sas work folders in order to free disk space. Unix/Linox did not allow me to delete a current sas work folder.
Your SAS runs on a UNIX (most probably Linux) server, so you have to use UNIX style syntax to address files.
It also has no access to resources of your computer, so it can't find any files on the C: drive, for example.
Enterprise Guide provides the Copy Files task to move files between the environments, so you best use that to move the file to the server (ideally direct to your Home directory), where you can then use
$HOME/CDBRFS10.XPT
in your code.
What does the subject title of the post "Categorical Data methods" have to do with the content?
The subject should relate transport files as there is absolutely nothing in the post about "data methods", categorical or otherwise.
@zahidhasandipu wrote:
I keep getting this error.1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 LIBNAME TRANSPRT XPORT 'C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT';NOTE: Libref TRANSPRT was successfully assigned as follows:Engine: XPORTPhysical Name: /pbr/biconfig/940/Lev1/SASApp/C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT7475 LIBNAME DATAOUT 'C:\Users\Zahid Hasan Dipu\Document';NOTE: Library DATAOUT does not exist.7677 PROC COPY IN=TRANSPRT OUT=dataout;78 RUN;WARNING: Library DATAOUT does not exist.NOTE: Input library TRANSPRT is sequential.ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:\Users\Zahid Hasan Dipu\Desktop\CDBRFS10.XPT.NOTE: Statements not processed because of errors noted above.NOTE: PROCEDURE COPY used (Total process time):real time 0.00 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 509.75kOS Memory 29864.00kTimestamp 08/06/2020 06:46:28 AMStep Count 42 Switch Count 0Page Faults 0Page Reclaims 70Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 0Block Input Operations 0Block Output Operations 8NOTE: The SAS System stopped processing this step because of errors.7980 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;92
My bad. Didn't mean that just unintentionally mentioned the subject name of my course!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.