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

What is the difference between inrec and outrec?

0 Answers  


How can we extract data from IMS DB and load it onto oracle database by converting it.Pls someone help me

2 Answers   TCS,


by using xpeditor if we want to debug the subpgm, how can you code in x-ped for mai-pgm n sub-pgm ?

0 Answers  


how can we define a gdg?

0 Answers   IBM,


Describe the benefits of drda?

0 Answers  


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

0 Answers  


what is use of linkage section?

0 Answers   IBM,


What is the difference between hidam and hdam databases?

0 Answers  


which are the following verb can be used to manipulate the value of an index name A) ADD B) MOVE C) SUBTRACT D) SET

4 Answers   Accenture,


Write the difference between hidam and hdam databases?

0 Answers  


How do you write from PL/1 code to JCL?

0 Answers   IBM,


what u mean by csrloc and rtncsrloc in rpgIV in as/400.Give an eg? to do...give some coding...what is row no and column no ???..if possible...give a no of lines coding....please

0 Answers   CTS,


Categories