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
how to convert the recors form vsam file to db2 table tru file aid
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
) How do u handle errors in BMS macro
What is an in line perform? When would you use it? Anything else you wish to say about it.
How do you reference the fixed block file formats from cobol programs
What are 77 levels used for?
What rules are to be followed while using the corresponding options?
How do you differentiate between cobol and cobol-ii?
What is the problem of ordered sequential files access?
what is search and searchall?what is the diffrence between them?give an best example?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
Which mode is used to operate the sequential file?
Give some examples of command terminators?