Sections vs Paragraphs - a CICS programmers perspective. 
Author Message
 Sections vs Paragraphs - a CICS programmers perspective.

I initially wasn't going to weigh in on this.  However, for those
NO GO TO purists, I have this for you to consider.

EVERY time you code a HANDLE CONDITION in a command level CICS Cobol
program you are doing a GO TO.  Sometimes you JUST HAVE to do it.



Mon, 19 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.


Quote:
>I initially wasn't going to weigh in on this.  However, for those
>NO GO TO purists, I have this for you to consider.
>EVERY time you code a HANDLE CONDITION in a command level CICS Cobol
>program you are doing a GO TO.  Sometimes you JUST HAVE to do it.

It is certainly true that every time you take a HANDLE CONDITION in a
CICS program (whether or not it's COBOL) you are executing a branch
with no return.  I have been coding CICS COBOL programs for nine
years, and I am a strong advocate of structured programming.  I avoid
GO TO religiously.

You almost never need to use handle conditions.  I normally use either
the NOHANDLE or RESP option on each and every CICS API call.  This
guarantees that control is returned to the first statement in your
program following the CICS API call.  The responsibility of evaluating
the EIBRCODE or EIBRESP (preferred) is entirely under my control, and
I can build exactly whatever error-handling is required.  You can also
use the IGNORE CONDITION option, but this is less efficient because
CICS will still search its branch table to see if any handle
conditions are active.  When you use NOHANDLE or RESP this table
search is bypassed and control is returned to the calling task.

There are only two situations I have encountered where it is
preferable to use a HANDLE CONDITION, and neither one of these
situations is likely to be encountered by most CICS programmers.

First, if you ever need to ensure that certain CICS resources are
single-threaded, you will need to perform a CICS ENQ (enqueue)
function to enforce a wait for a named resource.  Once you execute
your CICS ENQ command, if that resource is already enqueued by another
task then your task will wait forever, if necessary, until the first
enqueue is DEQueued.  The solution to this is to HANDLE
CONDITION(ENQBUSY).  This allows you to branch into your own
error-handling code if you cannot get ownership of the enqueued
resource.  In other words, if I cannot enqueue this resource because
it is already enqueued by another task, I want to take a different
course of action.  I know of no other way out of this trap, so I will
take the implied GO TO.

Second, we have long-running, conversational CICS tasks which service
telecommunications lines.  If the task abends for any reason, we will
lose data.  That task absolutely has to stay up, 24 hours a day, seven
days a week.  Therefore, the top-of-chain program has a HANDLE
CONDITION ABEND(recovery-paragraph).  What this does is allow us to
establish a recovery paragraph which can issue an EXEC CICS START to
invoke a new task to service the line as soon as the abending task is
purged.  Again, I know of no easier way to do this, so I will take the
implied GO TO.

I have never used sections in a CICS COBOL program.  A very
experienced programmer whose opinion I respect told me he had analyzed
the generated code from a CICS program with sections (this would have
been with the OS/VS COBOL compiler and CICS 1.6.1, so it was a long
time ago).  He said that section headers generated a lot of extraneous
code for managing overlays which was very inefficient in CICS.  I
don't know if that would still be true with VS COBOL II or COBOL/370,
but I see no reason to use sections in a COBOL program, whether it's
CICS or batch.  In my opinion, control flow is much simpler to follow
with no sections and no PERFORM THRU exits.

The people who really like using sections will probably be perfectly
happy to continue to do so.

Arnold Trembley
Software Engineer I (just a job title, still a programmer)
MasterCard International
St. Louis, Missouri



Mon, 19 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Arnold,

Thank you very much for your alternative to handling conditions in CICS
programs.  It is very interesting and I learned something.  I appreciate
it!



Tue, 20 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.



Quote:
> I initially wasn't going to weigh in on this.  However, for those
> NO GO TO purists, I have this for you to consider.

> EVERY time you code a HANDLE CONDITION in a command level CICS Cobol
> program you are doing a GO TO.  Sometimes you JUST HAVE to do it.

Yeah, but since it isn't a GO TO you can fool yourself into thinking you're
not using them !
:-)


