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
Tell about how do you eliminate the duplicates?
Is the order of the when clause important in an evaluate statement? Is the order of the when clause significant in an evaluate statement?
how can we describe comp sync?
Mainframe project required Postby mache123 ยป Thu Jan 29, 2009 9:10 pm hello..... I want to know about some real time projects.If any one have any Mainframes project, please provide me documentation of it Or else give me the link where can I find that Mainframes projects with Documentation...... or suggest me any if......please
Can you define foreign keys?
What will happen if both steplib and joblib are specified?
what is the role of the is numeric clause?
What is the difference between the mro & isc?
What is the importance of common attribute?
Name and explain the type of locks?
What is the difference between version control and debugging tools?
what is the meaning, the advantages and which are the types of evaluate statement?
If a ceo wants to see all employees of the company from an online screen. How will be the design of the map from the developer point of view?
What is the function of the verb initialize?
what is difference between file-aid tool and file-aid utility?