how many subpgms we can use in a main pgm ?
how do u link sub pgm to main pgm ?
how can i use the parameters declared in main pgm to sub pgm ?

Answers were Sorted based on User's Feedback



how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use th..

Answer / kiran

There is no limit.... we can write n number of sub programs
in main pgm.

by using linkage section in data division in sub program

by using IS GLOBAL keyword

ex 01 name pic x(10) IS Global

Is This Answer Correct ?    3 Yes 0 No

how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use th..

Answer / sen

Same as kiran said
But to get the parameters used in tha main program can be used by {procedure division using var-1,var-2} in the sub program
Eg if ur var name is ws-1 and ws-2
Then we can get values by
Procedure division using ws-1,ws-2.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

is it mandatory to give data division before procedure division ? wht happens if i give procedure division first thn data division ? reply soon

2 Answers   Patni,


how will you define vsam file in select clause?

3 Answers   Patni,


77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value zeros. move a to b what is the answers for both cases? IS it possible? Give me elementary move rules briefly......

8 Answers  


wht r the advantages of 77 level number ?

8 Answers   TCS,


Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?

14 Answers   Accenture, TCS,


What is rmode(24)

0 Answers  


where will u code file status ?

2 Answers   TCS,


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


How do pass the values to the parameters in cobol

2 Answers  


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,


Categories