A two dimensional array with both being variable length. First array can occur from 1 to 100 times and the inner array from 1 to 10 times. The inner array is declared to a fixed length 10 rather than defining it as Occurs Depending ON clause. Module A creates the data that populates to this array (The layout contain additional fields to the array) and pass it on to Module B via linkage. Module B creates XML structure of this layout. Since the inner array is hard coded to 10 lots of unused bits are being transferred to the subsequent application thereby causing degradation of performance. My goal is to get the final XML structure with only valid values. Either
1. Only the valid values of the inner array needs to be created by module A and pass it to Module B or
2. Module A can pass the entire array layout with unused values and module B can create XML structure and then truncate to the valid values.
Please let me know as how can I implement this complex ODO.
Variable length Two dimensional Array
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 2
- Joined: Tue Apr 10, 2012 8:52 pm
From the Enterprise COBOL Language Reference:
I suspect the ODO will not add anything really useful to the code - and it will allocate the max bytes anyway, so it may be best to remove this. Build only what is needed for the XML structure(s) in the fixed nested arrays.
Looks like you'll need another approach.The object of the OCCURS DEPENDING ON clause cannot be variably located; the object cannot follow an item that contains an OCCURS DEPENDING ON clause.
I suspect the ODO will not add anything really useful to the code - and it will allocate the max bytes anyway, so it may be best to remove this. Build only what is needed for the XML structure(s) in the fixed nested arrays.
Have a good one
-
- Member
- Posts: 2
- Joined: Tue Apr 10, 2012 8:52 pm
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
you may want to look into the verification side of the xml generate,
possibly you can establish a rule, where binary zeroes are not allowed,
yet give no error?
or an error that you accept as OK.
back to the technical side:
maybe you have to add a counter in the first dimension (for the second)
and break-up you xml generate into 3 parts:
1. for everything prior to the 2 demensional table
2. a COBOL loop whereby
each item in the first demension is passed to the XML Generate as a group item
with the appropriate 2d demsion items as a table subordinate to the group ittem
(which was the item from the first demeinsion
and the 2nd demension counter (now part of the group item
will compile as a simple ODO and the XML Generate will function as demo'd)
3. for everything after the table.
possibly you can establish a rule, where binary zeroes are not allowed,
yet give no error?
or an error that you accept as OK.
back to the technical side:
maybe you have to add a counter in the first dimension (for the second)
and break-up you xml generate into 3 parts:
1. for everything prior to the 2 demensional table
2. a COBOL loop whereby
each item in the first demension is passed to the XML Generate as a group item
with the appropriate 2d demsion items as a table subordinate to the group ittem
(which was the item from the first demeinsion
and the 2nd demension counter (now part of the group item
will compile as a simple ODO and the XML Generate will function as demo'd)
3. for everything after the table.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page