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.

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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