|
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
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.