BookmarkSubscribeRSS Feed
Clybersoft
Calcite | Level 5

What considerations should be made when switching from variable length records to fixed length records in formatting data?

5 REPLIES 5
Doc_Duke
Rhodochrosite | Level 12

Please be more specific.  SAS datasets store data as fixed length fields, so I am not sure of the context.

Doc Muhlbaier

Duke

Clybersoft
Calcite | Level 5

I'm using an Excel Spreadsheet to import data and was wondering what changes I need to make or be concerned about when going from a variable length record to a fixed one. Especially when it comes to the options settings I am using (i.e. GETNAMES, SCANTEXT, etc.). I'm looking more for generic answers than specific ones here.

Thanks,

Yoda

Doc_Duke
Rhodochrosite | Level 12

SAS's PROC IMPORT will use the maximum number of columns that it observes in the rows that are scanned to determine a size unless you do a manual override.  It's in the documentation for SCANTEXT and TypeGuessingRows.

I'm not sure how the EGuide import wizard does it, though I've generally found it to be accurate.

Doc Muhlbaier

Clybersoft
Calcite | Level 5

Thanks for the info. I'm building all of mine from scratch as it is a customized system and EGuide doesn't give me the granularity I need.

Appreciate it Doc,

Yoda

Petersas
Calcite | Level 5

in case of infile use lrecl=x not sure about EG

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 5 replies
  • 1595 views
  • 0 likes
  • 3 in conversation