Author |
Message
|
dsmq |
Posted: Fri Aug 02, 2002 7:26 am Post subject: Cobol Copybook |
|
|
Acolyte
Joined: 20 Jun 2002 Posts: 59
|
Hi
my output message contains some field delimiters. Can i write a cobol copy book with all my message definition field and import into my message set
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 02, 2002 7:38 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can either define your message into MRM-CWF or MRM-TDS format.
Yes, if using MRM-CWF, you could import your copybook with message defn into MessageSet. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
sgopal |
Posted: Fri Aug 02, 2002 7:47 am Post subject: |
|
|
Acolyte
Joined: 30 Jul 2002 Posts: 63
|
I think MRM-TDS is a better option because you can globally designate a delimiter at the Message Set or Message Type level. The MRM-CWF option would require message definition change in the copybook.
For future changes in the delimiter, it would be easier changing one delimiter than importing the copbybook again (default values) |
|
Back to top |
|
 |
dsmq |
Posted: Fri Aug 02, 2002 7:59 am Post subject: Cobol Copybook |
|
|
Acolyte
Joined: 20 Jun 2002 Posts: 59
|
Hi kiran
Thank for you reply.
if i am using MRM- TDS where should i give the message definition.and also my message contains the end of message charecter @ (Hex '03')
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 02, 2002 8:34 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
dsmq,
You will still be able to import Copybook in MRM-TDS. In report file, which is generated after you import copybook, it will say "CWF plug-in not found". Don't worry about this message. After doing import, it will create MRM elements and type for you as per your copybook layout.
Depending on your output message layout, you could set "Data Element Separation" in TDS tab for your type element.
Could you post a sample output message required? Also, I would like to know What is your input message type? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
dsmq |
Posted: Fri Aug 02, 2002 9:04 am Post subject: Cobol Copybook |
|
|
Acolyte
Joined: 20 Jun 2002 Posts: 59
|
Hi
My input message is XML and my output message is
OAG19FLV 12000099PGEN OAG19FLVFFFFFFFFXCND129 OAG19FLVIMFFLV 01190OAGFLV AR
C 8001 80010001 TIMF /TRNOAG19FLV\/STA001\/CNMCO\/FL1668\/D
OLMCO\/DSTEWR\/RDT1250\/RAT1549\/FLPP\@
whre / is field identifier and \ field delimiter. @ is end of message charecter(Hex '03')
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 02, 2002 10:05 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Your message layout is not very clear; it's split between 3 lines. Do you really have newline char as a part of your message?
Does your output message look like:
tag1/value1\tag2/value2\tag3/value3@ or
tag1/value1\/tag2/value2\/tag3/value3\@
where / is Tag data separator and \ is Delimiter?
Or is it completely different than above two formats? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
dsmq |
Posted: Fri Aug 02, 2002 11:19 am Post subject: Cobol Copybook |
|
|
Acolyte
Joined: 20 Jun 2002 Posts: 59
|
Hi kiran
Myoutput messaage contains header and fields
Header will like this
ERTT 356355567486536 UT RUEYTUYTY
following with header it contains fields.the fields format will be
/ACTCR\/MCPB\/MBBRR\/DOD04AUG02/0900\/PUD01AUG02/0900\/PULSYD\/DOLDRW\@
basically the fields are
/ACT
/MCP
/MBB etc
/tag1data1\/tag2data2\/tag3data3\@
where / field separator \ is delimiter.
Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 02, 2002 11:59 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi,
Now its more clear!
I woud do it like this:
Have two message types,
1. For header message, Data Element Seperation is set to Fixed Length.
2. For fields message, Data Element seperation is set to TaggedDelimited, where Tag length is 3 (Fixed Length) and Tag names are ACT, MCPm MBB, ....
Now create a new message type, containing above two Types. Define a MRM message of newly created MessageType.
In your compute node, do the transformation from input XML message. Output message after this compute node, will look like this:
ERTT 356355567486536 UT RUEYTUYTY/ACTCR\/MCPB\/MBBRR\/DOD04AUG02/0900\/PUD01AUG02/0900\/PULSYD\/DOLDRW\
Now, we need to add @ towards the end of the message. To do this, add RCD node after first compute node to reset MessageDomain to BLOB. In another compute node write ESQL code to append X'03' to it.
SET OutputRoot."BLOB"."BLOB" = InputRoot."BLOB"."BLOB" || X'03';
your message flow will look like this:
MQInput->....->Compute1->RCD->Compute2->MQOutput
Hope this helps. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Miriam Kaestner |
Posted: Fri Aug 02, 2002 12:29 pm Post subject: |
|
|
Centurion
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
|
Alternative solution: Define a Group Terminator of x'03' for the fields message Compound Type. This would spare you both the RCD and Compute2 nodes. |
|
Back to top |
|
 |
kirani |
Posted: Fri Aug 02, 2002 1:00 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
didn't know that GroupTerminator can be used without GroupIndicator!!
Thanks for clearing this Miriam  _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|