Now I have a acustomer list D:\cust_list.txt,and this text has one column "party_no"(the max length is 22),and the first row of this txt is column name.Please tell me how to import it to library 'puball' with data step.
thanks!
Two minor changes to the code posted by @VDD:
filename datain "D:\cust_list.txt";
libname puball "....";
data pubull.want;
infile datain firstobs=2;
input @1 party_no $22.;
run;
In production jobs i always recommend not to overwrite a permanent dataset with an importing step, but to store the imported data in a temporary dataset first and copy the dataset to the library after it has been verified that the import was successful.
this should give you want you asking for.
filename datain "D:\cust_list.txt";
data want;
infile datain;
input @1 party_no $22.;
run;
Two minor changes to the code posted by @VDD:
filename datain "D:\cust_list.txt";
libname puball "....";
data pubull.want;
infile datain firstobs=2;
input @1 party_no $22.;
run;
In production jobs i always recommend not to overwrite a permanent dataset with an importing step, but to store the imported data in a temporary dataset first and copy the dataset to the library after it has been verified that the import was successful.
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.