×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




On 12/16/2014 2:03 PM, Buck Calabro wrote:
On 12/16/2014 1:31 PM, Gqcy wrote:
I have a stream file, that appears to be CCSID 819.
this is a EDI file, and I am having trouble with the end of record
character. in this case, when I look at the file in EDTF, the end of
line char is x'0A'...
however, it appears that when I read it in it has become a x'25' but I
am not sure... my problem may be made worse in that in debug, I may be
seeing my data as EBCDIC...

My open is:

Oflag = O_Rdonly + O_Textdata ;
File = %trim(DirName) + %trim(FileName) + NULL ;
Fp = open(%addr(File): Oflag:S_IRGRP:819) ;

What you're describing sounds normal to me. In CCSID 819, a line feed
is x'0a'. In CCSID 37 a line feed is x'25'. O_TEXTDATA does the
translation between CCSIDs - which you almost certainly want to do
unless you're storing ASCII characters in your DB2 tables.


Thanks Buck,

I was thinking since I added codepage = 819 (the 4th parm on the open), it would be read in as ASCII.... I didn't realize the O_Textdata would do the conversion...

but you are correct, I have now added x'25' as a end of line char (I was already checking for x'0D25' (carriage return, line feed)


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.