Fri, 23 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.


Quote:
>I initially wasn't going to weigh in on this.  However, for those
>NO GO TO purists, I have this for you to consider.
>EVERY time you code a HANDLE CONDITION in a command level CICS Cobol
>program you are doing a GO TO.  Sometimes you JUST HAVE to do it.

Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
programs very well structured.

 Just my 1.5 cents worth, adjusted for inflation
 Boyce G. Williams, Jr.

 .---------------------------------------------------------------------.
 | "People should have two virtues:  purpose- the courage to envisage  |
 | and pursue valued goals uninhibited by the defeat of infantile      |
 | fantasies, by guilt and the failing fear punishment;  and wisdom- a |
 | detached concern with life itself, in the face of death itself."    |
 |                                                     Norman F. Dixon |
 '---------------------------------------------------------------------'



Sat, 24 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Quote:
> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
> programs very well structured.

Ah, company $$ are tight and on our 2 mainframes, we run 1.5 (GAG) and 1.6.


Sun, 25 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Quote:

> >I initially wasn't going to weigh in on this.  However, for those
> >NO GO TO purists, I have this for you to consider.

> >EVERY time you code a HANDLE CONDITION in a command level CICS Cobol
> >program you are doing a GO TO.  Sometimes you JUST HAVE to do it.

> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
> programs very well structured.

>  Just my 1.5 cents worth, adjusted for inflation
>  Boyce G. Williams, Jr.

I'd agree with the use of RESP (before this facility was introduced you
could still test the EIB return code) - but emphatically not with the
definition of HANDLE CONDITION (H-C) as a GO TO (I can live with GO TO
*if* it makes the program easier to lay out). H-C, if you think about it,
is an ALTER - it affects the behaviour of a GO TO elsewhere (sometimes
*very* elsewhere) in the program. A disgusting concept.

Pete




Wed, 28 Apr 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Quote:

>> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
>> programs very well structured.

>Ah, company $$ are tight and on our 2 mainframes, we run 1.5 (GAG) and 1.6.

Check with IBM whether they still support those releases.  If not and
they have put it in writing you may have a case to present to your
powers-that-be to upgrade.  We waited ten years to upgrade.

 Just my 1.5 cents worth, adjusted for inflation
 Boyce G. Williams, Jr.

 .---------------------------------------------------------------------.
 | "People should have two virtues:  purpose- the courage to envisage  |
 | and pursue valued goals uninhibited by the defeat of infantile      |
 | fantasies, by guilt and the failing fear punishment;  and wisdom- a |
 | detached concern with life itself, in the face of death itself."    |
 |                                                     Norman F. Dixon |
 '---------------------------------------------------------------------'



Sat, 01 May 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Quote:
> >> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
> >> programs very well structured.

> >Ah, company $$ are tight and on our 2 mainframes, we run 1.5 (GAG) and
1.6.

> Check with IBM whether they still support those releases.  If not and
> they have put it in writing you may have a case to present to your
> powers-that-be to upgrade.  We waited ten years to upgrade.

I wish.  We still run DOS/ESA level 2 here and KNOW it's unsupported.  "But
it works fine!".

Can anyone tell me that this will NOT run after Y2K?



Sat, 01 May 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Actually the question in all year 2000 cases is not will it stop working on Jan. 1, 2000 but
will your system do undesireable things  before then such as expire data sets you told the  
system to keep for five years because 02 is less than 96.  With software as old as CICS 1.6,
a shop is treading on dangerous ground.  The hardware it runs on may become economically
unmaintainable.  I don't know how old DOS/ESA level 2 is but if it has only 2 digit years
you probably are in trouble.  If you can set up an isolated test environment (no shared files  
etc.), it is probably worth testing what your system will do over the period Dec 31, 1999 -  
January 1, 2000.  This means back up all files and put physical labels (sticky labels written  
on with a pen) on the tapes with instructions do not scratch even if the tape management system  
says you can.  Also tell your management things in your applications start falling apart as  
soon as the application projects beyond Jan. 1, 2000.  If you sell on 4 year terms you may be  
in trouble.  Depreciation projections may be bad.  Things may have all been written with a  
moving window or 4 digit years but someone had better be certain.  If management won't act,  
sell any stock you have in the company and look for another job.  

