Author |
Message
|
alaychem |
Posted: Mon Jun 13, 2016 4:41 am Post subject: Converting signed ebcidic values to integers |
|
|
Acolyte
Joined: 10 Feb 2016 Posts: 66
|
Hi all
Is there an "easy" way to convert signed ebcidic recived as BLOB to integers in ESQL?
I know I could do it manually with string conversion methods(eg. replace c0 with f0), but is there a way to use CAST function to handle it? |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 13, 2016 4:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use a DFDL model. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
alaychem |
Posted: Mon Jun 13, 2016 4:57 am Post subject: |
|
|
Acolyte
Joined: 10 Feb 2016 Posts: 66
|
Well, that was the first solution of course.
the problem is, that the guy that sends me the BLOB sends also unconvertable characters in the BLOB , and he dememds that I will ignore the "garbdge".
so DFDL parsing is not an option . |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 13, 2016 5:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'll wait for timber to correct me, but you should be able to model any set of bytes with dfdl, as long as you mark the "bad" sections so that they aren't treated as anything other than bytes.
In terms of getting the message somewhere that your DFDL can be applied, you'll have to configure your input node not to do any data conversion.
And also explain to the other person's management chain that they are creating and maintaining broken software that adds significant risk to the functions being exposed. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
alaychem |
Posted: Mon Jun 13, 2016 5:35 am Post subject: |
|
|
Acolyte
Joined: 10 Feb 2016 Posts: 66
|
That actually worked pretty well... ty.
About the other guy... the problem with working at big, old organizations is that you have to work with big (ego), old (and fixed minded) people.
Thanks again. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 13, 2016 5:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
alaychem wrote: |
the problem with working at big, old orginazations |
I might know something about that.
But "risk" and "management" are usually words that produce change. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|