The DMP command can be used to review [DSPSPLF QPSRVDMP
SPLNBR(*LAST)] for the last two bytes of the file data, to verify they
are indeed 0x0D0A
Whether zero bytes following a CRLF constitutes an /extra record/ is
unfortunately open to interpretation. If the receiving application
insists that zero bytes of data following the last row terminated by
CRLF [i.e. End Of Record delimiter for a stream of text data is 0x0D0A]
constitutes a new row, then it would seem appropriate to concur with
them, and simply tell them that the /extra record/ is there; i.e. by
counting the same way they do, when generating the control file.
Although as an effective null record [i.e. no data], it seems unlikely a
database as recipient will deal well with that -- maybe create a row
where all fields are the NULL value.? Yikes! I would expect that the
EOF would be noted, and thus the import would understand there are no
more rows.
Some people will insist that as an EOR delimiter, the CRLF must exist
on the last record, just as in every previous record. Others insist
there is no legitimate reason to include an EOR delimiter prior to an
EOF marker nor as the last two bytes; in fact claim that it is an error.
I know this was discussed back in the day, and I recall only that some
chose to rewrite the file dropping the last two bytes, or otherwise with
the same outcome, using facilities to truncate the last two bytes [if
they were x'0D0A']. Seems it would be better if the recipient can just
understand what is meant by <data><EOR><EOF>; where <EOF> is not to
imply an actual delimiter\marker, as it could be implied by zero bytes
remaining.
CPYTOSTMF [and CPYTOIMPF, at least in its pre-V5R3 design which, in
its implementation, used CPYTOSTMF] when copying from a database file
will terminate the line after the last non-blank character in a record
according to the ENDLINFMT() value specified [on CPYTOIMPF, specified
with RCDDLM() parameter]. EDTF seems to mutter if the delimiter is
missing, and will also add the EOR delimiter for the last record when
the file is changed, but that interface does not present any /extra/
/line/ of text.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: Access OS400 shared folder from windows, (continued)
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.