Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
SQL and Print FIles (PRTF)?
has no ratings.
Published: 10 Sep 2012
Revised: 23 Jan 2013 - 4138 days ago
Last viewed on: 20 May 2024 (5774 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.

SQL and Print FIles (PRTF)? Published by: Bob Cozzi on 10 Sep 2012 view comments(2)

If I want to produce a report using an Externally Described Print file and use Embedded SQL within RPG IV read the data, how do I get the FETCH to see the fields on the PRINT file? Since they're output-only they preprocessor doesn't seem to see their definitions? WTF?

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


(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: SQL and Print FIles (PRTF)?
Posted: 11 years 8 months 10 days 16 hours 13 minutes ago

I've not had this issue in about 15 years. Have you tried to use EXTFILE(prtf:format) for as many formats as you have in the PRTF?

Posted by: bobcozzi
Site Admin ****
Comment on: SQL and Print FIles (PRTF)?
Posted: 11 years 8 months 10 days 15 hours 45 minutes ago

Hi Neil,

That's what I ended up doing. I had to create an EDS with EXTNAME to get the field recognisable by embedded SQL.