× 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.



Hello Nathan...

You are correct - there is one field only. It contains a delimited string
of text data.

Have a good day.


Blake Moorcroft
Developer - Corporate
Russell A. Farrow Limited
1980 Ambassador Drive, PO Box 333, Windsor, Ontario N9C 3R4
Bus: 519-966-3003 ext. 566, Fax: 519-966-9870
blake.moorcroft@xxxxxxxxxx




Nathan Andelin <nandelin@xxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
03/02/2009 02:23 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc

Subject
Re: CPYTOIMPF - extra delimiter issue






One thing that's not clear to me is the 1000 byte text field in file
HDCSVDLY. Is that the only field in the file?

It sounds kind of like your RPG program is outputting CSV formated data
into the text field, which you're subsequently trying to write to a stream
file, using CPYTOIMPF. Or are there additional fields in HDCSVDLY?

Nathan.



----- Original Message ----
From: "Blake.Moorcroft@xxxxxxxxxx" <Blake.Moorcroft@xxxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Sent: Monday, March 2, 2009 11:19:29 AM
Subject: CPYTOIMPF - extra delimiter issue

Hello all...

Has anyone ever run into an issue when building a CSV file from a DB 2
table (created with SQL create statement), where an extra string delimiter

appears in the first column of the csv file.

We are producing a csv file for automatic distribution to a client. The
data base file is populated using an RPG ILE program, with a text string
being populated to a single field in the data base file 1000 characters
long. The string is delimited with commas for fields and double quotes
(") for string fields. The file is then accessed through a CL where the
CPYTOIMPF command is run. The issue arises because a string delimited
(") is appearing at the end of the first character field. This is our
regular string delimiter as defined in the CPYTOIMPF command (listed
below).


CPYTOIMPF FROMFILE(QTEMP/HDCSVDLY) TOSTMF(&PATH) +
MBROPT(*REPLACE) STMFCODPAG(*PCASCII) +
RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM('"') +
FLDDLM(',')


No amount of tweaking or variation appears to get rid of it. We've tried
adjusting the stream code page to *STDASCII, adjusting the contents of the

database field populating the field (a default character value of '1'
(without the quotes)).

We're now at wits end, and it's becoming a lonely place.

Have a good day.


Blake Moorcroft
Developer - Corporate
Russell A. Farrow Limited
1980 Ambassador Drive, PO Box 333, Windsor, Ontario N9C 3R4
Bus: 519-966-3003 ext. 566, Fax: 519-966-9870
blake.moorcroft@xxxxxxxxxx




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.