05-01-2016 07:07 PM
The double trailing @ line-hold specifier is mostly used with an INPUT statement, as in Example 4 of the documentation (please see explanations there). If you insist on an example with data _null_ (and a FILE statement?), here's an adapted version:
data _null_; file print; input name $ age @@; put name age; datalines; John 13 Monica 12 Sue 15 Stephen 10 Marc 22 Lily 17 ;
Line-hold specifiers can also be used with a PUT statement. In this case, however, the single and double trailing @ are equivalent, so that writing "@@" is unnecessary (again, please see documentation, esp. example 5 there). Here is another example (including a FILE statement):
data _null_; file print; length c $11; do c='first', 'line', 'second', 'line', repeat('-',10); put c @; if c='line' then put; end; run;
The second PUT statement (called "null PUT statement" in the documentation) releases the output line so that the intended line breaks occur.