Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 are start and xctl different?

0 Answers   IBM,


01 T1. 02 month-day pic x(30) value ?jan,31, feb,28, mar,31, apr,30, may,31, june, 30? 02 new-day redefines month-day occurs 6 times 03 A pic xxx. 03 B pic 99. What are the content of A(3) and B(2) respectively A)mar,31 B) Feb,28 C) 28, Mar E)Mar, 28

1 Answers   Accenture,


Explain Introduction abt Ibm framework

0 Answers   IBM,


What is comp-1?

0 Answers  


State the maximum number of tables that can be joined?

0 Answers  


how do u conduct impact analysis?

0 Answers   Tech Mahindra,


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

0 Answers  


what error do we get in prodution support and questions on production support

2 Answers  


How many bytes does a s9(7) sign trailing separate field occupy ?

0 Answers  


what do u write in the impact analysis document (i.e, for a change request)

4 Answers   Nest, Wipro,


What is COUNTERS in PL/1? How to assign the COUNTER variables? WHich Data Type it can be used for this?

2 Answers   Verizon,


what are the commands that frequently used in cl?

1 Answers  


Categories