GKatReliable
Programmer
We have FPW26 and run a number of programs against our payroll system. We keep an audit text file of what gets run by our user community. Each program passes parameters to this function, which writes to the audit text file:
FUNCTION LogWrit
PARAMETER lcText, lcLog
IF PCOUNT() < 2 .OR. lcLog = ''
lcLog = 'AUDIT.TXT'
ENDIF
SET CONSOLE OFF
SET ALTERNATE TO &lcLOG ADDITIVE
SET ALTERNATE ON
? LEFT(CDOW(DATE()),3), DATE(), TIME(), lcText
SET ALTERNATE TO
SET ALTERNATE OFF
SET CONSOLE ON
RETURN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The lcText is the name of the program that is running at the time.
Anyway, what we really need to be able to add to this, is who the user is that is running the program at the time. We have Windows NT-type network and servers and NT/Win2K PCs. dBase used to have a couple functions to tell the user ID, but I can't find anything in FPW26.
Keeping things simple would be a good thing.
Regards,
Glenn Koproske
St. Louis, Missouri
FUNCTION LogWrit
PARAMETER lcText, lcLog
IF PCOUNT() < 2 .OR. lcLog = ''
lcLog = 'AUDIT.TXT'
ENDIF
SET CONSOLE OFF
SET ALTERNATE TO &lcLOG ADDITIVE
SET ALTERNATE ON
? LEFT(CDOW(DATE()),3), DATE(), TIME(), lcText
SET ALTERNATE TO
SET ALTERNATE OFF
SET CONSOLE ON
RETURN
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The lcText is the name of the program that is running at the time.
Anyway, what we really need to be able to add to this, is who the user is that is running the program at the time. We have Windows NT-type network and servers and NT/Win2K PCs. dBase used to have a couple functions to tell the user ID, but I can't find anything in FPW26.
Keeping things simple would be a good thing.
Regards,
Glenn Koproske
St. Louis, Missouri