Dear all,
I am trying to write a code with Proc Import to import a *.txt file, in which there is a variable containing "card numbers" (field name: [T:L:100]CARD_NO) with 16 digits. However, after importing, the values showed in the variable are numeric as "4.69672E15". Please help to instructing me to:
PROC IMPORT OUT= WORK.PORTFOLIO_TODAY
DATAFILE="&rprt_cust_info.CC Customer Info &RPRT_TODAY..TXT"
DBMS=DLM REPLACE;
GETNAMES=YES;
GUESSINGROWS=10000;
DELIMITER="09"X;
RUN;
1/ Keep the format of the variable as "character" when importing instead of changing the format with "data steps" after the importing.
or
2/ Import all the variable as "character" format.
Thank you so much.
As @Reeza already explained how to solve the problem, i'd like to add one thing: switch of caps-lock when writing code. All those uppercase chars reduce readability.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.