Midrange News for the IBM i Community


Posted by: renojim
Report generation parameters
has no ratings.
Published: 31 Jan 2012
Revised: 23 Jan 2013 - 4110 days ago
Last viewed on: 25 Apr 2024 (5246 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: 12 years 2 months 26 days 3 hours 11 minutes ago
Edited: Tue, 31 Jan, 2012 at 12:47:13 (4468 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: 12 years 2 months 26 days 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.