good day expects.
i am using the below script to Import txt file, however my script adds a new column called VAR1. see screen prints below. please assist
script
Results
Looks like the whole source string gets imported into a single variable Var1.
You define getnames=no so SAS needs to create a variable name (Var1).
The default delimiter does not match your data so the whole line gets imported into a single variable.
Looks like a SAP unload. These are usually not delimited, but have fixed-width columns, which you can read with formatted INPUT.
PS PROC IMPORT won't help you here in any way, as SAP unloads do not provide a header line with column names; you have to write your own data step according to the unload documentation.
Looks like a fixed-width-file, nothing to be read by proc import, but with a data step.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.