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
what is study design in while working with SAS? what are screening variables in SAS?
Explain what is the use of proc gplot?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
What is the work of tranwrd function?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
how can you import .csv file in to sas? : Sas programming
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
Explain what is SAS informats?
How sas treats the dsd delimiters?
Describe the function and untility of the most difficult SAS macro that you have written.
What is the good sas programming practices for processing large data sets?
What system options would you use to help debug a macro? : sas-macro
Which function is used to count the number of intervals between two sas dates?
why a stop statement is needed for the point= option on a set statement?