[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: IFS file being created and opened with incorrect CCSID of 37, not 819.



   Scott,

   The correction you suggested did resoslve the CCSID issue, however, the
   file is still not viewable when opened using Notepad on the IFS.

   Do I need O_TEXTDATA to correct this issue?

   This file is a script, used by SFTP (SSH), for secure file transfers.


   c                   eval      fd = open('/home/CPASFNBA/NBA_Test.txt':

   c                                    O_WRONLY+O_CREAT+O_TRUNC+O_CCSID:

   c                                    S_IRUSR+S_IWUSR+S_IRGRP:

   c                                    1252 )


   Thanks

   Paul



   -----Original Message-----
   From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott
   Klement
   Sent: Tuesday, January 03, 2012 7:10 PM
   To: HTTPAPI and FTPAPI Projects
   Subject: Re: IFS file being created and opened with incorrect CCSID of
   37, not 819.


   Hi Paul,


   I'm not sure what this has to do with FTPAPI/HTTPAPI.  Is one of these

   software packages making this mistake?  Please let me know, and I'll

   correct it.


   FWIW, the error is really simple... the O_CCSID flag is being provided

   in the wrong parameter.  It should be provided in the 2nd parameter
   (the

   flags parameter) not the 3rd (which is for the "mode")


   So right now the code is:


     fd = open('/home/CPASFNBA/NBA_Test.txt':

               O_WRONLY+O_CREAT+O_TRUNC:

               O_CCSID:

               S_IRUSR+S_IWUSR+S_IRGRP:

               819 )


   but, it should be:


     fd = open('/home/CPASFNBA/NBA_Test.txt':

               O_WRONLY+O_CREAT+O_TRUNC+

                  O_CCSID:

               S_IRUSR+S_IWUSR+S_IRGRP:

               819 )


   (In other words, a colon was coded where a plus sign was needed.)


   If this is not related to FTPAPI/HTTPAPI then it should not be posted
   in

   this mailing list.  This is not a general-purpose mailing list, it's

   intended for discussions of FTPAPI and HTTPAPI only.


   Thanks!


   On 1/3/2012 4:55 PM, Steinmetz, Paul wrote:

   >     IFS File is being created with CCSID of 37, seems to be ignoring
   the

   >     O_CCSID and 819.

   >

   >     I am manually deleting the file each time.

   >

   >

   >     0076.00 c                   eval      fd =

   >     open('/home/CPASFNBA/NBA_Test.txt':

   >

   >     0077.00 c

   >     O_WRONLY+O_CREAT+O_TRUNC:

   >

   >     0078.00 c

   >     O_CCSID:

   >

   >     0079.00 c

   >     S_IRUSR+S_IWUSR+S_IRGRP:

   >

   >     0080.00 c                                    819 )

   >

   -----------------------------------------------------------------------

   This is the FTPAPI mailing list.  To unsubscribe, please go to:

   http://www.scottklement.com/mailman/listinfo/ftpapi

   -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------