Bill, you got me on that one. Open for suggestions. I could simply do pointer arithmetic, but this way worked so I went with it. If I separated the control area and still only pass the address of the table area back to the client, how do you suggest I "anchor" it?
Use of UNBOUNDED to make it more explicit that there is no particular maximum number of rows. I used COMP with TRUNC(OPT). Aren't you one who said that COMP with TRUNC(OPT) performs better than COMP-5? Thanks, Frank ________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Bill Woodger <bill.wood...@gmail.com> Sent: Monday, August 8, 2016 6:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Enterprise COBOL API for dynamic capacity tables "leftmost-character-position Must be an arithmetic expression. The evaluation of leftmost-character-position must result in a positive nonzero integer that is less than or equal to the number of characters in the data item referenced by data-name-1." So, you are using undefined behaviour (and non-Standard at that). IBM have now allowed zero to be valid for leftmost-character-position (again non-Standard, although I don't think it is listed as an IBM Extension). Negative reference-modification? No. Of course, it is like a zero/negative subscript. Until someone comes along and changes the compiler, that is not allowed, but it is known exactly how it operates. However, if IBM do change the compiler - what then? I'd either look to use a separate control-area, come up with a more secure way of referencing an "attached" one, or remove the need for a control-area. Out of interest, why COMP not COMP-5? Do you feel there is a benefit to using UNBOUNDED over a plain ODO? After all, UNBOUNDED is an IBM Extension to allow for dynamically-sized tables (although not *those* dynamically-sized tables). It's tough to say then that "IBM doesn't allow it". ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN