- 论坛徽章:
- 0
|
# Program ID : MAUFMIS.4GL
# ProGram_Compile : maufmis oaufmis
# Calling Program : remd001.4gl
# System :
# Author : Bill.Chou
# Date Written :
# Description :
# Amendment History : 22 MAY 00 (FOR LINUX USE)
globals "misglobal.4gl"
MAIN
defer interrupt
defer quit
options
input wrap,
message line last,
prompt line 1,
error line last,
comment line 2,
help key control-e,
previous key control-b,
next key control-f,
delete key control-y,
insert key control-n
call startlog("/usr/apps/chmis/mis_error.log"
whenever error call uErrorHandle
call uSystemInit()
call mMaufMain()
clear screen
END MAIN
function mMaufMain()
define wMenuPtr, wChkRemd smallint, wPgmType char(1),
wPgmID like mis_program.pgm_id
let wChkRemd = mChkReminder()
while true
let rPgmRec.sPgmDesc = uGetCodeDesc("MU001"
let rPgmRec.sPgmID = "MENU001"
call uDispMainWin()
if not mMenuInit("MU001", wMenuPtr) then
call mMenuExit()
exit while
end if
if wChkRemd then
if uConfirm("M0093" then
let wPgmID = "REMD001"
end if
else
call mMenuGet() returning wMenuPtr, wPgmType, wPgmID
if wPgmID = " " then
if uConfirm("M0035" then
let wPgmID = "EXITM"
end if
end if
end if
call mMenuExit()
case wPgmID
when "EXITM"
exit while
when " "
exit case
when "REMD001"
call fRemdInit()
call fRemdForm()
call fRemdMenu(wChkRemd)
call fRemdExit()
when "MU801"
call mRptMaint()
when "MUACC"
call mAcctMaint()
when "MU999"
call mSysUtil()
otherwise
call uLaunchSys(wPgmID)
end case
let wChkRemd = false
end while
end function
function mChkReminder()
define wExist smallint
select count(*) into wExist from reminder
where input_by = rUserRec.sUserID
and ( (month(rec_date) = month(TODAY ) and day(rec_date) = day(TODAY ))
or (month(rec_date) = month(TODAY+1) and day(rec_date) = day(TODAY+1))
or (month(rec_date) = month(TODAY+2) and day(rec_date) = day(TODAY+2)) )
if wExist >; 0 then
return true
end if
return false
end function
{End of MIS Main Module} |
|