Quote:

> > >> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
> > >> programs very well structured.

> > >Ah, company $$ are tight and on our 2 mainframes, we run 1.5 (GAG) and
> 1.6.

> > Check with IBM whether they still support those releases.  If not and
> > they have put it in writing you may have a case to present to your
> > powers-that-be to upgrade.  We waited ten years to upgrade.

> I wish.  We still run DOS/ESA level 2 here and KNOW it's unsupported.  "But
> it works fine!".

> Can anyone tell me that this will NOT run after Y2K?

Clark F. Morris, Jr.
CFM Technical Programming Services
Bridgetown, Nova Scotia, Canada

on assignment at morrisc.nbnet.nb.ca


Sun, 02 May 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.

Interesting job in New Jersey . . .

Are you looking for a new job.  How about New Jersey?  If you are a
programmer
with the listed experience and want to earn between $33.7K and $56.3K
then this
may be of some interest to you.

Position:
-----------
Programmer/Analyst, Level 4
Core Hours:  8:15 - 4:15
Target Start Date:  Immediate

Minimum Qualifications:
------------------------------
Knowledge of COBOL, MVS JCL, TSO/SPF, MicroFocus COBOL
2 - 4 years programming experience (COBOL/COBOL II)

Travel Requirements:  minimal and local

Other Qualifications:
-------------------------
COBOL/COBOL II
CICS Command level a plus
Easytreve a plus, VSAM, MVS, SJL, TSO/SPF

Key Accountabilities:
---------------------------
Able to communicate effectivaly with customers and carry a project
from the
specification stage through to testing and implementation.

Provide monthly status reports to management.

Prepare system/program documentation.

Become proficient with MicroFocus and Apprise tools.

Please contact me via e-mail if you are interested and I will forward
to the right people.

Carl S. Hayes



Sun, 02 May 1999 03:00:00 GMT  
 Sections vs Paragraphs - a CICS programmers perspective.


Quote:

>> >> Why?  Since CICS 1.7 I've always used RESP in my CICS calls.  Makes my
>> >> programs very well structured.

>> >Ah, company $$ are tight and we run 1.5 (GAG) and 1.6.

>> Check with IBM whether they still support those releases.  If not and they
>> have put it in writing you may have a case to present to your powers that
>> be to upgrade.  We waited ten years to upgrade.

>I wish.  We still run DOS/ESA level 2 here and KNOW it's unsupported.  "But
>it works fine!".
>Can anyone tell me that this will NOT run after Y2K?

I think IBM can tell you.
Look at
"http://www.s390.ibm.com"
and follow it along to the manual
The Year 2000 and 2-Digit Dates: A Guide for Planning and Implementation

I think you'll learn that you may require hardware.  There is a statement:
"The hardware timers on the IBM S/390, AS/400, RS/6000, and PowerPC machines
are not sensitive to change of century."  (It doesn't say S/370, as I read it.)

There is a list of VSE/ESA software (no mention of DOS) which will be upgraded
to make it Y2K compliant.  I don't know VSE, but you'll need to get to it and to
supported product levels on VSE to be ready to support your applications.  I'm
pretty sure there won't be any Macro Level CICS if you're still there.
Colin Campbell



Mon, 03 May 1999 03:00:00 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. useless discussions (was: sections vs. paragraphs)

2. Sections vs Paragraphs

3. Paragraphs vs Sections

4. Sections vs. Paragraphs

5. Sections vs. Paragraphs - Challenge - Results

6. Sections Vs. Paragraphs

7. Paragraphs vs. Sections - Performance under DEC COBOL/VMS

8. Second paragraph of section 6 of IEEE standard

9. Ending sections/paragraphs

10. (dis)advantages of sections /paragraphs in procedure division?

11. L S 5 $ W K M C Re: Paragraphs or Sections

12. sections and paragraphs ???

 

 
Powered by phpBB® Forum Software