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 

why to number Cobol paragrapghs?

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


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sat May 31, 2008 4:22 pm    Post subject: why to number Cobol paragrapghs? Reply with quote

hi,

Please why Cobol paragraphs and sections should be numbered? what's the point in numbering it? what's the advantage in doing it?

Other language programs, as Java and Natural, do not have their classes/methods numbered.

I wonder if this habit is due the fact that, in the old times, people used to print the program while maintaining it. In that context, having the paragraphs and sections numbered would facilitate the programmer to browse the program.

Please, let me know your opinion why we should keep numbering it nowadays since we virtually never print a program anymore.

Thanks.
Back to top
View user's profile Send private message Send e-mail
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Sat May 31, 2008 8:58 pm    Post subject: Reply with quote

Other site requirements there is no need to number paragraphs or sections in cobol.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat May 31, 2008 11:31 pm    Post subject: Reply with quote

I'm not a COBOL programmer, but when I've looked at large COBOL, the subroutine numbers do help you scroll around in and find things easily. A good thing if you don't have an emulator or emulator (or editor) macros that can help you find things without lots of typing.

I always laugh (and roll my eyes) when I see people use that technique in Rexx programs. Usually the Rexx code looks like COBOL too Rolling Eyes

As for Java, the whole structure of the language is different. Labels in java don't exist and "subroutines" tend to be external methods or names that meet fairly standard conventions such as getters and setters. (Bleccch! Java! Ewwww!)
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sun Jun 01, 2008 11:18 am    Post subject: Reply with quote

Agree with semigeezer. Technically, there is no reason to number, but when using a 24-line screen to look at a 5,000-line program, it helps to know approximately how far you'll need to scroll to find what you're looking for. Despite the power of the (F)ind command, I usually find it easier to scroll up or down. After browsing many COBOL programs yourself, you may also find that to be true.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Sun Jun 01, 2008 3:16 pm    Post subject: Reply with quote

This link explains how numbering can be really useful if used properly.

http://home.swbell.net/mck9/cobol/style/paraname.html

See the section 'Numbering schemes'.
Back to top
View user's profile Send private message Send e-mail
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