If you go DIY, the sql QSH command can be used without manually creating a QTEMP table then CPYTOIMPF.
-----Original Message-----
From: Lynne Noll [mailto:lvwnoll@xxxxxxxxxxx]
Sent: Tuesday, March 20, 2018 4:42 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: FE=117776 to enhance „SQL Select“ with IFS output.
Faisal, you can do most of this by going to a temporary output table, and then using CPYTOIMPF. At 7.1, the command lets you get the column names and specify the output sequence. It has always let you specify the separator.
I've written something to do what you ask--go from SQL directly to a delimited file, but I wouldn't have bothered back then if CPYTOIMPF then did everything it does now.
Sent from Outlook<
http://aka.ms/weboutlook>
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx>on behalf of erifam@xxxxxxxxx <erifam@xxxxxxxxx>
Sent: Monday, March 19, 2018 9:13 AM
To: RPG programming on the IBM i / System i
Subject: FE=117776 to enhance „SQL Select“ with IFS output.
I need a simple and bulletproof method to create SQL reports on IFS.
Solutions like sql2xls are nice but, seem to be too overloaded.
I have opened a RFE = 117776 for a simple solution to enhance
"SQL Select" with an IFS output possibility.
See example below.
select CustNr, CutName
into outfile '\home\spool\cust.slk'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
from custMast
where Stat = 'IL';
Please vote if you like it.
<
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=117776>
________________________________________________________________________
Freundliche Grüsse
Faisal Araya
As an Amazon Associate we earn from qualifying purchases.