ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportFTP to AS400

Post new topicReply to topic
FTP to AS400 View previous topic :: View next topic
Author Message
Laurits
PostPosted: Mon Aug 25, 2014 10:22 pm Post subject: FTP to AS400 Reply with quote

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);


BLOB = "
484541313138383235303020202020202020202020202020202020202020
202020343036333733392020202020202020202020202020202020202020
202020203430363337333920200d0a54454b52696e6720696e64656e206c6
5762e20746c663a2032303830383036380d0a54454b32303830383036380
d0a564152303020202020202020202020202020202020202020202020202
0203736313330303030303030303030303031303073746b2020202020202
0204966f6205369676e2076e66768e66e677420746f696c65742069206876
6964206d2f20303030303030303030323831393835390d0a4c454f4a6f6e61
7320546f676f204c616e64657220202020202020202020202020202020202
020202020202020202020202020202020202020202020202020486f6c6d65
67e572647376656a20202020202020202020202033352020202020202020
202020203334303048696c6c6572f8642020202020202020202020202020202020323038303830363820202020"


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 ?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Aug 25, 2014 11:32 pm Post subject: Reply with quote

Jedi Council

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.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 26, 2014 4:11 am Post subject: Re: FTP to AS400 Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
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.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportFTP to AS400
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.