How do you pass pointer PL/1 main procedure to sub
procedure?



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

Post New Answer

More IBM MainFrame AllOther Interview Questions

How do you pass pointer PL/1 main procedure to sub procedure?

1 Answers   IBM,


How do you interact with your onsite coordinator?

2 Answers  


State the maximum value up to which volumes can be inserted to an stogroup?

0 Answers  


What are the different types of PL/1 files?

0 Answers   IBM,


Why we use  "OCCUR"  with multiple occurence DS(Data Structure)?

1 Answers  






What is meant by a bolt dispute?

0 Answers  


what is the scope of commitment control?

0 Answers  


What will happen if both steplib and joblib are specified?

0 Answers  


how do we do unit testing in mainfrmae. explain step-wise.

2 Answers   IBM, JBK,


What will be the result if on size error phrase is declared?

0 Answers  


Can you define a gdg?

0 Answers  


tell me about impact analysis ?

1 Answers   IBM, Tech Mahindra,


Categories