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 do we prepare test data using file-aid tool?

0 Answers   Syntel,


How do you create a like table?

0 Answers  


how do u create gdgs n vsam by using file-aid ?

2 Answers  


01 A 02 B occurs 10 times 03 C pic 999. 03 D occurs 15 times 04 E pic 999. 04 F occurs 20 times 05 G pic XXX. 05 H pic 99. Determine the total no of byte in A. A) 175 B) 15480 C) 21750 D) 9065

3 Answers   Accenture,


Differentiate between hdam and the hidam databases?

0 Answers  


can any one exaplin about Decision Tables in test region with good example

0 Answers   TCS,


How many bytes will a s9(8) comp field occupy ?

0 Answers  


error code 7030 cpf7030 what is the level check error

1 Answers  


What is the difference between Verify & Index in PL/1?

2 Answers   IBM,


Explain host variables?

0 Answers  


suppose if you added a coloumn to db2 table, How would it be the Impact analysis?

0 Answers  


What is defragmentation and what is its advantage?

0 Answers  


Categories