Date: Thu, 27 Jul 2006 23:33:44 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: How to find the current location in the file
On Thu, 27 Jul 2006 12:26:36 -0700, harmeet.kalra@GMAIL.COM wrote:
>I am reading a flat file and reading multiple fields and would like to
>know the column location my cursor is on after reading 10 vars ..
>
>
> _READSTM:
>
> INPUT
> @1 RPTTYPE $CHAR1.
> LAYOUT $CHAR1.
> RESERVED $CHAR1.
> REQTTYPE $CHAR1.
> ITEMTYPE $CHAR2.
> ACCTTYPE $CHAR3.
> REFNO $CHAR23.
> REQTINFO $CHAR8.
> STMTCNT IB2.
> LINECNT IB4.@;
>
> LOC = ???
>
>I can hardcode 46 but is there a function or way to determine the
>location of cursor (@) in the file?
Investigate the COLUMN= option of the INFILE statement.
>
>
>Thanks for your help ..........Harmeet
|