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

Re: FTPAPI does not accept § in file names



Hi Werner,

My guess is that there's a problem in the ParsePath() routine in 
FTPAPIR4. I haven't looked at it in years, but now that I'm looking at 
it, I see that the CCSID in that routine is hard-coded to 37 -- I 
suspect that's the cause of your issue.

Honestly, I don't understand why it was written that way. (It's stupid 
code!)  Frustratingly, it's probably my fault.

Anyway, in the ParsePath subprocedure, you'll see this:

c                   eval      Qlg_Path_Name_T = *ALLx'00'
c                   eval      CCSID = 37
c                   eval      Country_ID = 'US'
c                   eval      Language_ID = 'ENU'

Please try commenting out those 3 last lines, so that it looks like this:

c                   eval      Qlg_Path_Name_T = *ALLx'00'
c***                eval      CCSID = 37
c***                eval      Country_ID = 'US'
c***                eval      Language_ID = 'ENU'

Please keep the *ALLx'00' line intact, as setting the CCSID, Country_Id 
and Language_Id fields to hex zeros should mean "use the job defaults", 
which is probably what we want.

Try recompiling FTPAPI and running your program again.  Does it work better?


On 9/10/2010 7:34 AM, Werner Noll (Gefis) wrote:
>
>     Hi all,
>
>
>     we use FTPAPI for transferring source files vom one system to another.
>
>     Now we have member names with an embedded § sign.
>
>     In this case the FTP_PUT procedure fails with error at the OpnFile:
>
>
>     open the file to send
>
>                      eval      wwFD = OpnFile(wwLocal: 'R': p_read:
>
>                                            p_close: peSocket)
>
>                      if        wwFD<  0
>
>                      return    -1
>
>                      endif
>
>
>     The pathname in wwLocal is:
>     /QSYS.LIB/GASS.LIB/QRPGLESRC.FILE/GR§AA00.MBR
>
>     The return value in wwFD is  -1.
>
>
>     The problem is surely caused by the § sign.
>
>
>     Is there any work around (except changing file names)?
>
>
>     Man thanks in advance.
>
>     Regards,
>
>
>     Werner Noll
>     Gesellschaft für Individual-Software mbH
>     Ludwigstrasse 15
>
>     63739 Aschaffenburg
>
>     Germany
>
>     Geschäftsführer: Werner Noll, Bernd Schröder
>
>     HR Aschaffenburg HRB 6020
>     Phone: +49-6021-299880
>     Fax: +49-6021-299882
>
>     e-mail: werner.noll@xxxxxxxxx
>
>
>
>
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------