BookmarkSubscribeRSS Feed
JAR
Obsidian | Level 7 JAR
Obsidian | Level 7

Dear All,

I have to read row data file with line-width of 748.

In spite of using LRECL I cannot read beyond 728th column I cannot access as the pointer goes to the next line (the same had happened at the 256th on, before using LRECL).

Could someone help me, please?

JAR

3 REPLIES 3
Tom
Super User Tom
Super User

You can use the LIST statement to get SAS to dump the input records to the log.  Then you can check for special characters like '0A'x (linefeed) that might be making SAS think that they line has ended.

If you have an embedded linefeed you can use the TERMSTR=CRLF option on the INFILE statement.

Another possibility is that the end of that line is empty.  You might try using the TRUNCOVER option.  Look at this thread.   http://communities.sas.com/message/101557

Another possibility is that the lines contain tab ('09'x) characters and that SAS is expanding the tabs into spaces.  This would make the input buffer longer as one tab might be expanded into upto 8 spaces.

Peter_C
Rhodochrosite | Level 12

Are you using any of the xxxOVER infile options? 

The default is FLOWOVER which causes the behaviour you describe, when the infile buffer has not enough data to fill the informat(s) of an INPUT .

Check the informat length of the last column you read from the data file

for example, is it like

input

....

  @730 string_variable $20.

...

;

that would cause it !

JAR
Obsidian | Level 7 JAR
Obsidian | Level 7

Hi Peter,

I have used Tom's suggestion: TRUNCOVER.

It worked fine. Thanks a lot.

Regards,

Jijil

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 830 views
  • 8 likes
  • 3 in conversation