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
What is rmode(24)
Define cobol?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What do you understand by psb and acb?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What are the different types of condition in cobol and write their forms.
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Name the divisions, which are available in a cobol program?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
Are you comfortable in cobol or jcl?
In COBOL programming, what is PERFORM? What is VARYING?
What is amode(31)
How do define dynamic array in cobol.
Write a program that uses move corresponding.
Name some of the examples of COBOl 11?