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

input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1 Answers  


a. Can the OPTIONAL clause in COBOL only be coded for input files? b. If it is coded for files opened in OUTPUT, I-O or EXTEND mode, will it give a compilation error? c. If there are no compilation errors and if such files are not coded in the JCL, will the OPEN statement run fine when these files are opened? d. How will a WRITE statement work for the above files?

2 Answers  


If you were passing a table via linkage, which is preferable - a subscript or an index?

3 Answers   TCS,






if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

2 Answers   IBM, Steria,


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


What is difference between static and dynamic call in cobol?

0 Answers  


C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE

1 Answers   TCS,


I have two sequential files, FILE-1 and FILE-2. FILE-1 contains 2 columns(A,B) and FILE-2 contains 3 columns (C,D,E).I want an output file, FILE-3 which has all five columns with duplicates eliminated from column A.

3 Answers  


example for sub strings ? and refernce modifications whit output pls

0 Answers   College School Exams Tests, IBM,


what is the maximum error code in mainframe

2 Answers  


Categories