Enhanced Error Checking
This commit is contained in:
committed by
Ouellette Jonathan (CSC FI SPS MESLEO)
parent
09d2d13e63
commit
a8dff61cfa
@ -3577,37 +3577,45 @@ end service
|
||||
Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
|
||||
|
||||
ErrMsg = ''
|
||||
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
|
||||
SLLReactors = ''
|
||||
If AllReactors NE '' then
|
||||
for each ReactNo in AllReactors using @FM
|
||||
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
|
||||
If PickPlaceFlag then
|
||||
Open 'DICT.REACT_LL' to DictReactLL then
|
||||
SearchString = ''
|
||||
SearchString := 'REACT_NO':@VM:ReactNo:@FM
|
||||
ReactLLKeys = ''
|
||||
Btree.Extract(SearchString, 'REACT_LL', DictReactLL, ReactLLKeys)
|
||||
|
||||
For each ReactLLKey in ReactLLKeys using @VM
|
||||
ReactLLRec = Database_Services('ReadDataRow', 'REACT_LL', ReactLLKey, True$, 0, False$)
|
||||
ReactLLStartDTM = Field(ReactLLKey, '*', 2)
|
||||
ReactLLEndDTM = ReactLLRec<REACT_LL_STOP_DTM$>
|
||||
ReactLLApplicable = false$
|
||||
If ReactLLStartDTM LE DtmToCheck AND (ReactLLEndDTM EQ '' OR ReactLLEndDtm GT DtmToCheck) then
|
||||
Locate ReactNo in SLLReactors using @VM setting iPos else
|
||||
SLLReactors<1, -1> = ReactNo
|
||||
end
|
||||
end
|
||||
If DtmToCheck NE '' then
|
||||
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
|
||||
If AllReactors NE '' then
|
||||
for each ReactNo in AllReactors using @FM
|
||||
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
|
||||
If PickPlaceFlag then
|
||||
Open 'DICT.REACT_LL' to DictReactLL then
|
||||
SearchString = ''
|
||||
SearchString := 'REACT_NO':@VM:ReactNo:@FM
|
||||
ReactLLKeys = ''
|
||||
Btree.Extract(SearchString, 'REACT_LL', DictReactLL, ReactLLKeys)
|
||||
|
||||
Next ReactLLKey
|
||||
end else
|
||||
ErrMsg = 'Unable to open the REACT_LL dictionary.'
|
||||
For each ReactLLKey in ReactLLKeys using @VM
|
||||
ReactLLRec = Database_Services('ReadDataRow', 'REACT_LL', ReactLLKey, True$, 0, False$)
|
||||
ReactLLStartDTM = Field(ReactLLKey, '*', 2)
|
||||
ReactLLEndDTM = ReactLLRec<REACT_LL_STOP_DTM$>
|
||||
ReactLLApplicable = false$
|
||||
If ReactLLStartDTM LE DtmToCheck AND (ReactLLEndDTM EQ '' OR ReactLLEndDtm GT DtmToCheck) then
|
||||
Locate ReactNo in SLLReactors using @VM setting iPos else
|
||||
SLLReactors<1, -1> = ReactNo
|
||||
end
|
||||
end
|
||||
|
||||
Next ReactLLKey
|
||||
end else
|
||||
ErrMsg = 'Unable to open the REACT_LL dictionary.'
|
||||
end
|
||||
end
|
||||
end
|
||||
Next ReactNo
|
||||
Next ReactNo
|
||||
end else
|
||||
ErrMsg = 'No Reactor IDs found!'
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'No Reactor IDs found!'
|
||||
ErrMsg = 'Datetime to check variable was null.'
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', ErrMsg)
|
||||
end
|
||||
|
||||
Response = SLLReactors
|
||||
|
Reference in New Issue
Block a user