Author |
Message
|
Bravo |
Posted: Thu May 24, 2007 4:37 pm Post subject: Redefines problem in COBOL copybook |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi All,
I'm using WBIMB 5 and I have a copybook with REDEFINES in the following layout.
Code: |
01 CLAIM.
05 CLAIM-REC-COUNT PIC 9(03).
05 RECORD OCCURS 1 TO 9999 DEPENDING ON CLAIM-REC-COUNT.
10 REC-ID PIC X(02).
10 T1.
15 T1-SUM-CONTRACT-NO PIC X(07).
15 T1-SUM-COSUB PIC X(04).
15 T1-SUM-SO-CD-LOC PIC X(06).
15 T1-SUM-REGS-CUST-ACCT-NO PIC X(06).
15 T1-SUM-CUST-NAME-ABBR PIC X(12).
15 T1-SUM-DOMICLE-CTRY-CD PIC X(03).
15 T1-SUM-VEH-MDL-NO PIC X(11).
15 T1-SUM-VO-DB-CD PIC X(09).
15 T1-SUM-INVC-AMT-BEF-TAX PIC S9(07)V99.
15 T1-FILLER PIC X(31).
10 T2 REDEFINES T1.
15 T2-OPTION-CONTRACT-NO PIC X(07).
15 T2-OPTION-COSUB PIC X(04).
15 T2-OPTION-SO-CD-LOC PIC X(06).
15 T2-OPTION-REGS-CUST-ACCT-NO PIC X(06).
15 T2-OPTION-CUST-NAME-ABBR PIC X(12).
15 T2-OPTION-DOMICLE-CTRY-CD PIC X(03).
15 T2-OPTION-VEH-MDL-NO PIC X(11).
15 T2-OPTION-VO-DB-CD PIC X(09).
15 T2-OPTION-DB-CD PIC X(09).
15 T2-OPTION-SYS-GRP-NO PIC X(05).
15 T2-OPTION-CVRG-OPT-ID PIC X(04).
15 T2-OPTION-SUG-RTL-AMT PIC S9(07)V99.
15 T2-OPTION-OPT-RESV-AMT PIC S9(07)V99.
15 T1-FILLER PIC X(04).
10 T3 REDEFINES T1.
15 T3-VEH-CONTRACT-NO PIC X(07).
15 T3-VEH-COSUB PIC X(04).
15 T3-VEH-SO-CD-LOC PIC X(06).
15 T3-VEH-REGS-CUST-ACCT-NO PIC X(06).
15 T3-VEH-CUST-NAME-ABBR PIC X(12).
15 T3-VEH-DOMICLE-CTRY-CD PIC X(03).
15 T3-VEH-VEH-MDL-NO PIC X(11).
15 T3-VEH-VO-DB-CD PIC X(09).
15 T3-VEH-DELV-NO PIC X(17).
15 T3-VEH-INVC-PER-VEH PIC S9(07)V99.
15 T3-VEH-RESV-PER-VEH PIC S9(07)V99.
15 T3-FILLER PIC X(05).
|
Each Redefines is 98 bytes with the same length. After I imported the copybook the MRM defined as
CLAIM_REC_COUNT Type short
RECORD Type Claim_record min 1 and max 9999
REC_ID Type string
CHOICE ELEMENT Compound Type Choice, Type Content Closed
claim_record_t1 Compound Type sequence, Type Content Closed
claim_record_t2 Compound Type sequence, Type Content Closed
claim_record_t3 Compound Type sequence, Type Content Closed
I have coded ESQL to access different fields from records types
IF InputRoot.MRM.RECORD[1].REC_ID = '01'
SET Environment.Variables.Temp1 = "InputBody"."RECORD[1]"."CHOICE_Elem"."T1_SUM_CONTRACT_NO";
SET Environment.Variables.Temp2 = "InputBody"."RECORD[1]"."CHOICE_Elem"."T1_SUM_COSUB";
SET Environment.Variables.Temp3 = "InputBody"."RECORD[1]"."CHOICE_Elem"."T1_SUM_SO_CD_LOC";
SET Environment.Variables.Temp4 = "InputBody"."RECORD[1]"."CHOICE_Elem"."T1_SUM_REGS_CUST_ACCT_NO";
END IF;
IF InputRoot.MRM.RECORD[1].REC_ID = '02'
SET Environment.Variables.Temp5 = "InputBody"."RECORD[2]"."CHOICE_Elem"."T2-OPTION-CVRG-OPT-ID";
SET Environment.Variables.Temp6 = "InputBody"."RECORD[2]"."CHOICE_Elem"."T2-OPTION-SYS-GRP-NO";
END IF;
IF InputRoot.MRM.RECORD[1].REC_ID = '03'
SET Environment.Variables.Temp7 = "InputBody"."RECORD[3]"."CHOICE_Elem"."T3-VEH-VEH-MDL-NO";
SET Environment.Variables.Temp8 = "InputBody"."RECORD[3]"."CHOICE_Elem"."T3-VEH-VO-DB-CD";
END IF;
I even tried the other way,
IF InputRoot.MRM.RECORD[1].REC_ID = '01'
SET Environment.Variables.Temp1 = "InputBody"."CHOICE_Elem"."T1_SUM_CONTRACT_NO";
SET Environment.Variables.Temp2 = "InputBody"."CHOICE_Elem"."T1_SUM_COSUB";
SET Environment.Variables.Temp3 = "InputBody"."CHOICE_Elem"."T1_SUM_SO_CD_LOC";
SET Environment.Variables.Temp4 = "InputBody"."CHOICE_Elem"."T1_SUM_REGS_CUST_ACCT_NO";
END IF;
IF InputRoot.MRM.RECORD[1].REC_ID = '02'
SET Environment.Variables.Temp5 = "InputBody"."CHOICE_Elem"."T2-OPTION-CVRG-OPT-ID";
SET Environment.Variables.Temp6 = "InputBody"."CHOICE_Elem"."T2-OPTION-SYS-GRP-NO";
END IF;
IF InputRoot.MRM.RECORD[1].REC_ID = '03'
SET Environment.Variables.Temp7 = "InputBody"."CHOICE_Elem"."T3-VEH-VEH-MDL-NO";
SET Environment.Variables.Temp8 = "InputBody"."CHOICE_Elem"."T3-VEH-VO-DB-CD";
END IF;
Data is not assigned to Environment.Variables.
I have tried.
IF InputRoot.MRM.RECORD[1].REC_ID = '01' THEN
SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[1].T1.T1_SUM_CONTRACT_NO;
SET Environment.Variables.Temp2 = InputRoot.MRM.RECORD[1].T1.T1_SUM_REGS_CUST_ACCT_NO;
SET Environment.Variables.Temp3 = InputRoot.MRM.RECORD[1].T1.T1_SUM_VEH_MDL_NO;
END IF;
I got the following error,
Code: |
UserTrace BIP2537I: Node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN': Executing statement 'SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[<].T1.T1_SUM_CONTRACT_NO;' at (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.ArchiveIn, 9.8).
2007-05-24 17:30:21.824094 5141 UserTrace BIP2538I: Node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN': Evaluating expression 'InputRoot.MRM.RECORD[<].T1.T1_SUM_CONTRACT_NO' at (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.ArchiveIn, 9.42).
2007-05-24 17:30:21.836952 5141 UserTrace BIP2231E: Error detected whilst processing a message 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
2007-05-24 17:30:21.837011 5141 RecoverableException BIP2230E: Error detected whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-24 17:30:21.837022 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.Main, 4.3) Error detected whilst executing the SQL statement 'ArchiveIn();'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-24 17:30:21.837045 5141 RecoverableException BIP2934E: Error detected whilst executing the function or procedure 'ArchiveIn'.
The message broker detected an error whilst executing the function or procedure 'ArchiveIn'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-24 17:30:21.837053 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.ArchiveIn, 9.8) Error detected whilst executing the SQL statement 'SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[<].T1.T1_SUM_CONTRACT_NO;'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-24 17:30:21.837072 5141 ParserException BIP5167E: Custom Wire Format error while parsing/writing message 'msg_CLAIM'.
2007-05-24 17:30:21.837089 5141 ParserException BIP5171E: Custom Wire Format parsing error
An error occurred while parsing a Custom Wire Format message.
Current message : 'msg_CLAIM'
Current element : '78^T1_SUM_INVC_AMT_BEF_TAX'
Path from message root : '/59^T1'
Offset from start of message : 67
See following errors for more details.
2007-05-24 17:30:21.837106 5141 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'decimal'
Data : '1FUJBBC.K9'
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
Check that the message model is correct. Review previous messages for details of the message set and message type.
Check that the processed message is of the expected format and type.
2007-05-24 17:30:21.839429 5141 Error BIP2623E: Unable to open queue '' on WebSphere Business Integration queue manager '': completion code 2; reason code 2085.
A message flow node failed to open the indicated WebSphere Business Integration message queue. The error codes relate to the MQOPEN call.
Check the WebSphere Business Integration completion and reason codes in the WebSphere Business Integration Application Programming Reference manual to establish the cause of the error, taking any appropriate action. It may be necessary to restart the message broker after you have performed this recovery action. If the open failed because the queue manager or queue did not exist, define these objects to WebSphere Business Integration. If the failure of the open was because incorrect object names were specified, correct the message flow configuration and attempt to redeploy the message broker.
2007-05-24 17:30:21.852241 5141 Error BIP2232E: Error detected whilst handling a previous error in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.SUBFLOW_CS_COMMIT_ON_EXCPTN'.
The message broker has detected an error in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.SUBFLOW_CS_COMMIT_ON_EXCPTN' whilst handling a previous error.
See the following messages for details of the exception list associated with the original error. Thereafter messages will be associated with the new error.
2007-05-24 17:30:21.852252 5141 RecoverableException BIP2230E: Error detected whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-24 17:30:21.852289 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.Main, 4.3) Error detected whilst executing the SQL statement 'ArchiveIn();'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-24 17:30:21.852296 5141 RecoverableException BIP2934E: Error detected whilst executing the function or procedure 'ArchiveIn'.
The message broker detected an error whilst executing the function or procedure 'ArchiveIn'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-24 17:30:21.852306 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.ArchiveIn, 9.8) Error detected whilst executing the SQL statement 'SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[<].T1.T1_SUM_CONTRACT_NO;'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-24 17:30:21.852315 5141 ParserException BIP5167E: Custom Wire Format error while parsing/writing message 'msg_CLAIM'.
2007-05-24 17:30:21.852323 5141 ParserException BIP5171E: Custom Wire Format parsing error
An error occurred while parsing a Custom Wire Format message.
Current message : 'msg_CLAIM'
Current element : '78^T1_SUM_INVC_AMT_BEF_TAX'
Path from message root : '/59^T1'
Offset from start of message : 67
See following errors for more details.
2007-05-24 17:30:21.852348 5141 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'decimal'
Data : '1FUJBBC.K9'
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
Check that the message model is correct. Review previous messages for details of the message set and message type.
Check that the processed message is of the expected format and type.
2007-05-24 17:30:21.857641 5141 Error BIP2628E: Exception condition detected on input node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'.
The input node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2007-05-24 17:30:21.857654 5141 RecoverableException BIP2230E: Error detected whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.SUBFLOW_CS_COMMIT_ON_EXCPTN'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.SUBFLOW_CS_COMMIT_ON_EXCPTN'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-24 17:30:21.857662 5141 RecoverableException BIP2604E: Node failed to open WebSphere Business Integration queue '' owned by queue manager '': completion code 2; reason code 2085.
A message flow node failed to open the indicated WebSphere Business Integration queue, with the resulting WebSphere Business Integration completion and reason codes. The message flow attempts to open the queue periodically until the queue is defined. The message flow is not fully operational until this has been done.
Define the WebSphere Business Integration queue to the indicated queue manager. If the incorrect queue manager and/or queue name were specified, then correct the queue name using the Message Brokers Toolkit and redeploy the message broker.
2007-05-24 17:30:22.859205 5141 UserTrace BIP2631I: Backed out message being propagated to failure terminal; node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'.
Node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB' has received a message which has previously been backed out because of a processing error in the message flow. The MQMD 'backoutCount' of the message exceeds (or equals) the 'backoutThreshold' defined for the WebSphere Business Integration input queue. The message broker is propagating the message to the failure terminal of the node.
Examine the other messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2007-05-24 17:30:22.859586 5141 UserTrace BIP2638I: The MQ output node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.XWARR.CTRCTW.WMB.ERROR' attempted to write a message to queue 'OWL.I283.XWARR.CTRCTW.WMB.ERROR' connected to queue manager ''. The MQCC was '0' and the MQRC was '0'.
2007-05-24 17:30:22.859607 5141 UserTrace BIP2622I: Message successfully output by output node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.XWARR.CTRCTW.WMB.ERROR' to queue 'OWL.I283.XWARR.CTRCTW.WMB.ERROR' on queue manager ''.
|
What am I missing here? Do I have change any properties in Message set?
Any suggestion!! _________________ Bravo |
|
Back to top |
|
 |
