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 Index » WebSphere Message Broker (ACE) Support » Setting a Hex value in esql

Post new topic  Reply to topic
 Setting a Hex value in esql « View previous topic :: View next topic » 
Author Message
rahulk01
PostPosted: Tue May 12, 2020 5:46 am    Post subject: Setting a Hex value in esql Reply with quote

Apprentice

Joined: 26 Dec 2019
Posts: 35

Hi,
I have a requirement where I need to create a header and a trailer record for a mainframe application.
The header record starts with Hex(00) and trailer starts with hex(FF).
I tried the below code:
SET rHead.StartField = CAST(x'00' AS CHAR CCSID OutputRoot.Properties.CodedCharSetId);
And
SET rTrail.StartField = CAST(x'FF' AS CHAR CCSID OutputRoot.Properties.CodedCharSetId);
OutputRoot.Properties.CodedCharSetId is coming out to be 1208.
The output is being validated using a DFDL parser where this field is defined as a String with length 1 and length units as bytes.
The first statement is working fine, but while setting x'FF' it throws an error as below:
ImbConverterCPP::internalToUnicode
BIPmsgs 3 2135
Unconvertable character
Type 5
Text FF
Type 2
Text 1208

Please help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 12, 2020 6:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

That's to be expected: FF as a hex value is not associated with any character in CCSID 1208.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rahulk01
PostPosted: Tue May 12, 2020 6:25 am    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2019
Posts: 35

so what could be a possible solution to it? Mainframe app still wants x'FF' as the first character in the trailer record
Back to top
View user's profile Send private message
timber
PostPosted: Tue May 12, 2020 6:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

If you are working as an integration engineer then you should know the answer. If not, I strongly suggest that you do some research on Unicode, character sets and encodings. This article is a good read, and has helped a lot of people: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

Is there a reason why you are using CCSID 1208 (UTF8) when communicating with a COBOL app on a mainframe? Because you will never be able to produce your desired output unless you either
a) change the CCSID or
b) change the data type of the header and trailer indicator fields
Back to top
View user's profile Send private message
rahulk01
PostPosted: Tue May 12, 2020 6:47 am    Post subject: Reply with quote

Apprentice

Joined: 26 Dec 2019
Posts: 35

Thanks for the link, I am reading it now. I am a bit newbie in this area though.
Other IIB integration with Cobol app uses 1208 CCSID, so I thought of using the same.
Other interfaces don't need to use x'FF' so they work fine, my interface needs it so failed.
Back to top
View user's profile Send private message
timber
PostPosted: Tue May 12, 2020 10:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
Other IIB integration with Cobol app uses 1208 CCSID, so I thought of using the same.
Other interfaces don't need to use x'FF' so they work fine
You just got lucky. You should always pay attention to the CCSID when working with character data. You have just found out why
Quote:
my interface needs it so failed
Technically, the other interfaces need it too. They just haven't failed yet. If you work in this business you need to be just a little bit paraniod!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Setting a Hex value in esql
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.