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 - 1707 days ago
Last viewed on: 26 Sep 2017 (3517 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: 5 years 15 days 4 hours 37 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: 5 years 15 days 4 hours 10 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.