Create the input control data set CTRL and set the length of the LABEL variable.
The LENGTH statement ensures that the LABEL variable is long enough to
accommodate the label ***ERROR***.
data ctrl;
length label $ 11;
Rename variables and create an end-of-file flag. The data set CTRL is derived from
WORK.SCALE. RENAME= renames BEGIN and AMOUNT as START and LABEL,
respectively. The END= option creates the variable LAST, whose value is set to 1 when
the last observation is processed.
set scale(rename=(begin=start amount=label)) end=last;
Create the variables Fmtname and Type with fixed values. The RETAIN statement is
more efficient than an assignment ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.