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 |
Write about the self-referencing constraint?
What do you mean by linkage section?
what are the ARRAY operations in rpg/400?
stmts affected by activation group?
Can the values of alphanumeric be moved to variable numeric?
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?
Can I redefine an x(200) field with a field of x(100) ?
How do you create a like table?
Explain foreign keys?
how do u conduct impact analysis?
How scary is it to write code for a bank?
GO TO stmt which of the following is not true A) GO TO stmt is not essential in the sense that it is possible to write programs without using GO TO B) The target of the GO TO stmt being a procedure name avoiding GO TO result in a program with no procedure name C) Indiscriminate use of GO TO stmt can make the control structure program substantially complex D) Too many GO TO stmts make a program difficult to understand