Midrange News for the IBM i Community


Posted by: renojim
Report generation parameters
has no ratings.
Published: 31 Jan 2012
Revised: 23 Jan 2013 - 1586 days ago
Last viewed on: 28 May 2017 (3328 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 3 months 28 days 10 hours 8 minutes ago
Edited: Tue, 31 Jan, 2012 at 12:47:13 (1944 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 3 months 28 days 7 hours 48 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.