Midrange News for the IBM i Community


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

COMMENTS

(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: SQL and Print FIles (PRTF)?
Posted: 11 years 7 months 14 days 14 hours 44 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 ****
Chicagoland
Comment on: SQL and Print FIles (PRTF)?
Posted: 11 years 7 months 14 days 14 hours 17 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.