project BLF > class BSystem > method Calculate
Description
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bsystem.p)
<ANCESTOR-CODE>
assign vhFcComponent = ?.
<M-1 run MainBlock () in TCrypt>
assign vhCrypthandle = vhFcComponent.
for each tSyst on error undo, throw:
if vlDataLoadKeepPrevious and can-find (tAlreadyCalculatedRecords where
tAlreadyCalculatedRecords.tcTableName = "Syst" and
tAlreadyCalculatedRecords.tc_Rowid = tSyst.tc_Rowid)
then next.
<M-2 run DecryptString
(input tSyst.SystAdminUserPwd (icInputString),
output tSyst.SystAdminUserPwd (ocOutputString),
output viFcReturnSuper (oiReturnStatus)) in TCrypt>
if vcActivityCode = "SODConfigure"
then do:
if tSyst.SystSODActive = ?
then do:
tSyst.SystSODActive = yes.
<M-35 run SetMessage
(input #T-36'SOD activation is still running.':255(537450102)T-36# (icMessage),
input '' (icArguments),
input '' (icFieldName),
input '' (icFieldValue),
input 'W' (icType),
input 4 (iiSeverity),
input '' (icRowid),
input 'blf-257532':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BSystem>
oiReturnStatus = 1.
end.
if tSyst.SystSODActive = no
then do:
<Q-19 run RoleByIDName (all) (Read) (NoCache)
(input 0, (RoleID)
input 'superuser', (RoleName)
output dataset tqRoleByIDName) in BRole>
find first tqRoleByIDName no-error.
if available tqRoleByIDName
then if tqRoleByIDName.tlRoleSODException = no
then do:
vcFcMaskList = #T-40'Role superuser is not excluded from SOD.':255(239651197)T-40# + " "
+ #T-85'Activating SOD now may take a long time.':255(16941278)T-85# + " "
+ #T-98'It is recommended to run this from command line, or exclude role superuser from SOD.':255(108629816)T-98#.
<M-72 run SetMessage
(input vcFcMaskList (icMessage),
input '' (icArguments),
input '' (icFieldName),
input '' (icFieldValue),
input 'W' (icType),
input 4 (iiSeverity),
input '' (icRowid),
input 'blf-686523':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BSystem>
oiReturnStatus = 1.
end.
end.
end.
end.
finally:
if vhCrypthandle <> ?
then do:
run gipr_DeleteProcedure in vhCrypthandle.
delete procedure vhCrypthandle.
end.
end finally.