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

How to compare two files by using sort?

1071


State the maximum value up to which volumes can be inserted to an stogroup?

1099


Where is the vsam ksds placed?

1026


What do you mean by monitor block?

1898


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

2105


In a test environment, is there a need to run a runstats?

1018


pls send the docs of any telecommunication mainframe project

2200


Can you define an alias?

1007


Can you define notcat 2?

1091


What is the worst thing that you’ve seen on a day?

994


What are the error (ONCODES) codes did you encounter in PL/1 programme?

2966


Is therE anybody who knows about TICKLER FILE of RM.??thank you

2193


how can we repair a soc-7 error?

1084


Is it rquired any server for Ibm framework? Give me list of Ibm framework & recent version IBm framework?

2302


How to find all duplicate records?

1036