Author |
Message
|
muthu121521 |
Posted: Wed Apr 03, 2019 11:11 am Post subject: CICS DFDL Parsing Issue \u0000\u0000\u0000\f\u0000\f |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 36
|
Hi All,
I am parsing the CICS Cobol copybook response and assign that to a variable.
for some fields I am getting the below values
'\u0000\u0000\u0000\f\u0000\f'
but when in debug mode for that field , i am not able to see any special character or '\u0000\u0000\u0000\f\u0000\f' post the cics call invocation.
Can any one let me know how to get rid of that response characters '\u0000\u0000\u0000\f\u0000\f' .
I have tried to cast it as character with ccsid 1208 546 encoding, same issue persists |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 03, 2019 11:22 am Post subject: Re: CICS DFDL Parsing Issue \u0000\u0000\u0000\f\u0000\f |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
muthu121521 wrote: |
for some fields I am getting the below values
'\u0000\u0000\u0000\f\u0000\f' |
It's very common for MF CICS application to use X'00' in variables that are not set; literally nulling them out.
muthu121521 wrote: |
but when in debug mode for that field , i am not able to see any special character or '\u0000\u0000\u0000\f\u0000\f' post the cics call invocation. |
a) the debugger is notoriously bad with parsing and data issues, because it has to parse the data to show it in the debugger.
b) what were you expecting to see? That's not a displayable character.
muthu121521 wrote: |
Can any one let me know how to get rid of that response characters '\u0000\u0000\u0000\f\u0000\f' . |
Why do you want to get rid of them, rather than processing them as the nulls they are? While the DFDL wizard that converts copybooks won't do that, it's perfectly possible to edit it such that they're handled.
muthu121521 wrote: |
I have tried to cast it as character with ccsid 1208 546 encoding, same issue persists |
Of course it does. The x'00' value is NULL in every character set I'm familiar with and never printable.
How did you come up with 1208? If anything, one of the EBCDIC sets would have made more sense (and still not helped). I'm just curious. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 03, 2019 11:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
To prove I'm not making this up (as if I would!), see here.
LOW-VALUES is the COBOL constant that represents 1-n X'00' characters. You see the same principle at work with the MQC constants or the BrokerName variable in IIB.
Hope this clarifies. MF people; we're just a set of wacky  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
muthu121521 |
Posted: Wed Apr 03, 2019 11:47 am Post subject: |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 36
|
I have a requirement to sent that as json reply with out transforming it , so in the json reply i am getting it as '\u0000\u0000\u0000\f\u0000\f' how do i remove that ? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 03, 2019 11:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
muthu121521 wrote: |
I have a requirement |
From whom? Why?
muthu121521 wrote: |
to sent that as json reply with out transforming it
...
how do i remove that ? |
Which is it? Don't transform it or remove the null values? It can't be both.
If you just want to send it, send it. If you want to remove them, adjust the DFDL model as I describe above to recognize these as nulls. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
muthu121521 |
Posted: Wed Apr 03, 2019 12:13 pm Post subject: |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 36
|
I have reimported my cobolcopybooks by selecting the options for strings to recognize the null values ,even then i am getting the below characters for another field with carriage feed attached to it.
'\u0000\u0000\u0000\f\u0000\f' |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 04, 2019 4:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
muthu121521 wrote: |
I have reimported my cobolcopybooks by selecting the options for strings to recognize the null values ,even then i am getting the below characters for another field with carriage feed attached to it.
'\u0000\u0000\u0000\f\u0000\f' |
Vitor wrote: |
While the DFDL wizard that converts copybooks won't do that,it's perfectly possible to edit it such that they're handled. |
Remember that the original MF data won't have carriage feed characters in it (because that concept doesn't exist in z/OS).
You talk about "the CICS call invocation"; so to be clear you're using the CICS node in IIB to call the CTG? Are you using containers or COMMAREA? Is there any intermediate conversion going on? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
muthu121521 |
Posted: Thu Apr 04, 2019 5:25 am Post subject: |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 36
|
Vitor wrote: |
muthu121521 wrote: |
I have reimported my cobolcopybooks by selecting the options for strings to recognize the null values ,even then i am getting the below characters for another field with carriage feed attached to it.
'\u0000\u0000\u0000\f\u0000\f' |
Vitor wrote: |
While the DFDL wizard that converts copybooks won't do that,it's perfectly possible to edit it such that they're handled. |
You talk about "the CICS call invocation"; so to be clear you're using the CICS node in IIB to call the CTG? Are you using containers or COMMAREA? Is there any intermediate conversion going on? |
I am using Channel Containers to call the CICS Service and parsing it using the containers.
All other fields which was sending only \u0000\u0000 was defaulted to null when i set the low values set to null by changing the dfdl parse options for the copybook containers. |
|
Back to top |
|
 |
|