How do you pass pointer PL/1 main procedure to sub
procedure?
Answer Posted / mithun kilikdar
If we need to pass variables from one procedure to another
procedure or from one pgm to another pgm then we can
directlt pass the variables. Or one more way is to pass
poiters. Below is the example:
PROGRAM_A: OPTIONS(MAIN) REENTRANT:
DCL FORE_NAME CHAR(20) INIT('');
DCL SUR_NAME CHAR(20) INIT('');
DCL PTR1, PTR2 POINTER;
:
:
PTR1 = ADDRESS(FORE_NAME);
PTR2 = ADDRESS(SUR_NAME);
CALL PROGRAMB_( PTR1
, PTR2
);
:
:
END; /*PROGRAM_A*/
PROGRAM_B: OPTIONS(P_PTR1
,
P_PTR2
);
/*DECLARATION*/
DCL PTR1, PTR2 POINTER;
/*INTERNALIZATION*/
PTR1 = P_PTR1;
PTR2 = P_PTR2;
:
:
/* USE PTR1 AND PTR2 TO USE FORE_NAME AND SUR_NAME
END; /*PROGRAM_B*/
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How do you get parameter from JCL to PL1?
Can you define path?
How do you find whether any generations exist under a gdg base?
what u mean by csrloc and rtncsrloc in rpgIV in as/400.Give an eg? to do...give some coding...what is row no and column no ???..if possible...give a no of lines coding....please
how can we repair a soc-7 error?
What is the mainframe testing? Categorize the mainframe manual testing?
Can records be accessed randomly in esds?
Can you explain create an empty file by using sort?
How to move a field DT 9(8) of input file to DT 9(8) COMP-3 in output file in ezytrieve? in the output file entire dt is not moved.If any answer plz reply as soon as possible.
what is u r recent task in insurence project?..plz tell how to tell this.
How IBM framework work?
suppose if you added a coloumn to db2 table, How would it be the Impact analysis?
what is unit testing ? on which basis you will write test case ?
List the type of locks and explain each of them.
When the job statement is used?