Powerhouse screen failing to set value on detail record

Herald Kaffka Herald.Kaffka at westfraser.com
Tue Jan 24 16:05:48 CST 2017


We hit something which "might" be related.  (Your example is reasonable complex).

ALPHA/Vax used a "stable sort", if your sort (orderby) listed a subset of columns, they would always
Return/process the "extra" columns in the same order.  Itanium is using a different sort algorithm, if you
Order by a subset of columns, that subset will always return sorted, but any "extra" columns return in a
"random" order.

In our case (quiz) reporting customers by company/store, the totals for the company (Home Depot say)
Would always be correct, but the order of the detail lines for the individual store lines was "random".
(would be an implicit alpha sort on store name for Alpha, random line order on Itanium).

Solution was to full sort (orderby) the column list to the last level of detail.

You have a
orderby HRG_ACTUAL_DTE descending

might want to take that down hearing_date as well.  (just in case you are getting an unstable sort order).

This was pretty much the only difference we noticed between Alpha/Itanium, stable/unstable sorts.


-----Original Message-----
From: powerh-l-bounces+herald.kaffka=westfraser.com at lists.sowder.com [mailto:powerh-l-bounces+herald.kaffka=westfraser.com at lists.sowder.com] On Behalf Of Thurston, Alan JTST:EX
Sent: Tuesday, January 24, 2017 1:44 PM
To: 'powerh-l at lists.sowder.com' <powerh-l at lists.sowder.com>
Subject: Powerhouse screen failing to set value on detail record

A high level view of the business is that a CASE may have a HEARING. The hearing may happen over several days (HEARING_DATE) and on each of those dates there will be a MEETING.
The MEETING record has an attribute HRG_ID which stores the HRG_ID of the HEARING_DATE.
HRG_ID of the HEARING_DATE is the primary key and always has a correct value.
HRG_ID of the MEETING is meant to store the same value as HRG_ID of the HEARING_DATE.

I have a screen that includes the following files. This is the original source for the screen. The "item HRG_ID of MEETING" line under the file MEETING statement is the only place that HRG_ID of MEETING is given a value. Prior to migrating to Itanium this worked as expected.

file CASE_HEARING in LRBDB primary
 access via CASE_ID using T_CASE_ID2
 access via CASE_ID using CASE_ID request CASE_ID  access via CASE_ID, HRG_ID using T_CASE_ID, T_HRG_ID  item UPD_BY  of CASE_HEARING final &
             upshift(getsystemval("LRB_USER",logical,"LNM$JOB")) &
                                if alteredrecord of CASE_HEARING  item UPD_DTE of CASE_HEARING final sysdate if alteredrecord of CASE_HEARING


file HEARING_DATE in LRBDB detail occurs 9  access via HRG_ID using HRG_ID of CASE_HEARING &
                                        orderby HRG_ACTUAL_DTE descending  select if &
    (HRG_ACTUAL_DTE of HEARING_DATE >= CONSOLIDATION_DTE of CASE_HEARING &
 and HRG_ACTUAL_DTE of HEARING_DATE <= WITHDRAWAL_DTE of CASE_HEARING)   or &
    (HRG_ACTUAL_DTE of HEARING_DATE >= CONSOLIDATION_DTE of CASE_HEARING &
 and WITHDRAWAL_DTE of CASE_HEARING = 0)                             or &
     CONSOLIDATION_DTE of CASE_HEARING = 0  item HRG_ID  of HEARING_DATE final HRG_ID of CASE_HEARING  item UPD_BY  of HEARING_DATE final &
              upshift(getsystemval("LRB_USER",logical,"LNM$JOB")) &
                                if alteredrecord of HEARING_DATE  item UPD_DTE of HEARING_DATE final sysdate if alteredrecord of HEARING_DATE


file MEETING in LRBDB secondary occurs with HEARING_DATE  access via HRG_ID using HRG_ID of HEARING_DATE
 item HRG_ID of MEETING final HRG_ID of HEARING_DATE                       <-------------- not working
 item MTG_DTE of MEETING final HRG_ACTUAL_DTE of HEARING_DATE  item MTG_NAME of MEETING final HRG_NAME of HEARING  item MTG_START_TIME of MEETING final HRG_START_TIME of HEARING_DATE  item UPD_BY of MEETING final &
              upshift(getsystemval("LRB_USER",logical,"LNM$JOB")) &
                                if alteredrecord of MEETING  item UPD_DTE of MEETING final sysdate if alteredrecord of MEETING  select if MTG_DTE of MEETING = HRG_ACTUAL_DTE of HEARING_DATE and &
           MTG_START_TIME of MEETING = HRG_START_TIME of HEARING_DATE


After the move to Itanium this is no longer working consistently, sometimes does, more often does not, even with the same data entry sequence

I've tried a number of statements like "let HRG_ID of MEETING = HRG_ID of HEARING_DATE" at various points.
I went so far as to hard code the update procedure:

procedure update
begin
  put HEARING
  put CASE_HEARING
  for HEARING_DATE
    begin
      let HRG_ID of MEETING = HRG_ID of HEARING
      info = "Before PUT: HRG_ID of MEETING = " + ascii(HRG_ID of MEETING) now resp
      put MEETING
      put HEARING_DATE
      info = "After PUT: HRG_ID of MEETING = " + ascii(HRG_ID of MEETING) now resp
    end
end

The first info shows the expected correct HRG_ID. After the "put MEETING" the info statements shows a HRG_ID of 0 which is what gets stored in the database.
There are no database triggers than impact HRG_ID of MEETING

Any ideas as to how I could fix this?


Thanks!

Alan Thurston (Independent Contractor)
Working for the Ministry of Jobs, Tourism and Skills Training, and Responsible for Labour
250-882-4623 (cell)

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe &lt;password&gt;' in message body to powerh-l-request at lists.sowder.com
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.sowder.com%2Fmailman%2Flistinfo%2Fpowerh-l&data=01%7C01%7Cherald.kaffka%40westfraser.com%7Cd4ae7b3eff6046821aa608d4449185c8%7C34ad3be0bbba4db0a8e8933abd884c7d%7C1&sdata=6T2hcDBbDnYHFpcaKpqKirIWDdXymcbxNr1O03chmAM%3D&reserved=0
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.


-------------EOP---------------

This e-mail message and any attachments are confidential. Any dissemination or use of this information by a person other than the intended recipient is unauthorized. If you are not the intended recipient, please notify me by return e-mail, do not open any attachment and delete this communication and any copy.

Thank you


More information about the powerh-l mailing list