This is a multi-part message in MIME format. ------=_NextPart_000_0001_01BE6888.103C97C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit You have not given enough background to answer your question completely. Here are some suggestions to try. Do the other users need the data in the 4 items that you are updating? If not, then split them into another record with a one to one link between the two files. This will probably result is some rewrite of other source code to support this, but it is one option. With the quantity of records you have, any volume adds and volume key changes will be magnified. Are any of the item statements updated KSAM keys? If they are, then you are taking a HUGE performance hit, and the update is taking longer than it should. Redesign your files and process to not update KSAM keys. Another option is to lock out the other users until the update is done. Set up a flag field somewhere. The first step in your QTP will set the flag to LOCKED, then use SET FILE LOCK while you run your Updates, then set the flag back to UNLOCKED. Issue an error message to any users that try to retrieve records while the process is locked. Is your update run only once a day? What time of day? Is it a low user usage time or a high usage time? Can you change it to a low usage time? Can you run smaller updates of 100 each and lock the file while your update is running. From your example, you are updating less than 27% of the records that you are reading. Can you extract only the records that need to be updated, and then read only those records for update? 1.75 million direct reads will take some time on any size machine. Can you archive some of data set into a history data set and then redesign other processes (reports and screens) that need the files combined? There is no one correct answer. Much of this type of tuning and design requires knowledge of the application, data, and how the data is used. A combination of the above may need to be considered. Call me on Monday if you would like to discuss some of theses ideas more. Oran Shapitka, ISP Intertech Business Systems, Inc. 1564, 10303 Jasper Ave Email: oran@intertechsystems.com Edmonton, AB T5J 3N6 Canada Voice: (780) 413-0400 Fax: (780) 413-0398 -----Original Message----- From: owner-powerh-l@sphere.swau.edu [mailto:owner-powerh-l@sphere.swau.edu]On Behalf Of Lafferty, Mike Sent: Friday, March 05, 1999 2:44 PM To: 'POWERH-L@LISTS.SWAU.EDU' Subject: QTP QUESTION How would you avoid contention with concurrent users when updating just 4 items of a KSAM file using QTP....We are running PHv6.09 on an HP3000....In batch, I got the following message..... Thank you in advance.....Mike 24 :RUN QTPR.CURRENT.COGNOS;INFO="DICT=TM40DDC AUTO=TM2352AC" 25 29 30 99/03/05 14:31 DRC 4.0 QUOTE SUBSYSTEM PAGE 1 31 32 Run: 33 Request: 1 34 35 36 Executing request 1 ... 37 ---------------------------------------------------------------------- --------- 38 Record has been changed since you found it. [15900] 39 File: QTE-POL-INDX-RCD 40 Linkitem: K-QP-INDEX-KEY 108262885 41 42 Action Taken: Run terminated. 43 ---------------------------------------------------------------------- --------- 44 45 Records read: 46 TMQUOTE 1,747,073 47 QTE-POL-INDX-RCD 1,746,573 48 49 Transactions processed: 15,900 50 51 Records processed: Added Updated Unchanged Deleted 52 QTE-POL-INDX-RCD 0 4,213 11,686 0 53 54 Finished. 55 59 60 Program terminated in an error state. (CIERR 976) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 61 REMAINDER OF JOB FLUSHED. ^^^^^^^^^^^^^^^^^^^^^^^^^ 1.. CPU sec. = 1029. elapsed min. = 77. FRI, MAR 5, 1999, 3:48 PM. Here is the code............ SET DICT TM40DDC SET INPUT LIMIT 2000000 SET LOCK FILE UPDATE ACC *TMQUOTE LINK ("1" + Q-QUOTE-NO) TO & K-QP-INDEX-KEY OF QTE-POL-INDX-RCD OUT QTE-POL-INDX-RCD UPDATE NOITEMS ON ERRORS BYPASS UNTIL FINAL ITEM K-HOUSEHOLD-NO FINAL HOUSEHOLD-NO OF TMQUOTE & IF K-HOUSEHOLD-NO <> HOUSEHOLD-NO OF TMQUOTE ITEM K-AMF-ACCOUNT-NO FINAL QP-ACCT-NO OF TMQUOTE & IF K-AMF-ACCOUNT-NO <> QP-ACCT-NO OF TMQUOTE ITEM K-U-ACCOUNT-NAME FINAL AU-ACCOUNT-NAME OF TMQUOTE & IF K-U-ACCOUNT-NAME <> AU-ACCOUNT-NAME OF TMQUOTE ITEM K-TOTAL-PREMIUM FINAL QP-TOTAL-VEH-PRM OF TMQUOTE & IF K-TOTAL-PREMIUM <> QP-TOTAL-VEH-PRM OF TMQUOTE BUILD TM2352AC ------=_NextPart_000_0001_01BE6888.103C97C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">QTP QUESTION You=20 have not given enough background to answer your question = completely. Here=20 are some suggestions to try.Do the=20 other users need the data in the 4 items that you are updating? If = not,=20 then split them into another record with a one to one link between the = two=20 files. This will probably result is some rewrite of other source = code to=20 support this, but it is one option. With the quantity of records = you have,=20 any volume adds and volume key changes will be = magnified.Are=20 any of the item statements updated KSAM keys? If they are, then = you are=20 taking a HUGE performance hit, and the update is taking longer than it=20 should. Redesign your files and process to not update KSAM=20 keys.Another option is to lock out the other users until the update = is=20 done. Set up a flag field somewhere. The first step in your = QTP will=20 set the flag to LOCKED, then use SET FILE LOCK while you run your = Updates, then=20 set the flag back to UNLOCKED. Issue an error message to any users = that=20 try to retrieve records while the process is locked.Is=20 your update run only once a day? What time of day? Is it a = low user=20 usage time or a high usage time? Can you change it to a low usage=20 time? Can you run smaller updates of 100 each and lock the file = while your=20 update is running. From your example, you are updating less than = 27% of=20 the records that you are reading. Can you extract only the records = that=20 need to be updated, and then read only those records for update? = 1.75=20 million direct reads will take some time on any size=20 machine.Can=20 you archive some of data set into a history data set and then redesign = other=20 processes (reports and screens) that need the files=20 combined?There=20 is no one correct answer. Much of this type of tuning and design = requires=20 knowledge of the application, data, and how the data is used. A=20 combination of the above may need to be considered.Call=20 me on Monday if you would like to discuss some of theses ideas=20 more.Oran Shapitka, ISP
Intertech Business Systems, Inc.
1564, 10303 Jasper Ave = Email: =20 oran@intertechsystems.com
Edmonton, AB T5J 3N6 Canada =20 Voice: (780)=20 413-0400 Fax: (780)=20 413-0398-----Original Message-----
From: owner-powerh-l@sphere.swau= .edu=20 [mailto:owner-powerh-l@sphere.swau.edu]On Behalf Of Lafferty, = Mike
Sent: Friday, March 05, 1999 2:44 PM
To: 'POWERH-L@LISTS.SWAU.EDU'Subject:=20 QTP QUESTIONHow would you avoid contention with = concurrent=20 users when updating just 4 items of a KSAM file using QTP....We are = running=20 PHv6.09 on an HP3000....In batch, I got the following=20 message.....
Thank you in advance.....Mike =
24 :RUN=20 QTPR.CURRENT.COGNOS;INFO=3D"DICT=3DTM40DDC = AUTO=3DTM2352AC"=20
= 25 =20
= 29 =20
= 30 =20 99/03/05 14:31 DRC 4.0 QUOTE=20 = SUBSYSTEM &nbs= p;  = ; =20
PAGE 1 =
31 =
32 = Run:=20
= 33 =20 Request: 1
=20 34
=20 35
=20 36 Executing request 1 ...
37 =20 = ----------------------------------------------------------------------=20
---------
38 Record has been = changed since=20 you found=20 = it. &nbs= p;  = ; =20
[15900] =
= 39 =20 File: QTE-POL-INDX-RCD
= 40 =20 Linkitem: =20 = K-QP-INDEX-KEY  = ; =20 108262885
=20 41
=20 42 Action Taken: Run terminated.
43 =20 = ----------------------------------------------------------------------=20
---------
44
45 Records = read:=20
=20 46 =20 = TMQUOTE = &= nbsp; =20 1,747,073
=20 47 =20 = QTE-POL-INDX-RCD &nb= sp; =20 1,746,573
=20 48
=20 49 Transactions=20 = processed: &nb= sp; =20 15,900
=20 50
=20 51 Records=20 = processed: &nb= sp; =20 Added Updated Unchanged =20
Deleted
52 =20 = QTE-POL-INDX-RCD &nb= sp; &nbs= p; =20 0 4,213 =20 11,686
0
53
54 Finished. =
55 =
59 =
60 = Program=20 terminated in an error state. (CIERR 976)
=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 = REMAINDER OF JOB=20 FLUSHED.
=20 ^^^^^^^^^^^^^^^^^^^^^^^^^=20
- CPU sec. =3D 1029. = elapsed min. =3D=20 77. FRI, MAR 5, 1999, 3:48 PM.=20
Here is the code............ =
SET DICT TM40DDC
SET INPUT LIMIT 2000000
SET LOCK=20 FILE UPDATE
ACC *TMQUOTE = LINK=20 ("1" + Q-QUOTE-NO) TO &
&nbs= p; =20 K-QP-INDEX-KEY OF QTE-POL-INDX-RCD
OUT=20 QTE-POL-INDX-RCD UPDATE NOITEMS ON ERRORS BYPASS UNTIL FINAL =ITEM K-HOUSEHOLD-NO = FINAL=20 HOUSEHOLD-NO OF TMQUOTE &
IF = K-HOUSEHOLD-NO <>=20 HOUSEHOLD-NO OF TMQUOTE
=20 ITEM K-AMF-ACCOUNT-NO FINAL QP-ACCT-NO OF TMQUOTE & =
IF = K-AMF-ACCOUNT-NO <> QP-ACCT-NO OF TMQUOTE
ITEM K-U-ACCOUNT-NAME FINAL AU-ACCOUNT-NAME OF = TMQUOTE=20 &
IF = K-U-ACCOUNT-NAME=20 <> AU-ACCOUNT-NAME OF TMQUOTE
ITEM K-TOTAL-PREMIUM FINAL QP-TOTAL-VEH-PRM OF = TMQUOTE=20 &
IF = K-TOTAL-PREMIUM=20 <> QP-TOTAL-VEH-PRM OF TMQUOTEBUILD TM2352AC=20