What are subroutines ? and how do we pass data to the sub
routines?

Answer Posted / ramanuajam

subroutines are usefull, it can reduce the redendency.
and we can minimise code.

Ex. I have finance project. I need noof day calculation
between todates for every program.
I wont write this code in ever program.
i pass the date1, date2 and noof days through main program.
like

main1.cob
call 'nodays' using date1,date2,nodays.

sub.cob
linkage section.
01 wdate1 pic 9(8).
01 wdate2 pic 9(8).
01 wnodays pic 9(4).
procedure division using wdate1,wdate2,wnodays.
mm.

write your logic.
exit program.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2039


What is the local-storage section?

664


Write a program to enter and display the names of students in a class using the occurs clause.

638


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

625


How do you reference the fixed block file formats from cobol programs

686






Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

803


explain sorting techniques in cobol program?

672


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1633


How many sections are there in data division in COBOL?

665


What is inspect in cobol ?

785


Explain the configuration section of a cobol program with examples of syntax.

643


Which Search verb is equivalent to PERFORM…VARYING?

668


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2088


) how do u code after getting data?

1572


what is the difference between COBOL2 AND COBOL390?

2427