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 » Calling DB2 MainFrame stored procedure from IIB9

Post new topic  Reply to topic
 Calling DB2 MainFrame stored procedure from IIB9 « View previous topic :: View next topic » 
Author Message
pandug
PostPosted: Sun Mar 08, 2015 3:07 am    Post subject: Calling DB2 MainFrame stored procedure from IIB9 Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Mar 09, 2015 4:42 am    Post subject: Re: Calling DB2 MainFrame stored procedure from IIB9 Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 09, 2015 7:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling DB2 MainFrame stored procedure from IIB9
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.