What is the purpose of the trailing and How would you use them?

Answer Posted / sandhya

The trailing @ or more technically, line hold specifiers
are used to hold the pointer in the same record for
multiple iterations. The two tyoes of line hold specifiers
are single trailing(@) and double trailing(@@).

The single trailing hold the record until it encounters
either another input statement or end of the datastep.
They are used for the records such as

001F38 H
002 F 40 G

To read these values to the datastep

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;

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the difference between ceil and floor functions in sas?

644


Hi all, If Anybody has Advance SAS Certification dumps??? Please share with me. Email: pramod.kalugade03@gmail.com

1577


Explain data step in SAS

627


What is factor analysis?

661


what are the component of range? : Sas-bi

616






If money were no object, what would you like to do?

2684


What are the applications primarily used by business analyst? : Sas-bi

552


Explain append procedure?

630


What is data _null_?

693


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

3901


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1165


Explain why double trailing @@ is used in input statement?

569


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2261


How do you debug and test your SAS programs?

1046


How to limit decimal places for the variable using proc means?

597