Author |
Message
|
leopucci |
Posted: Tue Dec 26, 2017 11:51 am Post subject: BLOB first value comparison ex: X'F1' compare F |
|
|
Apprentice
Joined: 09 Nov 2017 Posts: 28
|
Hey there!
Does anyone knows how to compare the first letter of the pair on the blob?
I am trying to distinguish ebcdic from ascii.
I want this to be cpu friendly, so i will not convert the data do DFDL, at first i will filter out some messages based on the beginning of the data.
To do so, i want to detect the first letter, if start with F (F1, F2, ETC) i know that is ebcdic.
If starts with 31,32,33 i know that is ascii..
The problem is that did not succeeded making substring on blob in the first value. (X'F1')
Any clues?
Thanks
Pucci |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 26, 2017 1:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
It gets more complicated... You also need to make the distinction between
'F1' and 'F1' where there is in fact no 'F1' value
example x'6F1F' ...
you should really look at InputRoot.Properties.CodedCharSetID ...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
leopucci |
Posted: Tue Dec 26, 2017 1:30 pm Post subject: |
|
|
Apprentice
Joined: 09 Nov 2017 Posts: 28
|
fjb_saper wrote: |
It gets more complicated... You also need to make the distinction between
'F1' and 'F1' where there is in fact no 'F1' value
example x'6F1F' ...
you should really look at InputRoot.Properties.CodedCharSetID ...
Have fun  |
I want to just make an IF statement...
Code: |
IF FIELD = 'f' THEN
--its ebcdic
ELSE
--its ascii
END IF;
|
But this does not work! |
|
Back to top |
|
 |
JosephGramig |
Posted: Thu Dec 28, 2017 11:20 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
This looks like an IIB topic and not General.
Is there a reason you are resistant to fjb_saper's answer? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Dec 28, 2017 1:15 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Moved to Broker forum. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 02, 2018 6:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
JosephGramig wrote: |
This looks like an IIB topic and not General.
Is there a reason you are resistant to fjb_saper's answer? |
A simple IF to check if the CCSID is an EBCDIC one is the simple answer to this requirement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|