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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1054 views
  • 0 likes
  • 2 in conversation