we are working on a program that calls other programs and can't understand why it works correctly.
(I haven't figured out to post code without destroying the spacing. this is still in fixed format.)
this code in the calling program defines a data structure with one array:
D* Data Structure for tags to be created.
D TAG_ARRAY DS
D TA_TAGNBR 6 DIM(99)
this is the call:
D* Prototypes for Detail Maintenance.
D LIN40M36 PR EXTPGM('LIN40M36')
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
however, the called program LIN40M36 has tag_array defined as two arrays:
D* Data Structure for tags to be created.
D TAG_ARRAY DS
D TA_TAGNBR 6 DIM(99)
D TA_PRETAG 6 DIM(99)
D LIN40M36 PR EXTPGM('LIN40M36')
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
D
D LIN40M36 PI
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
if program LIN40m36 is expecting two arrays as that is how tag_array is defined, why does it work correctly when the calling program only sends 1 array?
(I haven't figured out to post code without destroying the spacing. this is still in fixed format.)
this code in the calling program defines a data structure with one array:
D* Data Structure for tags to be created.
D TAG_ARRAY DS
D TA_TAGNBR 6 DIM(99)
this is the call:
D* Prototypes for Detail Maintenance.
D LIN40M36 PR EXTPGM('LIN40M36')
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
however, the called program LIN40M36 has tag_array defined as two arrays:
D* Data Structure for tags to be created.
D TAG_ARRAY DS
D TA_TAGNBR 6 DIM(99)
D TA_PRETAG 6 DIM(99)
D LIN40M36 PR EXTPGM('LIN40M36')
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
D
D LIN40M36 PI
D CONTROL_XFER LIKE(CONTROL_DATA)
D TAG_XFER LIKE(TAG_ARRAY)
D H1_XFER LIKE(H1_RECORD)
if program LIN40m36 is expecting two arrays as that is how tag_array is defined, why does it work correctly when the calling program only sends 1 array?
Comment