FLAM Issue Tracker - FL5
View Issue Details
0000922FL54. Element, Byte, Record or other APIpublic2018-07-24 15:212018-08-21 11:34
Falk Reichbott 
Ulrich Schwab 
0000922: Pointer to pointer return values are not usable in MF-EDC Cobol programs
The pointer of the locate functions are not usable with SET ADDRESS OF in Cobol
No tags attached.
Issue History
2018-07-24 15:21Falk ReichbottNew Issue
2018-07-24 15:21Falk ReichbottStatusnew => assigned
2018-07-24 15:21Falk ReichbottAssigned To => Ulrich Schwab
2018-08-09 17:00Ulrich SchwabSummaryPointer to pointer return values are not usabele in MF-EDC Cobol programs => Pointer to pointer return values are not usable in MF-EDC Cobol programs
2018-08-09 23:36Falk ReichbottNote Added: 0001171
2018-08-21 11:31Falk ReichbottNote Added: 0001177
2018-08-21 11:34Falk ReichbottNote Added: 0001178
2018-08-21 11:34Falk ReichbottStatusassigned => resolved
2018-08-21 11:34Falk ReichbottFixed in Version => 5.1.18
2018-08-21 11:34Falk ReichbottResolutionopen => fixed

Falk Reichbott   
2018-08-09 23:36   
Publish a new build where pointer mapping functions are used. Now we wait for the corresponding fix in MF-EDZ.
Falk Reichbott   
2018-08-21 11:31   
cobget_pointer() and cobget_pointer() do not handle mainframe <-> native pointer conversion, and there is no possibility of them being changed.
These calls are designed to be used from C. They read or write a native pointer from a pointer item in a COBOL structure.
They are required because COBOL fields are not aligned whereas C fields always are. Thus the only thing these functions do is handle the potential misalignment of the COBOL field. They do not manipulate the pointer value contained in this field in any way.

AMODE is generally only required when migrating code from the IBM mainframe. In addition, the code must contain pointer variables that are redefined by a comp-x item, or by a structure that assumes hilo byte order, and those redefinitions are used. Even then, I would only use AMODE if it were impossible to change the relevant code.

If you just want to do "pointer arithmetic" then you do not need to set AMODE. You can use the following constructs.

    01 myptr pointer.

        set myptr up by literal-1
        set myptr down by variable-1

Please let me know if this construct using the set statement can be used so you do not have to have AMODE set.
Falk Reichbott   
2018-08-21 11:34   
The pointer mapping for alignment is done, but there is no solution in MF-EDZ planed to support external libraries with AMODE=31 pointers. The only way to solve this issue, is to rework all the modules which require AMODE=31 in a target which needs our external libraries.