No subject
kevinwong
kevinwong@hk.ublaze.com
Tue, 19 Dec 2000 16:58:25
Dear all,
I store my next invoice number in a one-record direct file which will be updated as the user create new invoice.(seq. no. generation.)But I find out that the file was never locked when dup-record error was reported from user.
I never expect simple function like seq.-no.-generation will go wrong, is it the problem of choosing file type (Direct organ.)?
Thanks in advance for you help
Kevin Wong
System info :-
Ph Ver. : 710g1
Platform : Alpha OpenVMS 7.1 / RMS
P.S. Quick program and Dictionary defination are as follows
screen exe:sp300
temp parameter char*20 init ""
file invoice
file invoice_cnt designer open close
.
.
.
proc preupdate
begin
if newrecord
then begin
lock invoice_cnt
get invoice_cnt seq
let invoice_no = asc(ncon(invoice_cnt) + 1,6)
let invoice_cnt = invoice_no
put invoice_cnt
unlock invoice_cnt
disp invoice_no
info = "New invoice " + asc(ncon(invoice_no)) + &
" has been created." now response
end
end
Dictionary :-
R E C O R D R E P O R T
For DICTIONARY: DRA0:[SP2000.DIC]PHD.PHD;
Record: invoice_CNT
of File: invoice_CNT
Organization: DIRECT
Type: RMS
Open: DAT:invoice_CNT
Record Format: Fixed
Supersede: No
Record Size: 6 Bytes
-- Record Contents --
Item Type Size Occ Offset
invoice_CNT CHARACTER 6 0
______________________________________________________________________
Get Your 100Mb, Free Web-based E-mail from uBlaze.com at
http://mail.ublaze.com
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.