Midrange News for the IBM i Community


Posted by: renojim
Report generation parameters
has no ratings.
Published: 31 Jan 2012
Revised: 23 Jan 2013 - 1646 days ago
Last viewed on: 27 Jul 2017 (3449 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: 5 years 5 months 27 days 7 hours 11 minutes ago
Edited: Tue, 31 Jan, 2012 at 12:47:13 (2004 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: 5 years 5 months 27 days 4 hours 51 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.