Posted: Mon Aug 25, 2014 10:22 pm Post subject: FTP to AS400
Newbie
Joined: 25 Aug 2014 Posts: 1
Hi
I am trying to ftp a file to the As400 that I got on an email.
I have the file content in a blob message I have created in .Net with the following
C# code"
NBElement BLOB = outAssembly.Message.RootElement.CreateLastChildUsingNewParser(NBParsers.BLOB.ParserName);
fileAttachment.Load();
BLOB.CreateLastChild(null, "BLOB", fileAttachment.Content);
"
I have set the ftp node to Ascii mode and CSSID to 277 it is the CSSID we are running on the AS400.
The blob itself is CSSID 1252 and it looks like this when I pass it along to the FTP node.
I uses the following ESQL to set the CSSID and Encoding.
SET OutputRoot = InputRoot;
SET myChar = CAST(InputRoot.BLOB.BLOB AS CHARACTER CCSID 1252);
--CCSID InputRoot.Properties.CodedCharSetId
--ENCODING InputRoot.Properties.Encoding);
SET OutputRoot.Properties.CodedCharSetId = 277;
SET OutputRoot.Properties.Encoding = 277;
SET OutputRoot.BLOB.BLOB = CAST(myChar AS BLOB CCSID OutputRoot.Properties.CodedCharSetId
ENCODING OutputRoot.Properties.Encoding);
When I open it on the AS400 the special character are replaced by ?? an example will be "æ" looking like "??"
It looks for me like the message broker are putting in these ?? instead of the “æ”
What am I missing ?
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
A few points to remember
- Please encase your code snippets inside [C O D E] tages (see option above the text editor box.
- For long bits of fata (eg your blob, please wrap them around in your post. It will make it easier for others to read.
no onto your problem...
The value you are using for your encoding is wrong. It represents a different conversion feature than the CCSID. Please read up on what the Encoding property means. If you can't understand it please don't hesitate to ask.
Take a usertrace after inserting a TraceNode and outputting the ${Root}
does what you see there look ok? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Posted: Tue Aug 26, 2014 4:11 am Post subject: Re: FTP to AS400
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
Laurits wrote:
When I open it on the AS400 the special character are replaced by ?? an example will be "æ" looking like "??"
It looks for me like the message broker are putting in these ?? instead of the “æ”
What am I missing ?
You are missing some pretty basic facts:
Using ascii on the ftp assumes that the file / content is in the source platforms native CCSID.
As you have showed us this is not the case...
Your BLOB is in the target's CCSID. Hence you should be using binary as the format for the transfer.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum