IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Best Practices for Enterprise COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1315
Location: Vilnius, Lithuania

PostPosted: Thu Jul 21, 2011 12:42 am
Reply with quote

OMG icon_oak.gif icon_oak.gif icon_oak.gif, am I happy that I've only ever used PL/I...
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Jul 21, 2011 3:21 am
Reply with quote

prino wrote:
OMG icon_oak.gif icon_oak.gif icon_oak.gif, am I happy that I've only ever used PL/I...

As Edsger Dijkstra famously remarked: "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."

icon_lol.gif
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 21, 2011 3:31 am
Reply with quote

I was a pioneer in the early 1980's, with Credit Card Software (Orlando, FL), which then became PaySys International and we had a standards committee (I was on it), that reviewed source code and ensured it met our requirements. If it didn't, then it was returned to do it right.

Because of these standards, all of our COBOL programs were the same, no one deviated or got "cute" with their code.

I was once told that programs need to be constructed, so they read like a book and the thousands of CCS programs met this.

Developing standards is site-dependent, but as has been expressed earlier, when you write a program, remember the next person that needs to come along and perform maintenance.

Regards,

Bill

Author of the PaySys Real Time Authorization Product "FAS".
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 21, 2011 2:09 pm
Reply with quote

i have stayed out of this topic because most have been subjected to my ranting and raving about standards.

instead, I will supply a bunch of edit macros that I use during analysis and modification of programs.

simply upload the txt file to an 80 column ps or pds member
and following the instructions.

i attempted to "comment" adequately to give a sense of what the macro/script accomplishes.

there are few if any comments about how the instructions work or why.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 21, 2011 2:28 pm
Reply with quote

Wow, dbz, a treasure-trove.

I like ID DIVISION, by the way.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 21, 2011 2:46 pm
Reply with quote

don.leahy wrote:
prino wrote:
OMG icon_oak.gif icon_oak.gif icon_oak.gif, am I happy that I've only ever used PL/I...

As Edsger Dijkstra famously remarked: "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."

icon_lol.gif


Prino, you must be lucky that PL/1 is such a restrictive language that there is only one way to do anything, so therefore it is always the "best" way (in the "best" language, of course?) :-) Welcome back, by the way.

Dijkstra, I'll just point out - you never worked in Hollywood after that, did you? Ha!
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 21, 2011 2:51 pm
Reply with quote

Another quote of Dijkstra :

PL/I --"the fatal disease"-- belongs more to the problem set than to the solution set.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 21, 2011 2:54 pm
Reply with quote

Another one :

The problems of business administration in general and data base management in particular are much too difficult for people that think in IBMerese, compounded with sloppy English.

I like the bold part of previous statement.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Thu Jul 21, 2011 7:56 pm
Reply with quote

PL/1 - so much better than COBOL (but I started with Pl/1) and enough different ways of doing things to keep people happy.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jul 22, 2011 4:08 am
Reply with quote

I do hope they don't mind, but there is a good example today of the problem with comments, here.

Probably due to site standards, the poor thing is in a debugger, and there are so many comments that there is not a line of procedure code on the screen. And probably more comments on most of the next one, as the para numbers are only up to 1000.

To me, it does not look as though the comments are likely to add a single piece of information beyond what anyone is capable of getting just by looking at the compile listing.

And the code is always right, in the sense it that it dictates what happens. These sort of comments just get in the way.

Code:
z 7 7#all/*#top#del *#z 1 *#all


Ah, now I feel better.

Funny, this is the only standard I've ever fought against. On the other hand, the reason I fought against it is because no-one was following it, so the programs were a mess of "comment blocks" with up to 50% in any given program obviously wrong (just left from the program used as a model). If it had been followed, I'd have gritted my teeth, done a little rexx/kedit thingy (I believe these days they are called Tools) and got on with it.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Jul 22, 2011 9:53 pm
Reply with quote

Susan,
You should keep in mind that this person probably really believes it's true. If they need this level of consistency to make things easier for them, then so be it.

The tough part for me when I first hit this type of thinking was realizing that these programs have to stand the test of time. Almost any standard is good, as long as everyone follows it. It certainly makes things easier when you have to pick up an old program and try to figure it out.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
Search our Forums:

Back to Top