MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can COBOL do have User defined Functions

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Ravichandra_kota
Beginner


Joined: 20 Jul 2005
Posts: 1
Topics: 1
Location: Hyderabad, India

PostPosted: Fri Jul 22, 2005 4:28 pm    Post subject: Can COBOL do have User defined Functions Reply with quote



I could see certain predefined functions being used in COBOL, but I'm really not sure whether COBOL supports defining user defined functions , so that reusability of code can be extensively utilized at needy times. Please let me know if such things do exists in COBOL and also any URL of any technical resource
_________________
Thanks & Regards
Ravichandra Kota
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sat Jul 23, 2005 12:34 am    Post subject: Reply with quote

Depends on what cobol you are using.
Back to top
View user's profile Send private message Send e-mail
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sun Jul 24, 2005 2:00 am    Post subject: Reply with quote

Quote:
I'm really not sure whether COBOL supports defining user defined functions , so that reusability of code can be extensively utilized at needy times.

Subprograms with data passed via LINKAGE SECTION comes to mind.

I accept, COBOL does not offer a call to a paragraph like the way you have in mind.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Itanium
Beginner


Joined: 14 Aug 2005
Posts: 6
Topics: 1

PostPosted: Sun Aug 14, 2005 3:10 pm    Post subject: Reply with quote

Ravichandra_kota,

You can have you common code(Paragraph) in a Copybook and use that copybook along with all your COBOL program. In this way you can call the Para coded in the copybook to your programs.

You will end up re-compiling all the programs whenever there are changes in the copybook.

Thanks,
Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group