Subject: | |
From: | |
Reply To: | |
Date: | Thu, 26 Feb 1998 14:10:12 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I have been having a problem with this program for a number of months
now and have addressed various parts of it under the PAUSE thread and
FILE LOCKING thread, but it still keeps happening. What we are doing
is opening a file, locking the file, checking status results and then
waiting (via PAUSE) a short period of time before attempting the lock
again. This is all done via COBOL. What happens is the program
goes into a "loop forever" condition whenever the lock fails. We replaced
the CALL INTRINSIC "PAUSE" with a call to HPCICOMMAND to execute the
PAUSE command (which did nothing) and finally removed the pausing
all together, so now the code looks like this:
MOVE " STARTING VALIDATE-QUEUE"
TO DEBUG-RECORD.
WRITE DEBUG-RECORD.
MOVE ZERO TO COND-WORD.
MOVE SPACES TO JOB-CTL-STATUS.
PERFORM OPEN-JOB-CTL-FILE
UNTIL COND-WORD > +100
OR JOB-CTL-STATUS-OK.
OPEN-JOB-CTL-FILE.
MOVE SPACES TO DEBUG-RECORD.
MOVE COND-WORD TO DISPLAY-NUMBER.
STRING " BEGIN ATTEMPT TO OPEN JOB-CTL-FILE, #"
DELIMITED BY SIZE
DISPLAY-NUMBER DELIMITED BY SIZE
INTO DEBUG-RECORD.
WRITE DEBUG-RECORD.
OPEN INPUT JOB-CTL-FILE.
IF JOB-CTL-STATUS-OK
MOVE " JOB-CTL-FILE OPENED OKAY"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
EXCLUSIVE JOB-CTL-FILE CONDITIONALLY
IF JOB-CTL-STATUS-OK
MOVE " JOB-CTL-FILE LOCKED OKAY"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
ELSE
MOVE " COULD NOT LOCK JOB-CTL-FILE"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
CLOSE JOB-CTL-FILE
**** CALL INTRINSIC "PAUSE" USING PAUSE-4
MOVE " PERFORMING CALL-PAUSE-4"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
PERFORM CALL-PAUSE-4
MOVE " BACK FROM PERFORM OF CALL-PAUSE-4"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
ADD +1 TO COND-WORD
MOVE " ADD +1 TO COND-WORD"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
ELSE
MOVE " COULD NOT OPEN JOB-CTL-FILE"
TO DEBUG-RECORD
WRITE DEBUG-RECORD
**** CALL INTRINSIC "PAUSE" USING PAUSE-4
PERFORM CALL-PAUSE-4
ADD +1 TO COND-WORD.
STRING " END ATTEMPT TO OPEN JOB-CTL-FILE, #"
DELIMITED BY SIZE
DISPLAY-NUMBER DELIMITED BY SIZE
INTO DEBUG-RECORD.
WRITE DEBUG-RECORD.
CALL-PAUSE-4.
MOVE " CALLING PAUSE VIA HPCICOMMAND"
TO DEBUG-RECORD.
WRITE DEBUG-RECORD.
MOVE "PAUSE 4" TO HPCICOMMAND-TEXT.
**** CALL INTRINSIC "HPCICOMMAND" USING HPCICOMMAND-COMMAND
**** HPCICOMMAND-ERROR
**** \\, 0.
MOVE " BACK FROM PAUSE VIA HPCICOMMAND"
TO DEBUG-RECORD.
WRITE DEBUG-RECORD.
The following is what is printed in the DEBUG-FILE:
STARTING VALIDATE-QUEUE
BEGIN ATTEMPT TO OPEN JOB-CTL-FILE, # 0
JOB-CTL-FILE OPENED OKAY
COULD NOT LOCK JOB-CTL-FILE
PERFORMING CALL-PAUSE-4
CALLING PAUSE VIA HPCICOMMAND
BACK FROM PAUSE VIA HPCICOMMAND
BACK FROM PERFORM OF CALL-PAUSE-4
ADD +1 TO COND-WORD
END ATTEMPT TO OPEN JOB-CTL-FILE, # 0
Looking at the session that ran this (using SOS/3000) shows that the
session is consuming 70-80% of the CPU while waiting for "Quantum
Expiration" (whatever that is). All the user sees is a locked-up
terminal/session.
Any ideas? Either on what's wrong, or how to further debug this
problem? Thanks in advance.
Jim Phillips Manager of Information Systems
E-Mail: [log in to unmask] Therm-O-Link, Inc.
Phone: (330) 527-2124 P. O. Box 285
Fax: (330) 527-2123 Garrettsville, Ohio 44231
|
|
|