× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jon,

> Don't often disagree with Buck but .....

That's probably a result of a poor explanation on my part!

> > The end result is that the 'procedure' is using as many
> > global variables as the subroutine did.  This makes
> > interactions inevitable, requiring a full-up test in situ -
> > no test jig possible.
>
> Just not true.  _If_ you have moved the "subroutine" to
> a separate source (you did say add a nomain so I'm
> assuming a new source) then you have to have also
> moved/copied the relevant variables to the new source.
> Either way (copy or move) the variables are separate
> and there can be no interaction.

The things I've seen involve moving not just one subroutine, but all
of them.  For example:

exfmt getcust
exsr validcust
exfmt getitems
exsr validitem

where 'validcust' does a CHAIN, check for active/inactive and so on.
The byproducts of that are a cursor on the current customer, with all
the database fields filled in.  'validitem' has code to loop through
the subfile, CHAIN to the product master and validate that this
customer can order these items.

Move the subroutines into a new source member and use callp instead of
exsr and you have the same interactions.  You can't test 'validitem'
all by itself because it depends on having the DB fields for the
customer file populated, as well as certain fields from the
workstation.  You can't simply identify them because they aren't on a
parameter list - they're all global.  Likewise, when it's done, it has
set global variables of its own.

What has happened is that someone has created procedures and a service
program in name only; the end result is the same tight coupling that
the original code had.  There's no simple way to test one subroutine,
er, 'procedure' in isolation from the rest.  Like I meant to say, it's
an excuse for continuing the old way of doing things by demonstrating
how 'impossible it is to effect change in our environment.'
  --buck

ps this is NOT intended to slight anyone reading this.  Just relating
personal experience.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.