Re: Opinions on approach, please...





"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in message
news:ogA_j.446105$i_6.153114@xxxxxxxxxxxxxxxxxxxxxxxxx
<all previous parts of the thread are snipped>

Pete,
I the reason that I mentioned "locks" is that I am familiar with
applications that INTENTIONALLY used "locks" (of one sort or another) to
serialize specific steps. They didn't use them to "protect" from data
corruption. Rather they would use a "control" record to be "locked" when
one user/part-of-the-application/whatever was doing something to insure
that other parts/users didn't "start" a new process.

Yes, I have also encountered such systems. (In particular, when 3790s were
first introduced, back in the late '70s. This was a common practice, that
added layers of confusion to the online processing, was clunky and didn't
always work as expected.)

I'm sure you are right and there are still systems around that lock a
control record while a process completes. I wouldn't want to do it, and I am
certain that my client in this case doesn't use it, but such an effect could
be easily obtained by setting a semaphore on a certain DB row. It doesn't
need to be locked. If the flag is set, nobody kicks of a new process. The
owning process clears the flag when it completes. If it doesn't complete
then the process is locked out and threads trying to use it should complain
after a suitable timeout. (like I said, clunky... :-))



Micro Focus and the '02 Standard have "wait" syntax (within READ
processing - and as a separate statement). I couldn't find this in my
Fujitsu dox, so this may not be a problem there. (They do have file
status codes for accessing locked records).

As I say, this is not a question of 'accidentally" having two processing
attempting to update the same record; rather it is the use of specific
records (or files) to serialize processing.

***

I also wanted to explain (a bit) about the "multiple positioning" point
that I tried to make earlier. I don't know if this is used with non-IBM
mainframe COBOLs - or even if it is still used (much) on IBM mainframes.

The techniques was where you had two (or more) File-Control entries -
pointing to the same physical (VSAM) file - one via its "primary" key and
one via an alternate key (or possibly both via separate alternate keys).
Using START and READ NEXT processing, you could then process
"simultaneously" through the same physical file in two different
sequences. I could be mistaken, but I don't think that SQL can (easily)
do this via two "simultaneous" cursors for the same database. However, if
this isn't something that you have run into, then it may well be a
non-issue with the types of applications that you would want to convert.

I remember doing this on an ICL 1900, and later, on an IBM 360, not long
after disk drives became commercially available (early '70s, I think).. We
did a similar "trick" to obtain a sequential processing "lookahead" on a
given dataset. It was all pretty smart at the time; in retrospect it makes
me shudder... and smile :-) (How time flies... :-)).

Yes, it won't be a problem as RDBMS can easily maintain multiple cursors.
The data for the cursor is fetched into an internal result set at the time
you OPEN it, and the cursor is really just a pointer that steps up or down
the result set as required. Point being that rows are not actually fetched
when you issue a FETCH against a cursor, so different sequences of
processing have no impact on each other.

Thanks for your post, Bill.

Pete.
--
"I used to write COBOL...now I can do anything."


.



Relevant Pages

  • Visual Basic for Applications Help Problem
    ... Under Office 2003 Professional Edition with SP1, if I open the VBA ... Basic for Applications.) ... sits there with the mouse cursor changed to a hand. ... Assistance pane on the right of the window that gives me the chance to ...
    (microsoft.public.office.misc)
  • Re: Opinions on approach, please...
    ... I the reason that I mentioned "locks" is that I am familiar with applications ... I don't know if this is used with non-IBM mainframe ... alternate key. ...
    (comp.lang.cobol)
  • Re: How to set LOCKIDTBL?
    ... Hoff Hoffman wrote: ... Databases and a few applications can require great huge piles of locks. ... A MicroVAX 3100 running some applications will churn along with minimal locking activity, while a clustered MicroVAX 3100 running Oracle Rdb will require rather more locks; it's the application load and not the system model that tends to be key here. ...
    (comp.os.vms)
  • Re: How to set LOCKIDTBL?
    ... Databases and a few applications can require great huge piles of locks. ... A MicroVAX 3100 running some applications will churn along with minimal locking activity, while a clustered MicroVAX 3100 running Oracle Rdb will require rather more locks; it's the application load and not the system model that tends to be key here. ...
    (comp.os.vms)
  • Re: Walking Dataset, faster/better way?! Help!!!
    ... In regards to use of cursors, it depends what applications you develop. ... want to use a cursor, simply close it after you get all of records. ... > .Net will never perform this type of analysis the way SQL server can. ... >>> a time comparing values in some of its columns against similar columns ...
    (microsoft.public.dotnet.framework.performance)