Subject: | |
From: | |
Reply To: | |
Date: | Wed, 13 Oct 1999 12:46:01 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Abraham Zwygart wrote:
>
> I need to read a file one record at a time, set system variables
> for the report based on the contents of the file. I have a QUIZ
> report that the output goes to several people (via email). All
> the needed information is kept in a sequential file (one record
> per person and there email address.) I do not know how the read
> the file and put the record into system variables, and loop
> through the file?
Hi Abe!
Here's a command file you can start from:
setvar file_eof finfo("hpstdin","eof")
while setvar (file_eof,file_eof-1) > 0
input file_rec
setvar user_code str("!file_rec",1,8)
setvar email_add str("!file_rec",9,30)
run yourprog
endwhile
Change it to suit your input file and save it, then use it
like this:
commfile < seq file
The command file will read one record at a time from the
sequential file, set whichever variables you want, and
run your program once each time through the loop.
I hope I understood your problem, and that this helps!
See ya!
+-------------------------------------------------------------------+
My mind is my own, as are my ideas and opinions.
My heart, body, and soul, however, all belong to others. Tim.
+-------------------------------------------------------------------+
Tim Ericson tericson DenKor Dental Management Corp.
Sr. Systems Analyst at denkor 503-526-4440 (my direct number)
(& Systems Manager) dot com http://www.denkor.com
Programming HP3000s since 1983! Quality dental care since 1970!
+-------------------------------------------------------------------+
UDCs and Command Files: http://www.denkor.com/hp3000/command_files
+-------------------------------------------------------------------+
|
|
|