I started doing that in the days of punched cards. You might want to insert
another instruction between the label and the MVC, and you only want to have
to punch one card, not two or three.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Crawford, Robert C.
Sent: Wednesday, June 16, 2021 6:23 AM
To: [email protected]
Subject: Re: EXTERNAL: Coding for the future

It's a small thing, but I now longer try to cram as much code into line as I
can.  Now I put spaces between operators and variables and after commas.  I
also put the clauses following "THEN" and "ELSE" on another line.

Oh, and I used to this:
LOOP      MVC   HERE,THERE

And now do this:
LOOP      DS       0H
                MVC   HERE,THERE

Robert Crawford
Mainframe Management
United Services Automobile Association
(210) 913-3822

"Moy glaz! YA ne dolzhen dobavlyat' v nego puding!"
- Tolstoy
Please send requests to mainframe management through our front door at
go/mfmfrontdoor

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Bob Bridges
Sent: Tuesday, June 15, 2021 5:07 PM
To: [email protected]
Subject: EXTERNAL: Coding for the future

In a recent email one of our number, whose name I won't mention except to
say that his initials are Jeremy Nicoll, made a comment that got me thinking
about ~my~ past and present coding habits.

Like most programmers (maybe), I had some habits that I no longer tolerate.
For example:

1) I used to hate long-winded variable names.  Ok, that's a bad example to
start with, because I still do.  But I no longer use one-character variable
names, ever; I use two- to four-character names if they're to be used only
in one brief section, but if they're supposed to last longer I make them
more descriptive; and even the shorter ones follow a naming standard that
I'm familiar with.  It wouldn't be any help to someone else who had to
modify my code, though.

2) I know everyone says to comment your work, but I never used to.  "I'm the
only one who'll use this code", I thought, "and I know what I did".  Oh,
fool!  I can forget what I was doing a mere two months later, much less two
years or two decades.  So now I'm more likely to use one-line comments on
every other line and a paragraph at the head of each section.  Well, perhaps
I exaggerate, but not much.

3) Not for me, any longer, to assume that my TSO commands will work
correctly.  For pretty much every interaction with the outside world I
include checks for file-not-found, empty datasets, missing non-optional
arguments, anything I can think of.  I want my programs to go on working
long after I've forgotten how to invoke them properly.

4) This isn't exactly a bad-coding issue, but as much as possible I want the
input arguments on a command to come in any order I happen to think of them
at the time.  My routine to search through a concatenation of PDSs for a
particular module has to receive the DD and module name in a particular
order, but mostly it's possible to say "tso command arg1 arg2 arg3" or "tso
command arg2 arg1 arg3" without any confusion.

5) One thing hasn't changed:  Like most of us here, I was ~always~ rabid
about proper indentation.  (Where by "proper" I mean "consistent"; I know
styles can vary, but as long as there's no variation...)

I'm just curious about other issues that y'all are careful about that maybe
you weren't when we were young and foolish.

---
Bob Bridges, [email protected], cell 336 382-7313

/* While the best judge of Christianity is a Christian, the next best judge
would be something more like a Confucian.  The worst judge of all is the man
now most ready with his judgements: the ill-educated Christian turning
gradually into the ill-tempered agnostic, entangled in the end of a feud of
which he never understood the beginning, blighted with a sort of hereditary
boredom with he knows not what, and already weary of hearing what he has
never heard.  -from the Introduction to _Everlasting Man_ by G K Chesterton
*/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to