|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Calling DB2 MainFrame stored procedure from IIB9 |
« View previous topic :: View next topic » |
Author |
Message
|
pandug |
Posted: Sun Mar 08, 2015 3:07 am Post subject: Calling DB2 MainFrame stored procedure from IIB9 |
|
|
Newbie
Joined: 18 Feb 2010 Posts: 4
|
Hello,
I'm currently having requirement as shown below.
MainFrame --> IIB --> MainFrame(DB2) stored procedure.
MainFrame team have provided cobol copy book and based on that I have created DFDL message model. After that I used below ESQL code to create input data for DB2 stored procedure. Because DB2 stored procedure required varchar data as an input.
DECLARE ErrorRecord CHARACTER SUBSTRING(CAST(ASBITSTREAM(InputRoot.DFDL ENCODING 785 CCSID 037 ) AS CHARACTER CCSID 037) FROM 49 FOR 3716);
I can see DFDL is properly parsing the incoming data from mainframes. But after executing above ESQL code.
I observed that PIC X data types from mainframes being converted readable formate in ESQL. rest of the data tyeps like PIC S9(16)V USAGE COMP-3 are not converted to character data type instead of that I can see special characters.
Because of this DB2 stored proc is failing to insert the data.
Prompt response I really appreciate.
Thanks,
Pandug |
|
Back to top |
|
 |
Vitor |
Posted: Mon Mar 09, 2015 4:42 am Post subject: Re: Calling DB2 MainFrame stored procedure from IIB9 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pandug wrote: |
I observed that PIC X data types from mainframes being converted readable formate in ESQL. rest of the data tyeps like PIC S9(16)V USAGE COMP-3 are not converted to character data type instead of that I can see special characters. |
That's because a PIC X is a readable character represenation. A signed number (PIC S9 etc) may or may not be, and certainly isn't when it's USAGE is as a computable number (COMP-3), when it's held internally as a packed decimal format. Think of the different between a string data type and an int.
If the ESQL you quoted were to work, I think you'd need a different encoding and and I don't think you could use that ESQL when the returned string contained a mix of PIC X & COMP-3 numbers. I think you'd have to work at a field level myself. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Mar 09, 2015 7:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you need to log the original, log the BLOB. If you need to log the tree, serialize it with a different parser, XMLNSC for instance... and each field should be readable  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|