How do you pass pointer PL/1 main procedure to sub
procedure?
Answer / 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 |
what is the meaning, the advantages and which are the types of evaluate statement?
What are the different types of table spaces?
what about F1 & F2 keys in xpeditor? And their functionalities?
What is meant by an isolation level?
What is mainframe testing?
What is downtime and what might be the reason?
What is the advantage of defragmentation?
WHAT IS 3.12,3.14 ? DIFFERENCES?
88 level entry is for
7 Answers Accenture, Cognizant, EDS, Wipro,
When are scope terminators compulsory?
Explain ibm z?
What is z os in mainframe?