[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | *OLD* ALL-IN-1 (tm) Support Conference |
Notice: | Closed - See Note 4331.l to move to IOSG::ALL-IN-1 |
Moderator: | IOSG::PYE |
|
Created: | Thu Jan 30 1992 |
Last Modified: | Tue Jan 23 1996 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 4343 |
Total number of notes: | 18308 |
2442.0. "DUPlicate key detected and DSAB open errors" by EVTDD1::WOOD () Fri Mar 19 1993 15:04
Hello, it's been a long time since I've been in here,
I have a problem with ALL-IN-1 2.4 but I imagine it will exist on other
versions too.
I have a Pascal program which creates a text file. This text file needs to be
added to the file cabinet. To do this I do a CAB CREATE to get an entry and then
do a COPY to get it into WPS-PLUS. The whole thing used to work fine but as part
of a performance enhancement the job now has to multi-process. In tests if I set
off 10 jobs then I'm only getting around 50% success rate with the CAB CREATE
and the COPY. I'm getting the errors -
1) When doing the CAB CREATE
%OA-E-RECORD_IO_ERROR, Error occurred while attempting to PUT the record
-RMS-F-DUP, duplicate key detected (DUP not set)
2) And when doing the copy (but much less often)
%OA-E-NOCOPY, Problem with COPY function - file "xxx"-OA-E-TXTOPNERR,
TEXT DSAB open error
The DUP not set error is obviously coming from two jobs trying to write the same
FOLDER/DOCNUM combination into the DOCDB. Why is this happening ? And why does
the MAIL CREATE seem to be more intelligent ? I never get errors there. The
OA$FCV process is running OK (or is this just for the VMS filename ah-ha). I've
RMS analysed the files, they're fine and I've done the obvious rest and so on.
Is the second error anything to do with the WPSDEF.WPL ? I'm not sure, However
I never seem to get the COPY error when I start ALL-IN-1 with /EDITOR=EDT.
I don't know why this should be but it seems to work - or am I deluding myself?
I'd be happy to know how I can avoid these conflicts to get my job running
properly in parallel. I looked in the old conferences and although there
was some mention of this problem it was being caused by other things like DX
documents, GOLD I and so on.
Suggestions like, use different accounts, don't use WPSPLUS are no good because
of limits elsewhere in the system.
Thank-you
Dave Wood - France Sales
You can get the problem yourself by making a command procedure and firing it 10
times on some batch queue. If you don't see it straight away, stop the queue,
submit about ten of these and restart the queue. You'll definitely see it then
$ ALLIN1/NOINIT/REENTER
OA$INI_INIT
DO SYS$LOGIN:MYSCRIPT
.EXIT
and in the script MYSCRIPT
get #filespec = "sys$login:demo.txt"
get #addr = "_evtdd1::wood"
get #DOC_TITL = "Zee Document title"
CAB PUSH
GET #MESSAGE = ""
GET OA$DISPLAY="About to do CAB CREATE"\FORCE
CABINET CREATE "SCRATCH", ".WPL", #MESSAGE
.IF NOT OA$STATUS THEN .GOTO TIDY_UP
CAB BEGIN
CAB ADD_ATTR , "TITLE", #DOC_TITL
CAB ADD_ATTR , "AUTHOR", OA$PROFIL_FULNAM
CAB ADD_ATTR , "DSAB", "WPSPLUS"
CAB ADD_ATTR , "FORMAT", "WPSPLUS NO FMT"
CAB END
CAB POP
GET #MESS_FILE = CAB$.FILENAME[#MESSAGE]
GET OA$DISPLAY="About to do COPY"\FORCE
COPY #FILESPEC #MESS_FILE
.IF NOT OA$STATUS THEN .GOTO TIDY_UP
MAIL PUSH_CURMES
GET OA$DISPLAY="About to do MAIL CREATE"\FORCE
MAIL CREATE/OPEN/NOSEND
.IF NOT OA$STATUS THEN .GOTO TIDY_UP
GET #FOLSYM = OA$CURMES
MAIL TO #ADDR
MAIL EXPAND_DIST_LIST
MAIL SUBJECT #DOC_TITL
MAIL ATTACH #MESSAGE
MAIL CLOSE_MESSAGE
MAIL POP_CURMES
CABINET REFILE_DOCUMENT #FOLSYM, "REFILE ME" "", ""
.IF NOT OA$STATUS THEN .GOTO TIDY_UP
CABINET DELETE_DOCUMENT #MESSAGE
.EXIT
.LABEL TIDY_UP
get oa$display = "Status failure tidy-up"\FORCE
get oa$display = "#message is set to " #message\FORCE
get oa$display = "#folsym is set to " #folsym\FORCE
.IF #MESSAGE NES "" THEN CABINET DELETE_DOCUMENT #MESSAGE
.IF #FOLSYM NES "" THEN CABINET DELETE_DOCUMENT #FOLSYM
.EXIT
You'll also need a DEMO.TXT with some rubbish in it
T.R | Title | User | Personal Name | Date | Lines |
---|
2442.1 | CAB CREATE one is fixable; WPS-PLUS one isn't | IOSG::SHOVE | Dave Shove -- REO2-G/M6 | Fri Mar 19 1993 17:14 | 21 |
| I think you could get rid of your first problem by using ALL-IN-1 v3.0,
if that's possible. This is just the kind of problem that the "You are
already using ALL-IN-1" checks are there to prevent - in v3.0, the
flecab has locking code to allow more than one user to run in the same
account at once.
[ You're correct that OA$FCV is used to produce a unique VMS filename.
The docnum to use is worked out by reading the highest number in use
from the DOCDB, and adding one to it. Without the locking intorduced in
V3.0, this can cause the code to try to use the same number twice, in
setups like yours. ]
The second problem is a fundamental one in WPS-PLUS. It's caused, as
you guessed, by two processes trying to access WPSDEF.WPL at the same
time. I don't know of any way around this one (other than the obvious
ones you mention at the end of your note). It's for this reason (and
things to do with the permanent symbol table) that the "You are already
using ..." checks are still in place in v3.0.
Sorry,
D.
|