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 s000 u4087 error? please give the all error codes in cobol,jcl.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
how do you reference the variable block file formats from cobol programs
How do you define a variable of comp-1 and comp-2?
What is rmode(any) ?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
i want a program using by if, evaluate , string, unstring, perform, occurs?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is a scope terminator give example?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Describe the cobol database components?
What is the compute verb? How is it used?
Write down the divisions of cobol program?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What rules are followed by the search verb.