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

Can a Search can be done on a table with or without Index?

0 Answers  


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


What does the initialize statement do ?

2 Answers  


How do you get the data to code the BMS macro?

0 Answers   IBM,






When search all is used in cobol program without sorted input data?

6 Answers   CGI, Principal Finance,


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

0 Answers  


What is the figurative constant in cobol?

1 Answers  


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

0 Answers   Infosys,


How will you find the currepted records in a file

2 Answers  


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)

13 Answers   CTS,


Categories