Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

how to move the records from file to array table. give with code example

2729


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

3277


What are the pertinent COBOL

2623


Define cobol?

1482


what is search and searchall?what is the diffrence between them?give an best example?

6919


How to print 10 to 1 if the input have only 10 digit number?

1304


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

2644


Mention the guidelines to write a structured cobol program?

1142


What is redefines clause in COBOL?

1351


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2276


how to access the file from prodution from changeman tool and to submit a file to production

7627


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1550


What is the difference between Call and a Link?

1262


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

1607


What is rmode(24)

1196