What are subroutines ? and how do we pass data to the sub
Answers were Sorted based on User's Feedback
Answer / harish
subroutines are normal cobol program called by another
so data passed through linkake section
in main prog we have to code
call 'sub' using a1,a2
then in subprog accept these a1 and a2 with same name or
differnt doesnt matter
then in procedure division
procedure division using a1,a2.
pls correct me if anything wrong
HARISH POOMGAME SHIVAPPA
|Is This Answer Correct ?||5 Yes||1 No|
Answer / 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.
call 'nodays' using date1,date2,nodays.
01 wdate1 pic 9(8).
01 wdate2 pic 9(8).
01 wnodays pic 9(4).
procedure division using wdate1,wdate2,wnodays.
write your logic.
|Is This Answer Correct ?||1 Yes||3 No|
can you declare redefine in level 01?
when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?
What kind of error is trapped by on size error option?
With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?
Hi................... I have records like this aaaa cccc bbbb And i want output like this bbbb cccc aaaa How can it possible ?. Note:Please make sure records are in unsorted order. somebody plzzz help me.
How many sections are there in data division in COBOL?
What is an in line PERFORM? When would you use it? Anything else to say about it?
comp-3 field occupy?
How do you set a return code to the JCL from a COBOL program?
What is the linkage section?
what is the advantage of sync class
can we read records in a file from botom to top. if possible how can we read