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



Hi

Creating the pf file(program defined) in a RPG program writing out the crlf
at end of each record, then FTP'ing....
Initially the pf was defined with a record length of 160 with no CRLF, the
record only contains 150 characters...has 10 trailing blanks....it was being
kicked back to us with an error of an incorrect record length of 150 instead
of 160...
So we inserted the CRLF and thus got the blank records....we have changed
the CRLF from X'0d25' to x'0D0A'...that got rid of the blank lines, still
waiting to see if the record length acceptable.
Below is the file using X'd25':

I5 view
*...+....1....+....2....+....3....+....4....+....5....+....6....+.
M223145325000 aaaaaaaaaaaa bbbbbbbbbbbb
B111111111eeeeeeeeeeee 00000167821313
B111111111eeeeeeeeeeee 00000128560013


end of rec:
+....4....+....5....+....6...
29000016000000206776802231453250000 ¬¬
¬¬
¬¬

hex:
* . . . + . . . . 1 . . . . + . . . . 2 *...+....1....+....2
D4F2F2F3 F1F4F5F3 F2F5F0F0 F0404081 81818181 *M223145325000 aaaaa*
C2F1F1F1 F1F1F1F1 F1F18585 85858585 85858585 *B111111111eeeeeeeeee*

end of rec:
. . . + . . . . 6 . . . .+....5....+....6...
F0F0F0F0 40404040 40400D25 *231453250000 ¬¬*
40404040 40404040 40400D25 * ¬¬*


Windows via notepad:
M223145325000 aaaaaaaaaaaa bbbbbbbbbbbb
cccccccccccc dd 08755 29000016000000206776802231453250000

B111111111eeeeeeeeeeee 00000167821313




Hope this make it a little clearer

Thank you

Mary


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, October 14, 2009 11:47 AM
To: Midrange Systems Technical Discussion
Subject: Re: FTP from I5 to Server with CRLF

Hi Mary,

How are you creating these files? It looks like you're using some RPG
code, but then what?

From your symptoms, my best guess (and this is really a stab in the
dark) is that you are putting the data into a PF (flat file) and
manually adding CRLF onto the end of each record.

Then, when OS/400 converts the file from a PF to a stream file in order
to send it over FTP, it *also* adds a CRLF, resulting in two CRLFs at
the end of every record, and therefore a blank line between each. You
don't need to manually add a CRLF if you are writing your data to a PF
and then FTPing it from the PF in ASCII mode. The system will add it.

On the other hand, if you are building a stream file off the bat in your
RPG program, you'll want to code the CRLF. If that's what you are doing
and you're still having this problem, then further exploration will be
necessary. A big help would be to get a hex dump of the file (actually
just a record or two would be fine) before transfer, and after transfer.



Mary E Mallazzo wrote:
We need to transfer several files from the I5 to a windows server ,the
files
require an CRLF at the end of each record. The data appears correct on
the
I5, but when viewed on the server there is a blank line between each
records..obviously as a result of the CRLF.how can we have a CRLF at the
end
of each record yet not have a blank record created on the server side.
We
are creating the file via RPGLE creating the CRLF as

D crlf CONST('X'0d25')



Thanks



Mary





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.