You still have not corrected your first data step.
Please READ my posts CAREFULLY, and copy the code AS I SUPPLY IT!
You obviously don't read what I post. I'm out of here.
Why are you including the DSD option on the INFILE statement when you INPUT statement is using formatted input to read specific columns? The DSD option is for handling delimited text, not fixed format text.
PS the fact that you're working on a computing dinosaur does not mean you must write ugly spaghetti code that hurts the eyes. Proper code formatting is a virtue on every platform.
Evidently, this problem is troublesome for you. So let's simplify the objective. You're trying to convert LS_ADDRESS_ID to character for printing purposes. Why bother? You have a numeric variable that holds the proper values. SAS knows how to print numeric values. Why not just use LS_ADDRESS_ID as is? Just begin with:
DATA RAM_;
INFILE karli2a DSD;
INPUT @1 TEXT $CHAR60.
@61 LS_ADDRESS_ID PIB4.;
RUN;
When using LS_ADDRESS_ID later, treat it as a numeric variable. (So use a numeric format when printing, not a character format.)
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.