BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm unfamiliar with this technique. Nor do I see it in the help documentation. The line of code is:

INPUT @col @']:' @;

where col is the pointer of a previousily input column.

Is the @']:' placing the constant ']:' in the input record after the field at pointer col?

Update:

It appears that the INPUT @'constant' actually searches the input line for the constant. When the constant is found the pointer is set to the first column after the portion of the record that matches the constant. J_Mark_W 11:07AM ET


Message was edited by: J_Mark_W
2 REPLIES 2
1162
Calcite | Level 5
The line as it is printed doesn't appear to actually be reading in anything.

It looks to me like it is trying to find a starting point for reading data using a subsequent input statement.

As I read this, the pointer is first moving to the column number specified by the col variable. Then it is moving to the string ']:', if it can find it, in the input buffer. If there is no ']:', then the pointer stays at @col. The last @ holds everything in memory so that additional input statements can be specified.
deleted_user
Not applicable
That pretty much matches what I see in running the code against a single record in test.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 609 views
  • 0 likes
  • 2 in conversation