Author |
Message
|
bugsy |
Posted: Sat Oct 30, 2004 2:09 pm Post subject: Importing copybook with COMP field. |
|
|
Newbie
Joined: 30 Oct 2004 Posts: 3
|
Hello,
I'm a newbie in WBI development. I'm trying to create a message set by importing a COBOL copybook that has a packed field. I haven't encountered any problems importing copybooks with simple field types such as pic x or pic 9, but I don't think I'm doing it correctly when I'm importing COMP fields. Below is a sample of my copybook.
01 OUT-REC.
05 OUT-HEADER.
10 X-DATA-1 PIC X(10).
10 OUT-H-LENGTH PIC X(02) COMP.
10 X-CARRIAGE-RETURN PIC X(01).
05 OUT-C-MESSAGE-TEXT OCCURS 10.
10 X-DATA-2 PIC X(05).
10 X-DATA-3 PIC 9(02)V9(05).
I don't receive any errors or warning when I try to create the message definition but when I run the message flow, I get the following error message from my event log...
"The CWF parser or writer could not find any Physical Format with the specified WFI in this message set."
I'm assuming that the culprit is related to the field OUT-H-LENGTH but I am not certain of that either. The message I submitted into the input queue also contains a control-character for the field X-CARRIAGE-RETURN. It's coming from a mainframe environment.
I used the default configuration during the import process but I really do not know if I configured it properly when it comes to COMP fields or when to use EBCIDIC values etc... Can someone provide me with a list of step-by-step instructions or point me in the right direction. I'm obviously doing something wrong in the process and I have no idea what...
BTW, my setup is a WBI (5.03) running on Windows XP.
Thanking you in advance.
Dazed and confused....  |
|
Back to top |
|
 |
JT |
Posted: Sat Oct 30, 2004 6:58 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
It's been a long time since I've coded in COBOL, but I believe this copybook element:
Code: |
10 OUT-H-LENGTH PIC X(02) COMP. |
should be numeric:
Code: |
10 OUT-H-LENGTH PIC 9(02) COMP. |
Quote: |
....that has a packed field. |
If I'm not mistaken a COMP designation represents a binary number. COMP-3 represents a packed decimal. |
|
Back to top |
|
 |
bugsy |
Posted: Mon Nov 01, 2004 5:28 am Post subject: Packed field |
|
|
Newbie
Joined: 30 Oct 2004 Posts: 3
|
Thanks for the promp reply JT.
I changed the copybook to
10 OUT-H-LENGTH PIC 9(02) COMP.
but I'm STILL GETTING THE SAME ERROR MESSAGE on the EVENT LOG. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 01, 2004 6:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
'WFI' stands for 'Wire Format Idenfifier'. This is not the same as the name displayed on the CWF properties tab in the 2.1 tooling. It is a property of the CWF wire format.
You should check that your Input node (or RFH2 header, if you're using one) specifies the 'Format' property correctly. |
|
Back to top |
|
 |
JT |
Posted: Mon Nov 01, 2004 6:15 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Does this message definition describe the output message (OUT-REC)? If so, what value are you setting for Properties.MessageFormat?
To better assist you please post your ESQL code. |
|
Back to top |
|
 |
bugsy |
Posted: Wed Nov 03, 2004 7:03 am Post subject: |
|
|
Newbie
Joined: 30 Oct 2004 Posts: 3
|
Hi JT,
I do have a msg_OUTREC generated by WBI.
OUT_H_LENGTH is described as xsd:short. The value constraints have been defaulted from a MIN value of 0 to a MAX of 99.
X_CARRIAGE is described as xsd:string. It has a MAX value of 1.
Is this what you were asking for? Should I change the above values?
Below is the ESQL you requested...
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- Declare local variable
DECLARE TempDate CHAR;
-- Set the MQ Message Description.
SET OutputRoot.MQMD = InputRoot.MQMD;
-- Set properties to identify the output message.
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.Properties.MessageFormat='CWF';
SET OutputRoot.Properties.MessageType='msg_LIDO_FUP_MSG';
-- Set the output message detail fields...
SET OutputRoot.MRM.LIDO_FUP_DETAIL.FUP_AIRPORT_IATA1 = InputRoot.MRM.OUT_HEADER.OUT_DATA_2;
SET OutputRoot.MRM.LIDO_FUP_DETAIL.PRICE = InputRoot.MRM.OUT_C_MESSAGE_TEXT.X_DATA_3;
SET OutputRoot.MRM.LIDO_FUP_DETAIL.NUMBER = InputRoot.MRM.OUT_HEADER.OUT_H_LENGTH;
RETURN TRUE;
END;
thank you |
|
Back to top |
|
 |
JT |
Posted: Wed Nov 03, 2004 8:02 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
You need at least one additional line of ESQL code:
Quote: |
SET OutputRoot.Properties.MessageSet = 'Message Set Identifier'; |
*where Message Set Identifier is the 13-digit id assigned to the corresponding message set. |
|
Back to top |
|
 |
|