Kevin,
Try this;
setvar eof finfo(HPSTDIN,'eof')
while setvar(eof,eof-1) >= 0 do
input record
setvar user_code word(record)
setvar email_add word(record,,2)
echo !user_code !email_add
endwhile
:DOIT < DATA
john [log in to unmask]
kevin [log in to unmask]
bill [log in to unmask]
Kevin O'Sullivan wrote:
> Hi all,
>
> I followed this thread with interest and on trying out one of the techniques
> this is the result I get :-
>
> :PRINT DOIT
> setvar eof finfo(HPSTDIN,'eof')
> while setvar(eof,eof-1) > 0 do
> input record
> setvar user_code word(record)
> setvar email_add word(record,,2)
> echo !user_code !email_add
> endwhile
> deletevar record,user_code,email_add,eof
> :
> :PRINT DATA
> john [log in to unmask]
> kevin [log in to unmask]
> bill [log in to unmask]
> :
> :DOIT < DATA
> john [log in to unmask]
> kevin [log in to unmask]
> :
> Any reason why I'm missing the last record in the file ?
>
> Thanks in advance,
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> - Kevin O'Sullivan Cosworth Racing Limited, -
> - Racing Systems Department The Octagon, -
> - St James Mill Road, -
> - Northampton, England, -
> - NN5 5RA. -
> - Tel: +44 (0) 1604 598488 -
> - mailto:[log in to unmask] Fax: +44 (0) 1604 598506 -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> The views expressed above are mine entirely and in no way represent
> those of my employer.
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the email administrator - [log in to unmask]
>
> **********************************************************************
--
Respectfully,
Joe
Joe Whitlock | Work Email: [log in to unmask]
The Boeing Company | Home Email: [log in to unmask]
P.O. Box 3707 | Tel: 425-234-1478
MS 6C-LU | Fax: 425-237-7230
Seattle, WA 98124-2207 |
|