kimbert |
Posted: Thu May 24, 2007 4:57 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Not sure what the problem is, but this is probably the best place to start:
Quote: |
2007-05-24 17:30:21.852348 5141 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'decimal'
Data : '1FUJBBC.K9' |
'1FUJBBC.K9' does not look like a decimal value to me. I would look for that string in the input bitstream and see whether that gave me a clue about what was going wrong. |
|
Back to top |
|
 |
Bravo |
Posted: Fri May 25, 2007 8:50 am Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi Kimbert,
Thanks for the response after checking Sign EBCDIC Custom for the field T1_SUM_INVC_AMT_BEF_TAX. Now you can see the data is -100.0.
Code: |
2007-05-25 09:43:45.999958 5141 UserTrace BIP2231E: Error detected whilst processing a message 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.OWL.I283.EXTD.WTY.DWAEWTCW.WMB'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
2007-05-25 09:43:46.000007 5141 RecoverableException BIP2230E: Error detected whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'.
The message broker detected an error whilst processing a message in node 'FLOW_OWL_I283_XWARR_CTRCTW_SYNC.MAIN'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-25 09:43:46.000019 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.Main, 4.3) Error detected whilst executing the SQL statement 'ArchiveIn();'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-25 09:43:46.000026 5141 RecoverableException BIP2934E: Error detected whilst executing the function or procedure 'ArchiveIn'.
The message broker detected an error whilst executing the function or procedure 'ArchiveIn'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2007-05-25 09:43:46.000038 5141 RecoverableException BIP2488E: (.FLOW_OWL_I283_XWARR_CVRGE_SYNC_MAIN.ArchiveIn, 9.8) Error detected whilst executing the SQL statement 'SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[1].T1.T1_SUM_CONTRACT_NO;'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2007-05-25 09:43:46.000045 5141 ParserException BIP5167E: Custom Wire Format error while parsing/writing message 'msg_CLAIM'.
2007-05-25 09:43:46.000053 5141 ParserException BIP5171E: Custom Wire Format parsing error
An error occurred while parsing a Custom Wire Format message.
Current message : 'msg_CLAIM'
Current element : '78^T1_SUM_INVC_AMT_BEF_TAX'
Path from message root : '/59^T1'
Offset from start of message : 67
See following errors for more details.
2007-05-25 09:43:46.000061 5141 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'decimal'
Data : '-100.0;'
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
Check that the message model is correct. Review previous messages for details of the message set and message type.
Check that the processed message is of the expected format and type.
|
Any suggestion. _________________ Bravo |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 25, 2007 11:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
2007-05-25 09:43:46.000061 5141 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'decimal'
Data : '-100.0;'
|
Again as Kimbert said check your data:
-100.0; is not a number. Which part of ';' can be interpreted as a digit ?? _________________ MQ & Broker admin |
|
Back to top |
|
 |
