[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTPAPI - Translation issue.
Scott,
Thank you for your prompt response considering the amount of e-mails you
should be working with among other things.
I debugged your code and noticed that IF_READ is called which does a
conversion to ASCII.
I do agree that 819 is a more reasonable value for files in IFS so I am
inclined to change my code to read these files using 819 instead.
With regards to your last suggestion of uploading and then use CHGATR, I
was under the impression that translation would only happen when a file is
created. I will keep this suggestion handy from now on.
Once again, thank you.
MDiaz
> Hello,
>
> Did you ever get an answer to this? I don't see that I responded.
>
> FTPAPI sets the TYPE to ASCII or IMAGE automatically when it begins a
> file transfer. I suspect that the TYPE C you're presetting with the
> quote command is getting replaced by FTPAPI's TYPE A command.
>
> The CRTCCSID might work, though... but what confuses me is that
> CRTCCSID is supposed to be for database (not stream) files.
>
> You say that default CCSID on the server is 37... are you talking about
> the system QCCSID value? It seems VERY unlikely that the FTP default
> (set with CHGFTPA CCSID(xxx)) is actually 37. IMHO, that's not a
> reasonable default for FTPing to the IFS.
>
> Perhaps a simpler solution is to just upload the file in binary mode,
> and then use CHGATR to set the proper CCSID?
>
>
> On 6/3/2011 9:40 AM, mdiazp01@xxxxxxxxx wrote:
>> Hi there,
>>
>> When I ftp_put an IFS file into an iSeries (V5R4) from another iseries,
>> the CCSID is set to 819 even though the default CCSID from both machines
>> is set to 37.
>>
>> I tried using ftp_quote to change the type to 37 without success. I even
>> tried changing CRTCCSID to both *USER and *SYSVAL again using ftp_quote
>> but still no luck.
>>
>> The code is listed below. Any help is appreciated. If you need
>> additional
>> information, please let me know.
>>
>> Thank you.
>>
>> ftp_binaryMode(gSess: *on);
>>
>> // Force coded set to 37
>> if ftp_quote(gSess: 'SITE CRTCCSID *USER')< 0;
>> gMsg = ftp_errorMsg(gSess);
>> endif;
>> if ftp_quote(gSess: 'TYPE C 37')< 0;
>> gMsg = ftp_errorMsg(gSess);
>> endif;
>>
>> // FTP Put file
>> if ftp_put(gSess:lClientOutXML:lOutXML)< 0;
>> gMsg = ftp_errorMsg(gSess);
>> endif;
>>
>> ftp_quit(gSess);
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----------------------------------------------------------------------
>> 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
-----------------------------------------------------------------------