how can i use the parameters decalred in main pgm in sub pgm

Answers were Sorted based on User's Feedback



how can i use the parameters decalred in main pgm in sub pgm..

Answer / venkat

specify the field as GLOBAL.

EX.
Main program
WSS.
01 WS-ENO PIC X(9) GLOBAL.

Sub program.
PD.
DISPLAY WS-ENO.

Is This Answer Correct ?    3 Yes 0 No

how can i use the parameters decalred in main pgm in sub pgm..

Answer / lakshmisudha

if we defined the variables in main program like below
data division
working-storage section.
01 a1 pic 99.
01 a2 pic 9(3).
if you want use same variables in sub program you define
like below in sub program
DATA DIVISION.
LINKAGE SECTION.
01 B1 PIC 99.
01 B2 PIC 9(2).
PROCEDURE DIVISION USING A1, A2.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More JCL Interview Questions

wht r different types of sorts ?

1 Answers   L&T,


what is use of disp parameter in dd statement?

0 Answers   IBM,


what r the types of job control statements?

2 Answers  


How gdg are concatenated?

0 Answers  


How much space OS allocates when you create a PS or PDS?

4 Answers  






There are two steps in a JCl, the first one generates a report while the second step send an email saying the report has been generated, but the second steps should only be executed when the report file is non-empty. How can it be acheived. We may include steps in between.

3 Answers   IBM,


What does the TIME parameter signify ? What does TIME=1440 mean ?

6 Answers   Accenture, TCS,


a input file contains 1000 records, how to move the first 500 record into one out put file and how to move to second 500 records to anothere output file

6 Answers   ITC Infotech,


how do u define a file in cobol and jcl ?

2 Answers   TCS,


If job is submitted with typerun = hold then how can we submit the same job?

3 Answers   Wipro,


How can a fb file convert to vb file using sort program?

0 Answers  


by using cond parameter maximum 8 cond can be coded in single cond means ?explain

0 Answers  


Categories