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

Can the values of alphanumeric be moved to variable numeric?

597


Can I redefine an x(100) field with a field of x(200)?

541


Tandem COBOL Interview questions (on TACL,SCOBOL,ENSCRIBE,PATHWAY0

22819


PLEASE SEND ME THE DOCUMENTS IF ANY ONE HAVE REGARDING THE IMPACT ANALYSYS,REVIEWS

1958


What is the difference between hidam and hdam databases?

542






What is the importance of common attribute?

591


suppose I have two tables a and b. Both tables are connected with ssn number as foreign key. I want to retrieve a column data from b table. How will you write a query?

542


What is the difference between hdam and hidam databases?

568


Can you define path?

586


Explain index cardinality?

555


Is it possible to move the alphanumeric variables to a numeric variable?

644


What is use of IBM framework?

1684


What is the binary search?

543


What is the difference between version control and debugging tools?

534


Explain the meaning of spufi?

584