Generated COBOL Data-Names Not Accessible in COBOL Program (178329)
The information in this article applies to:
- Microsoft COM Transaction Integrator for CICS and IMS 1.0
This article was previously published under Q178329 SYMPTOMS
COBOL generated by Component Builder (CB) may include data-names that can
not be used in COBOL program logic. In the following code snippet the data-
name, DIM3, occurs in two places, preceded by FILLER -- once in the ~INPUT-
AREA and once in the ~OUTPUT-AREA. Because of the presence of the FILLER,
COBOL code cannot refer to the DIM3 variables.
01 INCLUDEACTSIZE-INPUT-AREA.
05 ARRRSET5-6-7-DIM0 PIC 9(9) COMP.
05 ARRRSET5-6-7-DIM1 PIC 9(9) COMP.
05 ARRRSET5-6-7-DIM2 PIC 9(9) COMP.
05 FILLER OCCURS 5 TIMES.
10 FILLER OCCURS 6 TIMES.
15 FILLER OCCURS 7 TIMES.
20 DIM3 PIC 9(9) COMP.
20 ARRRSET5-6-7 OCCURS 50 TIMES.
25 MEMBER1 PIC S9(4) COMP.
25 MEMBER2 PIC X(40).
01 INCLUDEACTSIZE-OUTPUT-AREA.
05 RETVAL PIC S9(4) COMP.
05 ARRRSET5-6-7-DIM0 PIC 9(9) COMP.
05 ARRRSET5-6-7-DIM1 PIC 9(9) COMP.
05 ARRRSET5-6-7-DIM2 PIC 9(9) COMP.
05 FILLER OCCURS 5 TIMES.
10 FILLER OCCURS 6 TIMES.
15 FILLER OCCURS 7 TIMES.
20 DIM3 PIC 9(9) COMP.
20 ARRRSET5-6-7 OCCURS 50 TIMES.
25 MEMBER1 PIC S9(4) COMP.
25 MEMBER2 PIC X(40).
CAUSE
This problem can occur when using an IMS Remote Environment (RE) and a CICS
RE, but not when using a CICS LINK RE. Three additional things occur
together to cause the problem.
First, a recordset is declared and used for a parameter. The direction for
the parameter is specified as "Input and Output." That is why the ~INPUT-
AREA and the ~OUTPUT-AREA are both generated per the code snippet above.
Second, the parameter is declared as an array. In our example, the
parameter was declared as a multidimensional array with dimensions (5, 6,
7). The three FILLER items preceding the DIM3 variable are generated to
dimension the array in COBOL.
Third, the array properties of the parameter are set to "Include actual
size." That is why the three variables, ~DIM0, ~DIM1, and ~DIM2 are
generated. This array property also causes the DIM3 variables to be
generated. DIM0, DIM1, and DIM2 contain the actual count of each dimension
of the array. DIM3 contains the actual number of rows in the recordset.
In this example, the recordset property of the parameter was set to 50 for
"Group-Item Maximum Occurrences." That is why "ARRRSET5-6-7 OCCURS 50
TIMES" was generated.
WORKAROUND
After the COBOL is generated, it must be manually changed to replace the
FILLER statements with a usable COBOL data-name. Thereafter, it can be
included in a COBOL program and the two DIM3 variables can be individually
referenced to assign the row count for output or reference it for input.
STATUS
Microsoft has confirmed this to be a problem in SNA Server 4.0. A
supported fix is now available for SNA Server 4.0, but has not been
fully regression-tested and should be applied only to systems experiencing
this specific problem. Unless you are severely impacted by this specific
problem, Microsoft recommends that you wait for the next Service Pack that
contains this fix. Contact Microsoft Product Support Services for more
information.
Modification Type: | Minor | Last Reviewed: | 3/23/2004 |
---|
Keywords: | kbbug kbpending KB178329 |
---|
|