BookmarkSubscribeRSS Feed
Kushal_1991
Calcite | Level 5

The sas dataset club2_2 doesnt have the 3rd observation of the text file ss.txt, which should be in club2_2.sas because it is shown in the input buffer. On the other hand the 2nd obs of ss.txt is in club2_2.sas which is not shown in the input buffer. The Input buffer should have skipped the the 2nd obs since it has reached the end of the observation unexpectedly and should have read and written the 3rd obs in the club2_2.sas file. Note that the endweight of the 2nd obs in club2_2.sas is Actually the begining of the 3rd obs in ss.txt. Explain why this is happening.

Picture1.png

2 REPLIES 2
data_null__
Jade | Level 19

You have some records that are only 22 bytes, your input statement goes to column 26.  You can use TRUNCOVER or even PAD to achieve the correct result.

Kushal_1991
Calcite | Level 5

Sir, thanks.....I know how to avoid this. But my question is whats happening in Input Buffer as well as PDV from the moment when the first observation is read. .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 502 views
  • 3 likes
  • 2 in conversation