Powerhouse screen failing to set value on detail record

Thurston, Alan JTST:EX Alan.Thurston at gov.bc.ca
Tue Jan 24 13:44:23 CST 2017


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)



More information about the powerh-l mailing list