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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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