Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

how do you resolve for soc7 error

6 Answers   ACS, iGate,


how can we override data definitions in jcl. can any one give detailed example

3 Answers   TCS,


I have a COBOL program that Accepts some input data. How do you code the JCL statement for this? ( How do you code instream data in a JCL? )

9 Answers  


What is notcat 2 - gs?

0 Answers  


There are 5 steps in a Job. How to bypass the first step by making use of only COND Parameter and not using any Restart and IF/THEN/ELSE parameter?

11 Answers   IBM,






which utility is used to sort a file in jcl?

0 Answers   IBM,


restart logic ?

2 Answers   TCS,


What is jcl in mainframe, and how many types of jcl statements are there for a job?

0 Answers  


Please explain with syntax and an example, the Inrec fields and Outrec build in sort.

4 Answers   CTS, TCS,


If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, then how will the sort card be??? e.g- if we want to sort by a field which is defined as a PIC X(5) then we will mention - sort fields=(1,5,ch,a). Likewise if a field is defined as PIC S9(10)COMP-3 then in this case how will the sort field be defined (because in this case a sign is also involved)???

8 Answers  


Explain the function of //jcllib statement?

0 Answers  


what is a MODELDSCB?

1 Answers  






Categories