× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Vern:

Have not used "parameter marker's" yet in my SQL experience. My PF file is
created from an SQL that I then push each record into a Data Structure that
looks like the PF. Copy the data over to the file variables from the DS
variables and write the PF record. Thus I am getting the values for the CSV
file in a PF, but without the "parameter markers".

Looked in my iSeries SQL book on "parameter markers" and the only example
is loading a subfile. Okay if I can figure out how to do the PM thing how
do I go off and make a CSV file each time the marker changes? Then how do I
go back and read the PF records into the CSV file? Using CPYTOIMPF. Not
sure how we know what records out of the PF file to use.

Basically I am confused.

Thomas

On Mon, Jan 5, 2015 at 4:05 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Thomas

Any idea of a quick solution probably involves a vendor product.

This could be done with SQL - you can build the SELECT for the distinct
values from your sort, then walk through them, using another SELECT with
parameter marker that takes each distinct value. For each distinct value,
create the CSV.

One trick for the CSV - use SQL to build each CSV row in a PF, then use
CPYTOIMPF to create the IFS file.

Not too ugly, eh?

HTH
Vern


On 1/5/2015 2:56 PM, Thomas Burrows wrote:

Hi:

Is there a quick way to take one file that is sorted and break into many
files according to the sort value? Then quickly download to a CSV TXT
file.
Know how to do this in general, but each day there will be an unknown
number of individual sort fields. Usually under fifty but could be maybe
75
to 100.

Hoping for a quick solution than the rather hard solution I am thinking
of.

Thomas


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.