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 s000 u4087 error? please give the all error codes in cobol,jcl.

17793


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1219


how do you reference the variable block file formats from cobol programs

1181


How do you define a variable of comp-1 and comp-2?

1135


What is rmode(any) ?

1180


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

1063


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

4634


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

1142


What is a scope terminator give example?

1049


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1098


Describe the cobol database components?

1125


What is the compute verb? How is it used?

1074


Write down the divisions of cobol program?

1146


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1284


What rules are followed by the search verb.

1043