HP3000-L Archives

September 1998, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Genute, Thomas" <[log in to unmask]>
Reply To:
Genute, Thomas
Date:
Thu, 10 Sep 1998 19:57:54 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (52 lines)
Another way to do this is to XEQ a separate command file from your initial
command file with input redirection.  Your second command file would have
the while loop with an input statement to set a variable to the line.  If
you insist on a single self contained command file you can create the
"called" command file before executing it with echo statements and output
redirection.

XEQ INPROC.COMMAND.SYS < INFILE


                -----Original Message-----
                From:   Jan Gerrit Kootstra [mailto:[log in to unmask]]
                Sent:   Friday, September 04, 1998 4:42 PM
                To:     [log in to unmask]
                Subject:        Re: using 'while' at command prompt on
HP3000?

                Steve Bagdon schreef:

                > Anyone have a quick example on how to read through an
ascii file,
                > waiting for eof, and reading each record into a UDC
variable for
                > processing? Looking for an example in the MPE/ix Commands
Reference
                > Manual (Vol I/II), but nothing exactly as I need is in
there.
                > Repeatedly using 'input' against an acii file returns the
first line
                > of the file.
                >
                > There's a reason we want this in UDC, so it would be good
to figure
                > this out. Anyone? Thanks!
                >
                > Steve B.

                   Steve,

                using the input against an ascii file can be done, but for
that you need
                to copy the original file contents into a message file. The
message file
                uses destructive reads (each record is deleted after a read
command).


                Good luck,


                Jan Gerrit Kootstra

ATOM RSS1 RSS2