Bravo |
Posted: Tue May 29, 2007 10:46 am Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
After changing decimal to Alphanumric(String) now the flow is not throwing any exception.But I got another problem.
I tried simple esql to extract data from each record type '01','02' and '03'
Code: |
IF InputRoot.MRM.RECORD[1].REC_ID = '01' THEN
SET Environment.Variables.Temp1 = InputRoot.MRM.RECORD[1].T1.T1_SUM_CONTRACT_NO;
SET Environment.Variables.Temp2 = InputRoot.MRM.RECORD[1].T1.T1_SUM_REGS_CUST_ACCT_NO;
SET Environment.Variables.Temp3 = InputRoot.MRM.RECORD[1].T1.T1_SUM_VEH_MDL_NO;
END IF;
IF InputRoot.MRM.RECORD[2].REC_ID = '02' THEN
SET Environment.Variables.Temp3 = InputRoot.MRM.RECORD[2].T2.T2_OPTION_SYS_GRP_NO;
SET Environment.Variables.Temp4 = InputRoot.MRM.RECORD[2].T2.T2_OPTION_CVRG_OPT_ID;
END IF;
IF InputRoot.MRM.RECORD[3].REC_ID = '03' THEN
SET Environment.Variables.Temp5 = InputRoot.MRM.RECORD[3].T3.T3_VEH_DELV_NO;
END IF;
|
But I'm getting only the values of record '01' type.
Any suggestion!! _________________ Bravo |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 29, 2007 11:28 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The fixed-length segment of bitstream representing T1/T2/T3 will not be parsed until you reference one of T1, T2 or T3. Once you have referred to a member of the 'T1' structure the segment will be parsed and the message tree will contain T1 and its children. For that particular message, the message tree will never contain T2 or T3.
Not sure whether that answers your question. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 29, 2007 11:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I forget... does the "S" preclude treating this data as TDS? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 29, 2007 11:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
It's a fair point The TDS physical format could parse this particular message. It would be able to use REC_ID as a tag, and would automatically resolve the choice.
It's worth remembering that Bravo can create the CWF message definition quite easily by importing his copybook, and he probably needs to read REC_ID in his message flow anyway, so the advantage is not as great as it might sound.
Also, he might have other copybooks to import, in which case he may prefer to stick with a CWF-only solution.
Definitely worth mentioning, though. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 29, 2007 11:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I've always found with TDS, that anytime I needed to know what a particular tag was, since each tag had to be unique in the entire msg set, I could rely on knowing how the choice was resolved. Of course, then I did have to hardcode the tag values twice - once in the msgset and once in the code - but generally one doesn't expect tags to change very often...
And the TDS domain in the 6.0.2.0 is quite handy at noticing important values (like field lengths) from imported copybooks. So it might not be entirely necessary to stick with CWF just because one is coming from copybooks.
Also, of course, it's possible to manage this using multi-part CWF messages, and using the REC-ID as a message key. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Bravo |
Posted: Tue May 29, 2007 1:18 pm Post subject: |
|
|
Centurion
Joined: 03 Oct 2005 Posts: 146
|
Hi Kimbert,
Thanks for the response..I apologize not providing detail information.
Basically the given code is in a loop and inpust message is in sequences 01,02 and 03 records.
Code: |
WHILE recCntr <= Environment.Variables.recCount DO
CASE TRUE
WHEN InputRoot.MRM.RECORD[recCntr].REC_ID = '01' THEN
SET Environment.Variables.Temp1 =
InputRoot.MRM.RECORD[recCntr].T1.T1_SUM_CONTRACT_NO;
SET Environment.Variables.Temp2 =
InputRoot.MRM.RECORD[recCntr].T1.T1_SUM_REGS_CUST_ACCT_NO;
SET Environment.Variables.Temp3 =
InputRoot.MRM.RECORD[1].T1.T1_SUM_VEH_MDL_NO;
WHEN InputRoot.MRM.RECORD[recCntr].REC_ID = '02' THEN
SET Environment.Variables.Temp3 =
InputRoot.MRM.RECORD[recCntr].T2.T2_OPTION_SYS_GRP_NO;
SET Environment.Variables.Temp4 =
InputRoot.MRM.RECORD[recCntr].T2.T2_OPTION_CVRG_OPT_ID;
WHEN InputRoot.MRM.RECORD[recCntr].REC_ID = '03' THEN
SET Environment.Variables.Temp5 =
InputRoot.MRM.RECORD[recCntr].T3.T3_VEH_DELV_NO;
END CASE;
SET recCntr = recCntr + 1;
END WHILE;
|
When the REC_ID matches with type '01', Values are assigned from T1 with its children to EV but I'm not getting any values when the REC_ID matches with type '02' and '03'.
T2 and T3 are not getting expanded with its children. Debugger shows only T1 and its children.
Any suggestion. _________________ Bravo |
|
Back to top |
|
 |
|