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

AW: Antwort: AW: Transferring Source Files between iSeries using FTPAPI



Thomas,

this seems to be a more professional solution than my work around.
I'll check that for my application.
Many thanks.
Regards,

Werner Noll
Gesellschaft für Individual-Software mbH
Ludwigstrasse 9
63739 Aschaffenburg
Germany
Geschäftsführer: Werner Noll, Bernd Schröder
HR Aschaffenburg HRB 6020
Phone: +49-6021-299880
Fax: +49-6021-299882

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von
thomas.raddatz@xxxxxx
Gesendet: Dienstag, 29. April 2008 16:10
An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Antwort: AW: Transferring Source Files between iSeries using FTPAPI



Werner,

I did a few tests and basically it is possible to transfer source file
members containing German Umlaute in ASCII mode. However success or failure
depends on the TCP attribute settings of the receiving system. It seems as
if the sending system has to specify the Ascii CCSID of the receiving
system:


                                      FTP_codePage()
>From System i:      To System i:      Ascii CCSID:      Result:
--------------      ------------      ------------      -------
English             German 2              819            ERROR
English             German 2              850             OK
German 1            German 2              819            ERROR
German 1            German 2              850             OK

English             German 1              819             OK
English             German 1              850            ERROR
German 2            German 1              819             OK
German 2            German 1              850            ERROR

German 1            English               819            ERROR
German 1            English               850             OK
German 2            English               819            ERROR
German 2            English               850             OK


FTP attributes:

System i    CCSID   Outgoing/Incoming EBCDIC/ASCII table
---------   -----   --------------------------------------------
English     819     EBCDIC/ASCII Table (probably similar to 850)
German 1    819     *CCSID
German 2    819     EBCDIC/ASCII Table (probably similar to 850)


I wrote "(probably similar to 850)" because in fact I do not know what is
inside the EBCDIC/ASCII tables because I did not put them into place.


This is the code I used for testing:

 * switch to name format 1
c                   if        FTP_NamFmt(sess: 1)<0
c                   eval      Msg = ftp_errorMsg(sess)
c                   dsply                   Msg
c                   endif

 * put a sample source file member on the FTP server
c                   callp     ftp_binaryMode(sess: *off)

c                   if        FTP_codePage(sess: 819: FTP_EBC_CP)<0
c                   eval      Msg = ftp_errorMsg(sess)
c                   dsply                   Msg
c                   endif

c                   if        ftp_put(sess
c                                     : '/qsys.lib/raddatz.lib+
c                                        /qrpglesrc.file/chars819.mbr'
c                                     : '/qsys.lib/raddatz.lib+
c                                         /qrpglesrc.file/chars.mbr')<0
c                   eval      Msg = ftp_errorMsg(sess)
c                   dsply                   Msg
c                   endif


Regards,

Thomas Raddatz.


ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 29.04.2008 11:13:58:

> Hi all,
>
> I have managed it.
>
> I commented the lines 4690 to 4694 in service program FTPAPIR4:
>
> 4687.00 C                   when      (wwType='*FILE' or wwType='*MBR')
>
> 4688.00 C                                and wwSrc=*on
>
> 4689.00  * XXX: Do we really want to do this?
>
> 4690.00 c***                if        wkBinary = *On
>
> 4691.00 C***                callp     SetError(FTP_SRCASC: 'Source files
' +
>
> 4692.00 c***                            'should be transferred in ASCII
mode
> ')
> 4693.00 c***                return    -1
>
> 4694.00 c***                endif
>
>
> Now I use binary *ON and it works fine!
> Thanks for all your replies.
> Have a nice day.
>
> Regards,
>
> Werner Noll
> Ludwigstrasse 9
> 63739 Aschaffenburg
> Germany
> Phone: +49-6021-299880
> Fax: +49-6021-299882
>
> -----Ursprüngliche Nachricht-----
> Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Werner
Noll,
> GEFIS
> Gesendet: Dienstag, 29. April 2008 10:24
> An: 'HTTPAPI and FTPAPI Projects'
> Betreff: AW: Transferring Source Files between iSeries using FTPAPI
>
> Hi all,
>
> according to Scott's advice, I turned FTP_Binary to *OFF (I thought that
> *OFF is always the default).
> Afterwards, the FTP transmission of the source member was performed
without
> error,
> BUT some characters were not translated correctly. German "Umlaute" (e.g.
ä,
> ö, ü) and field names starting with § caused colored source lines in SEU.
> Both systems have identical CCSID (273).
>
> Now I'll try Mike Krebs' suggestion and do a work around the error, when
> using binary *ON.
> I'll keep you informed.
> Regards,
>
> Werner Noll
> Ludwigstrasse 9
> 63739 Aschaffenburg
> Germany
> Phone: +49-6021-299880
> Fax: +49-6021-299882
> -----Ursprüngliche Nachricht-----
> Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Scott
Klement
> Gesendet: Montag, 28. April 2008 19:01
> An: HTTPAPI and FTPAPI Projects
> Betreff: Re: Transferring Source Files between iSeries using FTPAPI
>
> Hi Werner,
>
> > My tests always result in an error: 'Source files should be
> > transferred in ASCII mode".
> >
> > In my case I don't need an ASCII mode as it is from EBCDIC to EBCDIC!
>
> I'm not sure that I understand your objection to using ASCII mode.  Are
> you having trouble with characters being mistranslated?
>
> Just put ftp_binary(*OFF) and see if that works.
>
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
X-AntiVirus: checked by AntiVir MailGuard (Version: 8.0.0.18; AVE: 8.1.0.35;
VDF: 7.0.3.225)


--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the
sender.
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------