I am making a small driver program to call another program. I just realized that I need to use pointers. I have been using the following variables:
01 CALLED-PROGRAM-ID PIC X(08) VALUE 'ACMPW067'.
01 RET-VAL PIC 9(02) VALUE 00.
01 IO-AREA PIC X(3200) VALUE '02501BE7436561 /101546945ALLALL000021183577'.
In the driver program, how do I set up some variables as pointers and put some valid info in them prior to sending them off to a called program? I need three pointers. The first one should point to an address which holds a module name like "acmpw022". The second pointer should point to an address which holds a return code... and I want to start it out as 00, which is for successful. The last pointer is for an IO area... the info we want brought back. It will be a mixed string of characters, up to 32000 bytes.
Here's a snippet of the called program:
LINKAGE SECTION.
01 LNK-MODULE-NAME-POINTER USAGE POINTER.
01 LNK-COMPLETION-CODE-POINTER USAGE POINTER.
01 LNK-IO-AREA-POINTER USAGE POINTER.
PROCEDURE DIVISION NTAPI USING LNK-MODULE-NAME-POINTER
LNK-COMPLETION-CODE-POINTER
LNK-IO-AREA-POINTER.
Any help would be greatly appreciated.
Thanks,
Rusty
01 CALLED-PROGRAM-ID PIC X(08) VALUE 'ACMPW067'.
01 RET-VAL PIC 9(02) VALUE 00.
01 IO-AREA PIC X(3200) VALUE '02501BE7436561 /101546945ALLALL000021183577'.
In the driver program, how do I set up some variables as pointers and put some valid info in them prior to sending them off to a called program? I need three pointers. The first one should point to an address which holds a module name like "acmpw022". The second pointer should point to an address which holds a return code... and I want to start it out as 00, which is for successful. The last pointer is for an IO area... the info we want brought back. It will be a mixed string of characters, up to 32000 bytes.
Here's a snippet of the called program:
LINKAGE SECTION.
01 LNK-MODULE-NAME-POINTER USAGE POINTER.
01 LNK-COMPLETION-CODE-POINTER USAGE POINTER.
01 LNK-IO-AREA-POINTER USAGE POINTER.
PROCEDURE DIVISION NTAPI USING LNK-MODULE-NAME-POINTER
LNK-COMPLETION-CODE-POINTER
LNK-IO-AREA-POINTER.
Any help would be greatly appreciated.
Thanks,
Rusty