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

Explain how can the disposition of sysout datasets be set for an entire jobstream?

0 Answers  


How can i execute 5th step without executing first 4 steps?

4 Answers  


diff bw vsam and normal flat file?

2 Answers   CGI,


Is there a way to check for an empty file in JCL other than using IEBCOMPR and the command PRINT COUNT(1)?

8 Answers  


how to do automated restart when a job abends?

0 Answers   IBM,






What is MOD and when would you use it?

3 Answers  


In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???

10 Answers   Perot Systems,


1)what is compilation jcl for cobol program but it is calling another program 2)what is compilation jcl for cobol program but it is calling another program(in this, main program is pure cobol but sub program is cobol+db2 program anyone please answer me for above questions. it's very urgent

1 Answers  


What does IEBGENER do?

10 Answers   BirlaSoft,


how to run JCL thru COBOL.

1 Answers   Patni,


How to delete generations of gdg without deleting gdg base?

3 Answers  


Hi Please try to be to-the-point. 1) How to INCLUDE a JCL segment in a JOB ? (A Small example) 2) What is SPOOL and what is SPOOL FULL ? and how to direct the output of a Jobstep to SPOOL ?

3 Answers   IBM,


Categories