×
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.
Andy
Go to the archive for this list - link near the bottom of this message -
and search on "cpytoimpf csv" or some such. I actually searched on "csv
blank" and got some good threads. This has come up several times.
One of the posts indicated that IBM was thinking of changing this 5 years
ago. There are supposedly some rules - fixed-length character fields are
not trimmed, variable-length ones are. But numerics are not trimmed and are
left-justified.
But I tried this on a V5R1 machine - the VARCHAR was still padded - no
trimming.
One solution is to use an SQL SELECT statement - this technique has been
discussed in this list. Do an appropriate search, such as "csv sql", maybe.
The idea is to convert date, numerics, etc., to character, trim the
results, & concatenate the lot with commas and quotes as needed. You could
even do this with a UNION SELECT and put the column names in the first row
as a bunch of constants. And with a little more work, you could put column
headings in there, as well, using another UNION SELECT. You could even use
a UDTF to get this automagically - user-defined table function. I have to
try that one myself! That would be a call to a system program that'd return
the whole row, filled with column headings in one swell foop.
HTH
Vern
At 03:41 PM 2/25/2005, you wrote:
Anyone able to offer a little download help?
I'm trying to download (via ftp) from the 400 to a comma-delimited file
(to a T&A system), using the following command:
CPYTOIMPF FROMFILE(HS#LIBR/PPPTADN) TOFILE(HS#LIBR/PPPTADNCSV)
The results are like so:
"8732","A","JOHNSON ","LINDA ","NODIFF
","9066"," "
"6289","A","SMITH ","MARIANNE ","40/40
","9596"," "
but I was expecting something like this:
"8732","A","JOHNSON","LINDA","NODIFF","9066"," "
"6289","A","SMITH","MARIANNE","40/40","9596",""
.... the extra blanks within each set of quotes is killing the import.
Any clues as to what I should be doing differently would be greatly
appreciated!
Andy
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.