Generate Totals from a printer file

55 pts.
Tags:
Development
We convert a spool file contaning invoices to a Physical file. Usng CL commands we write back to a spool file invoices that we want to send to the customer. Is there a easy wasy for generating totals from this spool file. I know that I can generate a Physical file from the spool file then write programs the will locate the totals, format it and generate totals, but is there a easer way ?r

Answer Wiki

Thanks. We'll let you know when a new response is added.

One method is to create a file (or data area?) containing totals at the same time you create the invoices. Or a file containing invoice number, customer number and amount. Then your cl program can use the same search criteria on the spool file and the total file.

Creating and maintaining another file can be more trouble than you want to put up with, but sometimes it’s the simplest way.

Or maybe you have an existing open A/R file that you can use to get the data, using the same selection criteria as for the spool files.

—Dale

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mayleong
    Hmmp..if u dont have lots of users, this is what i adopted 1) give an option for user to copy spool file to 198 columns, etc out put file. teach users how to download it (u can also save the .dtf, .tto and distribute these via emails). Upload into Excel and take out all the unnecessary details by using the "Data Filter" function on Excel. then use subtotal tool on excel 2) output details to a file on as400. use query/400 to produce "totals" and output a "summary" file from query/400. very easy control both these tasks into a CL. Call RPG/SQL program to extract the requisite data and use RUNQRY! users just learn how to download their "details" and "totals file". If data extraction is quite simple, create a CL to extract a details file and runqry to generate from detail file to a "subtotal" file. When using query/400 be careful to read the result and take out the level breaks. that is, have your record selection as,eg:(see query/400 record selection "screen" and value) And/Or Field Test Value BREAKLVL EQ 2 This will effectively give u a "summary file" w totals Hope this helps?
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following