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


Please Help Members By Posting Answers For Below Questions

When do you get -811 sqlcode and how to resolve it?

514


Define the necessity of run stats among the environment test?

517


What is linkage section?

543


what is the meaning of ssrange and nossrange?

597


Give the format of using and giving in sort statement. What are the restrictions with it?

629






Can you explain referential integrity?

563


Tell me abt any another framework which is challening for Ibm framework

1638


Explain the meaning of spufi?

577


Hello, I have 3 years of exp as a mainframes tester in a leading IT company, now am looking to change my company. Could you please let me know, what are the interview questions/topics i should prepare. Your suggestions are truly valuable for me :) Thanks !!

1486


We have an output dataset in job with disp parameter as shr.

535


What is meant by comp-3 and what is it used for?

544


Explain identify whether a call statement is a static or dynamic call?

548


Write in brief about clusters?

555


Can you explain function of iebgener?

590


How is next sentence and continue different?

552