Calling a PL/I module thru pointer

Go down

Calling a PL/I module thru pointer

Post  kasthuri on Sun Jan 27, 2013 6:42 pm

Hi,

I wanted to call a PL/I main module(REBB001) from anther PL/I main module(REBB0000). The call is getting thru but the called module has junk values passed.

This is how the piece of code looks like:

REBB0000 - Calling module:
DCL REBB001 EXTERNAL ENTRY(PTR);

#INCLUDE REIXXXX3 /* include for input */
#INCLUDE REIXXXX4 /* include for output */

DCL 1 REBB001_IN unaligned LIKE RE_INPUT;
DCL 1 REBB001_OUT unaligned LIKE RE_OUTPUT;

DCL 1 COMMAREA_REBB001 PTR;
DCL 1 REBB001_PTR BASED(COMMAREA_REBB001),
3 REBB001_IN_PTR PTR INIT(ADDR(REBB001_IN)),
3 REBB001_OUT_PTR PTR INIT(ADDR(REBB001_OUT));

Assigning value to input variables
REBB001_IN.xxxxxx = 'VVVV'

CALL REBB001(COMMAREA_REBB001);

REBB001 - Called Module
REBB001: proc(comm_ptr) options(main, reenterant);

DCL 1 COMM_ptr PTR;
DCL 1 REBB001_PTR BASED(COMM_ptr),
3 REBB001_IN_PTR PTR,
3 REBB001_OUT_PTR PTR;

#INCLUDE REIXXXX3 /* include for input */
#INCLUDE REIXXXX4 /* include for output */

DCL 1 INPUT UNALIGNED BASED(REBB001_IN_PTR) LIKE RE_INPUT;

I get junk value in input. Could you explain me why?

Thanks!

kasthuri

Posts : 212
Join date : 2013-01-27

View user profile

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum