| 1. |
What Is The Purpose Of The Trailing And How Would You Use Them? |
|
Answer» If the data is continuosly in data SET SAS would read the first WORDS only from each line in the `datelines' block and it will ignore the rest of the line. if we use Trailing @@'it will read completly.and another TYPE of trailing is using single @ this is a line hold SPECIFIER.
They are used for the records such as 001F38 H 002 F 40 G To read these values to the data step Data example: input @10 type $ @; if type='H' then input @1 id 3. @4 GENDER $1. @5 age2.; else if type='G' then input @1 id3. @5 gender $1. @7 age 2.; end; cards; 001F38 H 002 F 40 G ; run; The double trailing holds the until the end of the record. Data example2: input id age @@; cards; 001 23 002 43 003 65 004 32 005 54 ; run; If the data is continuosly in data set SAS would read the first words only from each line in the `datelines' block and it will ignore the rest of the line. if we use Trailing @@'it will read completly.and another type of trailing is using single @ this is a line hold specifier. They are used for the records such as 001F38 H 002 F 40 G To read these values to the data step Data example: input @10 type $ @; if type='H' then input @1 id 3. @4 gender $1. @5 age2.; else if type='G' then input @1 id3. @5 gender $1. @7 age 2.; end; cards; 001F38 H 002 F 40 G ; run; The double trailing holds the until the end of the record. Data example2: input id age @@; cards; 001 23 002 43 003 65 004 32 005 54 ; run; |
|