At 12:33 PM -0700 10/25/99, [log in to unmask] wrote:
>this seems kinda silly, but i'm stumped.... say i want to
>write a command file to process the contents of some flat
>(not message!) file. the ci syntax would/should simply be
>":mycmd < myfile". the problem is (to me) how to do the
>looping inside of 'mycmd'. i can say:
>
>setvar _filename input()
>echo !_filename
>
>but that only gets me the first record in 'myfile'. i've
>looked (some) at denkor's site. i've looked at the command
>files i have. what i'm consistently seeing is the looping
>is being controlled by some mechanism tied to the eof of the
>redirected file. is that the only way to do
>it? - d
Just two weeks ago there was a long thread on exactly this problem. One
solution presented (by someone other than myself) was:
setvar eof finfo(HPSTDIN,'eof')
while setvar(eof,eof-1) > 0 do
input record
...<statements to process the contents of the record variable>
endwhile
deletevar record,eof
I found this in a quick search of the archive at http://raven.utc.edu
HTH,
Barry