Midrange News for the IBM i Community


Posted by: renojim
Report generation parameters
has no ratings.
Published: 31 Jan 2012
Revised: 23 Jan 2013 - 3785 days ago
Last viewed on: 03 Jun 2023 (4989 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Report generation parameters Published by: renojim on 31 Jan 2012 view comments(2)

Is there a way to control the HOLD and SAVE parameters for a report from within the RPG program that generates it, so as not to have to create a CL?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: Report generation parameters
Posted: 11 years 4 months 5 days 2 hours 14 minutes ago
Edited: Tue, 31 Jan, 2012 at 12:47:13 (4143 days ago)

QCMDEXC or 'system' to run the CL command.

Though personally I use external defined print files, so I can hard set the HOLD/SAVE settings, and the program doesn't need to set them itself.

Posted by: DaleB
Premium member *
Reading, PA
Comment on: Report generation parameters
Posted: 11 years 4 months 4 days 23 hours 54 minutes ago

To elaborate on what Neil said,

  • The PRINTER file should have USROPN.
  • Use QCMDEXC (or other favorite command processing API) passing an OVRPRTF command string, w/ HOLD(), SAVE(), or whatever floats your boat.
  • OPEN the printer file after processing the OVRPRTF. I always put the open immediately after the override.