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 search and searchall?what is the diffrence between them?give an best example?
Describe the cobol database components?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What is report-item in COBOL?
What are the different data types in cobol?
Write the code to count the sum of n natural numbers.
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
i want a program using by if, evaluate , string, unstring, perform, occurs?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
State the various causes of s0c1, s0c5 and s0c7.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
how to convert the recors form vsam file to db2 table tru file aid
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
How to know whether the module is dynamical or statistical?