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

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

6805


Describe the cobol database components?

1169


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

2528


What is report-item in COBOL?

1151


What are the different data types in cobol?

1430


Write the code to count the sum of n natural numbers.

1204


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2127


i want a program using by if, evaluate , string, unstring, perform, occurs?

4717


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

1532


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2072


State the various causes of s0c1, s0c5 and s0c7.

1076


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

862


how to convert the recors form vsam file to db2 table tru file aid

3253


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

1101


How to know whether the module is dynamical or statistical?

1134