BookmarkSubscribeRSS Feed
jbr
Calcite | Level 5 jbr
Calcite | Level 5
does anyone know how to import records with multiple lines per record where each line has a end of line character(/) ?
1 REPLY 1
lu
Calcite | Level 5 lu
Calcite | Level 5
Hi jbr


Reading More Than One Record per Observation
http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000146292.htm#a000146495

"
The highest number that follows the # pointer control in the INPUT statement determines how many input data records are read into the input buffer. Use the N= option in the INFILE statement to change the number of records. For example, in this statement, the highest value after the # is 3:

input @31 age 3. #3 id 3-4 #2 @6 name $20.;
Unless you use N= in the associated INFILE statement, the INPUT statement reads three input records each time the DATA step executes.

When each observation has multiple input records but values from the last record are not read, you must use a # pointer control in the INPUT statement or N= in the INFILE statement to specify the last input record. For example, if there are four records per observation, but only values from the first two input records are read, use this INPUT statement:

input name $ 1-10 #2 age 13-14 #4;
".......


lu

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 625 views
  • 0 likes
  • 2 in conversation