BookmarkSubscribeRSS Feed
deleted_user
Not applicable
From sas documentation:
@n
moves the pointer to column n.

Range: a positive integer
Tip: If n is not an integer, SAS truncates the decimal value and uses only the integer value. If n is zero or negative, the pointer moves to column 1.
Example: @15 moves the pointer to column 15:
input @15 name $10.;

Observation 01:
input @-23 Name $ ;
run;

Log:
293 input @-23 Name $ ;
-
22
--
200
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
an integer constant, arrayname, #, (, +, /, //, ;, @, @@.

ERROR 200-322: The symbol is not recognized and will be ignored.

294 run;

Observation 02:
input @0 Name $ ;

ERROR: The specified value for the '@' INPUT/PUT statement option must be within the range 1<=N<=
2147483647.

Observation 03:
input @1.35 Name $;
Log:
ERROR 500-185: Decimal specified for informat F is invalid.

Is the documentation incorrect? Can anybody please explain this?
1 REPLY 1
Peter_C
Rhodochrosite | Level 12
instead of -23 being considered a value, the "-" is considered separately, hence confusion!
To treat -23 as a value in that context, use (-23), or @(-23)
Seems almost pointless, but input @( position-23) might be useful

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1395 views
  • 0 likes
  • 2 in conversation