Page 1 of 1

regarding call statements

PostPosted: Mon Mar 29, 2010 1:15 pm
by pradeepgowda
suppose there are two programmes PROGRAMA and PROGRAMB. both program call PROGRAMC.

if i want to call PROGRAMC from PROGRAMB using a field of PIC X(25) AND i want to call PROGRAMC from PROGRAMA using
PIC X(100). is it possible. if not why, what will be the error and how to meet the above requirement

Program A:
WS-FIELDA PIC X(100).

CALL PROGRAMC USING WS-FIELDA

Program B:
WS-FIELDB PIC X(25).

CALL PROGRAMC USING WS-FIELDB

Re: regarding call statements

PostPosted: Mon Mar 29, 2010 5:16 pm
by Robert Sample
Of course it is possible to do this -- why would you not think so?

Your PROGRAMC, however, will need to be aware of how long the passed data is and not attempt to access the last 75 bytes when only 25 bytes were passed to it. Attempting to access those bytes could easily result in a S0C4 abend.