This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1B612.3FE62B00 Content-Type: text/plain Hi Darren, I found the entry below in the Acrobat PH 8 Books set which ( as I'm sure you are now aware ) you can download from the Cognos web site at URL, http://support.cognos.com/supported/support/support_library/powerhouse/ph8do c.html NEED n|ALL Places the specified number of data records (n or ALL) on file, regardless of the current data record status. This option causes the PUT verb to treat the data record as changed, even if it isn't. To have any effect, the PUT verb must still be executed for the NEED option. This option can be used to add blank data records or data records with initial and final values only. Limit: Valid for record-structures in PRIMARY, SECONDARY, DETAIL, and DESIGNER files. Also valid for record-structures in AUDIT files that have not had the WITH option of the FILE statement specified. n Specifies the minimum number of occurrences of the data record to add to the file. At least this many occurrences of data records must be declared on the screen. ALL Indicates that the number of data records to add to the file is the number of data records of this file declared on the screen (as specified by the OCCURS option). -----Original Message----- From: Darren Reely [mailto:darren.reely@latticesemi.com] Sent: 15 February 2002 01:11 To: 'powerh-l@lists.swau.edu' Subject: File NEED, PUT (Was: Update Out of Sync) What I really wanted to know was... If you place NEED on a file statement, is the PUT suppose to be executed even when no data has been changed for the record? In my case, I know the UPDATE procedure must be executed because User 2 did make a change to the DETAIL record which does get updated properly. Thanks, Darren P.S. This is not problem of two users updating simultaneously. They have fetched the identical record before the other person has done an update. But their updates could occur several minutes apart. Darren Reely wrote: > > Hi All, > > I have a screen that two users can update fields from different records. > Unfortunately we duplicate one of fields from the primary record to another > table, but this can fail when two users are in the screen performing > updates. > > Here is the scenario. > User 1 & 2 both pull up the same data at the same time. > > User 1 changes a value in the primary record. > User 1 performs an update which does the 'put product_ms'. > User 1 update performs postupdate procedure to copy the column > to the other table. > > User 2 changes a value in a detail record. > User 2 performs an update, which skips the 'put product_ms' since > no fiels were changed for it. > User 2 update performs postupdate with old value that user 1 changed. > > The columns are now out of sync. > > Refer to code below if needed. > > Now for my question. Why when I've added 'NEED 1' to the primary record, > does the 'put product_ms' not get performed? The proof is that the new > value is still in the record after the second user has updated his 'pmy' > record change. I thought placing a NEED on a file statement forces an > update. Am I misunderstanding this. No errors or warnings are returned. > > I think my solution will be to check if the field in the primary record has > changed. If so, only then do the update of the other table. My other > solution is to use a trigger. > > System is: > PH 8.13.D1 > Sun Solaris 2.6 > Oracle Release 7.3.4.4.0. > > file product_ms in mfg PRIMARY NEED 1 > file product_ms_yield in mfg alias pmy DETAIL occurs 2 noitems > file tester_forecast_yield in mfg designer > > procedure update > begin > put product_ms > for pmy > put pmy > end > > procedure postupdate > begin > while retrieving tester_forecast_yield via prod_line, ms & > using prod_line, ms of product_ms > begin > let gross_die_waf of tester_forecast_yield = gross_die_waf of > product_ms > put tester_forecast_yield > end > end > > Thank you for your time. > > Darren > > P.S. The surprise is that this 5 year old bug (before my time) has only > thrown out 11 records total this year and last. Also lucky, is the small > difference. > > = = = = = = = = = = = = = = = = = = = = = = = = = = = = > Mailing list: powerh-l@lists.swau.edu > Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu > Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu > http://lists.swau.edu/mailman/listinfo/powerh-l > This list is closed, thus to post to the list you must be a subscriber. = = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: powerh-l@lists.swau.edu Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu http://lists.swau.edu/mailman/listinfo/powerh-l This list is closed, thus to post to the list you must be a subscriber. This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. ------_=_NextPart_001_01C1B612.3FE62B00 Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">RE: File NEED, PUT (Was: Update Out of Sync) Hi Darren,
I found the entry below in the Acrobat PH 8 Books set = which ( as I'm sure you are now aware ) you can download from the = Cognos web site at URL, http://support.cognos.com/supported/support/support_li= brary/powerhouse/ph8doc.html
NEED n|ALL
Places the specified number of data records (n or = ALL) on file, regardless of the current data record status. This option = causes the PUT verb to treat the data record as changed, even if it = isn't. To have any effect, the PUT verb must still be executed for the = NEED option.This option can be used to add blank data records or = data records with initial and final values only.
Limit: Valid for record-structures in PRIMARY, = SECONDARY, DETAIL, and DESIGNER files. Also valid for record-structures = in AUDIT files that have not had the WITH option of the FILE statement = specified.n
Specifies the minimum number of occurrences of the = data record to add to the file. At least this many occurrences of data = records must be declared on the screen.ALL
Indicates that the number of data records to add to = the file is the number of data records of this file declared on the = screen (as specified by the OCCURS option).
-----Original Message-----
From: Darren Reely [mailto:darren.reely@lattice= semi.com]
Sent: 15 February 2002 01:11
To: 'powerh-l@lists.swau.edu'
Subject: File NEED, PUT (Was: Update Out of = Sync)
What I really wanted to know was...
If you place NEED on a file statement, is the PUT = suppose to be executed
even when no data has been changed for the = record?In my case, I know the UPDATE procedure must be = executed because User 2 did
make a change to the DETAIL record which does get = updated properly.Thanks,
Darren
P.S. This is not problem of two users updating = simultaneously. They have
fetched the identical record before the other person = has done an update.
But their updates could occur several minutes = apart.
Darren Reely wrote:
>
> Hi All,
>
> I have a screen that two users can update = fields from different records.
> Unfortunately we duplicate one of fields from = the primary record to another
> table, but this can fail when two users are in = the screen performing
> updates.
>
> Here is the scenario.
> User 1 & 2 both pull up the = same data at the same time.
>
> User 1 changes a value in the = primary record.
> User 1 performs an update which = does the 'put product_ms'.
> User 1 update performs postupdate = procedure to copy the column
> to = the other table.
>
> User 2 changes a value in a detail = record.
> User 2 performs an update, which = skips the 'put product_ms' since
> no = fiels were changed for it.
> User 2 update performs postupdate = with old value that user 1 changed.
>
> The columns are now out of = sync.
>
> Refer to code below if needed.
>
> Now for my question. Why when I've added = 'NEED 1' to the primary record,
> does the 'put product_ms' not get = performed? The proof is that the new
> value is still in the record after the second = user has updated his 'pmy'
> record change. I thought placing a NEED = on a file statement forces an
> update. Am I misunderstanding this. = No errors or warnings are returned.
>
> I think my solution will be to check if the = field in the primary record has
> changed. If so, only then do the update of the = other table. My other
> solution is to use a trigger.
>
> System is:
> PH 8.13.D1
> Sun Solaris 2.6
> Oracle Release 7.3.4.4.0.
>
> file product_ms in mfg PRIMARY NEED 1
> file product_ms_yield in mfg alias pmy DETAIL = occurs 2 noitems
> file tester_forecast_yield in mfg = designer
>
> procedure update
> begin
> put product_ms
> for pmy
> = put pmy
> end
>
> procedure postupdate
> begin
> while retrieving = tester_forecast_yield via prod_line, ms &
> using = prod_line, ms of product_ms
> begin
> let = gross_die_waf of tester_forecast_yield =3D gross_die_waf of
> product_ms
> put = tester_forecast_yield
> end
> end
>
> Thank you for your time.
>
> Darren
>
> P.S. The surprise is that this 5 year old = bug (before my time) has only
> thrown out 11 records total this year and = last. Also lucky, is the small
> difference.
>
> =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D = =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message = body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message = body to powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list = you must be a subscriber.=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D = =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to = powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body = to powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you = must be a subscriber.This message may contain privileged and/or = confidential information. If you have received this e-mail in = error or are not the intended recipient, you may not use, copy, = disseminate or distribute it; do not open any attachments, delete it = immediately from your system and notify the sender promptly by e-mail = that you have done so. Thank you.
------_=_NextPart_001_01C1B612.3FE62B00--