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?

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

Tell about how do you eliminate the duplicates?

998


Is the order of the when clause important in an evaluate statement? Is the order of the when clause significant in an evaluate statement?

947


how can we describe comp sync?

1037


Mainframe project required Postby mache123 ยป Thu Jan 29, 2009 9:10 pm hello..... I want to know about some real time projects.If any one have any Mainframes project, please provide me documentation of it Or else give me the link where can I find that Mainframes projects with Documentation...... or suggest me any if......please

2558


Can you define foreign keys?

1032


What will happen if both steplib and joblib are specified?

1021


what is the role of the is numeric clause?

1090


What is the difference between the mro & isc?

1035


What is the importance of common attribute?

1070


Name and explain the type of locks?

953


What is the difference between version control and debugging tools?

1045


what is the meaning, the advantages and which are the types of evaluate statement?

1049


If a ceo wants to see all employees of the company from an online screen. How will be the design of the map from the developer point of view?

1029


What is the function of the verb initialize?

1080


what is difference between file-aid tool and file-aid utility?

1493