The SAS Output Delivery System and reporting techniques

Not sure how to read an INPUT @'constant'

Reply
N/A
Posts: 0

Not sure how to read an INPUT @'constant'

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
Frequent Contributor
Posts: 95

Re: Not sure how to read an INPUT @'constant'

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.
N/A
Posts: 0

Re: Not sure how to read an INPUT @'constant'

That pretty much matches what I see in running the code against a single record in test.
Ask a Question
Discussion stats
  • 2 replies
  • 106 views
  • 0 likes
  • 2 in conversation