BookmarkSubscribeRSS Feed
BHarmon
Calcite | Level 5

I am using SAS Enterprise Guide and have been importing .CSV files from my PC so that I can process them using SAS. Where I have a problem is I have a .CSV file with 30k rows and 30 columns, which I will be treating as SAS variables. Within Step 2 of the Wizard I had to define a starting position as well as limit the number of records to read in. When I proceeded to Step 3 I changed the long and not SAS friendly variable names to shorter names that I can use. Now my .CSV has 45k rows but still has the same 30 columns in the same order. No matter what I try when I change the number of records to read in during Step 2, Step 3 makes me redefine all 30 columns again.

Any ideas of how I can avoid redefining all variables each time I update the number of records?

Thanks,

Bryan

6 REPLIES 6
sas_9
Obsidian | Level 7

if you want to control variables you can always use KEPP= or DROP= options and if you wants to control the rows then you can go for OBS= option...

BHarmon
Calcite | Level 5

I'm using the Import Wizard in SAS Enterprise guide and not a PROC Import statement. A work around would be to FTP the .CSV to the server and run PROC Import but we are trying to take advantage of the Import Wizard in case in the future we have an individual running the code with little to no SAS experience.

esjackso
Quartz | Level 8

Could you just read in all the rows with the import task in the flow and then limit what rows in a filter task?

EJ

BHarmon
Calcite | Level 5

I was trying to avoid that but I think that might be my only option. The fear with reading in all rows is after my data I have information containing additional information that doesn't pertain to the variables and I'm worried that might screw up my SAS formats, which to new SAS users is sometimes a foreign language. Is there a way to limit the number of rows SAS looks at to determine the informats and formats?

nrose
Quartz | Level 8

Try using the 'performance' button in step one of the wizard. It has an option to limit which rows a looked at.

Nick

vjhs27
Calcite | Level 5

Hi! I'm just having the same problem. Did u get any solution?

Can u share it?

 

Thanks.

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3900 views
  • 0 likes
  • 5 in conversation