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 » COBOL - REDEFINED elements - Handling in WMB v8

Post new topic  Reply to topic
 COBOL - REDEFINED elements - Handling in WMB v8 « View previous topic :: View next topic » 
Author Message
shilpa.sabade
PostPosted: Fri Feb 07, 2014 2:44 pm    Post subject: COBOL - REDEFINED elements - Handling in WMB v8 Reply with quote

Voyager

Joined: 23 Feb 2011
Posts: 76

I have a cobol copy book with REDEFINE Statements ;
Code:


         05  CONV-ITM-CDGT                PIC  9(01)        COMP-3.   00600000
             88  CONV-ITM-CDGT-GOOD       VALUES 0 THRU 9.            00610000
             88  CONV-ITM-CDGT-DEFAULT    VALUE  0.                   00620000
         05  CONV-ITM-CDGT-CHAR           REDEFINES                   00630000
               CONV-ITM-CDGT                PIC  X(01). 



when i create messageset .. it looks as below:

Code:


CONV_DATA
      Redefinedelemt_itemlayout_##3##
                  CONV-ITM-CDGT               xsd:short
                  CONV-ITM-CDGT-CHAR       xsd:string


Flow ; MQInput -- MAPPING ----MQOUT --- MQGET (GET REPLY ) --- COMPUTE ( DB)

MQInput is configured to parse the incoming MRM,

My Observation/Issues

1. When i see incoming message in Debugger ... All Redefined elements do not show up ... rest of the elements .. show correct values.

2. In Mapping node when i import this message set .. Mapping node lists all elements in order ..including those redefined...

3. When i map -- redefined elements to output ... values dnt get populated ..

Please suggest .. how to handle these redefined elements?

Thank you
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 08, 2014 4:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Redefined elements are typically described in the model as a choice.
You can address either of the forms but never both.
This means that the first time you address one of the values in the choice you are stuck with using this choice branch.

Tell those COBOL programmers not to overload their copy books to the point where you have to inspect the content before you can choose which branch to take in the choice.

This may also be due to a lack of initialization of the record (bad practice). Redefining any structure as pic X(n) allows you to glance over undefined areas like fillers where the structure of the data may as well be binary as text...

In a correct structure you should never have a comp-3 redefined as text.
You may have a pic 9(y) redefined as a pic X(y) but this is then just between different text representations of the same entity....

If you cannot choose depending on data discovered BEFORE the redefines wich branch of the choice you are going to use, you need to have your COBOL programmers deliver you a "better" copy book where you can resolve the choice before it is upon you.

Hope it helps
_________________
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 » COBOL - REDEFINED elements - Handling in WMB v8
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.