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



My issue is that the resulting binary file on the IFS has CCSID set to
65535, and is not compatible with the Windows world. I may be missing
something obvious, but I cannot find any way to set the CCSID on
creation
of the file. I have used the following as a work-around for now:

Scott probably knows a better way, but here's an extract from my standard
newTextFile() procedure. I developed this several releases back, and though
there may be new function to do this in one go, I haven't had reason to find
it.

rc = c_unlink(pStmfNameIn) ; // Delete If exists
Handle = c_open(pStmfNameIn // Create with new attrib
: O_CREAT + // Open flags
O_TRUNC +
O_WRONLY +
O_CCSID
: (6*64)+(6*8)+(6) // World readable/writeable
: File_CCSID) ; // Code page 819
If Handle > -1 ;
rc = c_close(Handle) ; // Close the file
Handle = c_open(pStmfNameIn // Open again for .txt
: O_TEXTDATA + // Flags: Text data
O_TRUNC +
O_WRONLY + // Write only
O_CCSID // and CCSID
: (6*64)+(6*8)+6
: Open_CCSID
) ;
EndIF ;
If LogError and Handle <= -1 ;
pErrorNbr = c_errno() ;
pErrorNbr = c_errno() ;
rc = errorNbr ;
EvalR MsgID = %EditC(RC: 'X') ;
%Subst(MsgID: 1: 3) = 'CPE' ;
PgmMsg(MsgID: *Blanks: '*DIAG'
: *Blanks // Message file name
: '*' // Call Stack name
: 1 // Send to our caller
) ;
EndIF ;

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
... CAUTION!!! Do NOT look at laser with remaining eye.


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.