Column Pointer Control in SAS : @, +N,/ and #N

Hi,

To get the control while reading external file (with infile statement) and with cards/dataline statement :

@n : Moves the pointer to the nth column in the input buffer

+n : Moves the pointer forward "n" column in the input buffer

/  : Moves the pointer to the next line in the input buffer

#n  : Moves the pointer to the nth line in the input buffer

Example :

Data DSN;

input ID 1-4 // openweight 1-3 closeweight 5-7;

Cards;

1023 David Shaw

Red

189 167

1049 Kathy Jones

yellow

145 124

;

run;






* For others please try yourself and put the example into the comment..

1 comment: