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 move the records from file to array table. give with code example
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What are the pertinent COBOL
Define cobol?
what is search and searchall?what is the diffrence between them?give an best example?
How to print 10 to 1 if the input have only 10 digit number?
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
Mention the guidelines to write a structured cobol program?
What is redefines clause in COBOL?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how to access the file from prodution from changeman tool and to submit a file to production
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
What is the difference between Call and a Link?
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
What is rmode(24)