CRTPF FILE(QTEMP/DWRECXLS) RCDLEN(258)
CPYTOIMPF FROMFILE(DWRC01P) TOFILE(QTEMP/DWRECXLS) +
MBROPT(*REPLACE) RCDDLM(*EOR) +
DTAFMT(*DLM) FLDDLM(',')
The person on the other end, with Unix, says:
>the lines in the files don't have a proper carriage return and line
feed >characters at the end of each line. If I edit the file in vi on
unix and >merely save it back to disk, vi takes care of adding the
proper character to >the end of each line. Until I do that, the
sql*loader program doesn't know >when a line ends, and it displays an
error message and will not load the >file. Can they change there file
creation process or maybe just their ftp >process to make sure that a
carriage return/line feed sequence is at the end >of every line?
After I told him the record delimiter is *EOR which means the data
after the last field will be padded with X'00'. He says:
>Looking further at the file it appears that the problem is coming
from a null
>(x'00') that is present before the CRLF that is at the end of each
line. Is >it possible to not have the nulls (x'00') in the file?
I cannot do anything about the 00. I have to CRTPF the file with at
least 1 extra character and it has the 00. I've sent FIXED data files
to other users at this company and they've been able to read them ok.
I can't change the *EOR or I'll get an error.
Is anyone familiar w/unix and the as400 that can help me ? Thanks.
I don't understand this statement. The CSV file you are creating, by its'
nature, creating variable length records. Both the character and numeric
data that are included in the file are of varying length. All (or almost
all) programs that import .csv files don't have a problem with this. Have
you tried using RCDDLM(*CRLF) ? It should work.
The problem with .csv files is not how short to make the record, but rather
it should be long. You should be able to make this record 512 or 1024 and it
should work just fine - any other system should be able to import it.
I think the reason that you are getting a CR/LF appended to each record is
that FTP from the AS/400 is doing that for you when you send it to the Unix
system.
Can you tell us more?
"RMK" <rkn...@valspar.com> wrote in message
news:eb583c1.01121...@posting.google.com...
I originally made the file 1024 leaving extra space at the end. The
CPYTOIMPF fills all blanks at the end with the 00 and this is what the
unix person is telling me is the problem. That is why I then tried to
make the length the exact length of the file AFTER the CPYTOIMPF. It
would not let me make it exact and I had to add one position. The
CPYTOIMPF then puts the 00 in this extra position as I did a DSPPFM
and I can see it.
I use this all the time and do not have a problem sending *fixed
files. The CRLF is OK with the unix user. He is complaining about the
00 before the end of record.
I was hoping the Unix person's message (listed again below) might shed
some light on what HE is doing wrong !
> > The person on the other end, with Unix, says:
> >
> > >the lines in the files don't have a proper carriage return and line
> > feed >characters at the end of each line. If I edit the file in vi on
> > unix and >merely save it back to disk, vi takes care of adding the
> > proper character to >the end of each line. Until I do that, the
> > sql*loader program doesn't know >when a line ends, and it displays an
> > error message and will not load the >file. Can they change there file
> > creation process or maybe just their ftp >process to make sure that a
> > carriage return/line feed sequence is at the end >of every line?
> >
> > After I told him the record delimiter is *EOR which means the data
> > after the last field will be padded with X'00'. He says:
> >
> > >Looking further at the file it appears that the problem is coming
> from a null
> > >(x'00') that is present before the CRLF that is at the end of each
> > line. Is >it possible to not have the nulls (x'00') in the file?
> I don't understand this statement. The CSV file you are creating, by its'
> nature, creating variable length records. Both the character and numeric
> data that are included in the file are of varying length. All (or almost
> all) programs that import .csv files don't have a problem with this. Have
> you tried using RCDDLM(*CRLF) ? It should work.
"Wyatt Taylor" <wwta...@swbell.net> wrote in message news:<_w9U7.854$7R3.40...@newssvr11.news.prodigy.com>...
LOCSITE TRIM 0
it will stop trimming characters. The dafault is TRIM 1 which is on.
Then you can make your record as long as you need to.
"RMK" <rkn...@valspar.com> wrote in message
news:eb583c1.01122...@posting.google.com...
ASCII
LOCSITE TRIM x whichever you decide
and you should not have
STRUCT R
"Wyatt Taylor" <wwta...@swbell.net> wrote in message
news:WpmU7.125$x_1.72...@newssvr12.news.prodigy.com...