This routine will create a job log in the agent directory. This may be useful for diagnosing issues or seeing job execution status prior to a job completing.
In our case, we have several very log running jobs that we want to see how close they are to finishing or if perhaps they are hung up. Current ReportCaster will only log when the job completes and trying to guess at the status based on the hold file names and where they are in the execution order really sucks.
joblog.fex (deployed to Standards folder in App Path).
-* File joblog.FEX
-*=====================================================================*
-* COPYRIGHT 2012, VIDANT HEALTH, INC. *
-* Decision Support *
-*=====================================================================*
-* PROGRAM: JOBLOG
-* PROGRAMMER: Blake Thompson
-* DATE WRITTEN: NOVEMBER 2012
-* PURPOSE: Creates an Event Log in the Agent directory to see status
-* of running job. Must set JOBLOGMSG and call from a program.
-* INPUT: None
-* PARAMETERS: &JOBLOGMSG = Your logging text.
-* OUTPUT: JOBRUN.LOG in agent directory
-* INCLUDES: NONE
-*=====================================================================*
-* MODIFICATIONS *
-*---------------------------------------------------------------------*
-* MM/DD/YYYY BY: ANALYST NAME
-* DESCRIPTION OF MODIFICATION
-*=====================================================================*
-SET &JOBLOGDATE = &YYMD;
-SET &JOBLOGTIME = &TOD;
-SET &LOGFILENAME = "JOBRUN.LOG";
-DEFAULTH &JOBLOGMSG = 'No message text provided.';
-* i.e. [ 20121101 09.00.00 ] STEP 1 COMPLETE.
-DOS ECHO [ &JOBLOGDATE &JOBLOGTIME ] &JOBLOGMSG >> &LOGFILENAME
-RUN
-* Enable the below for testing. This will allow the test job to exist for 2 minutes so you can verify logging.
-*-DOS ping 1.1.1.1 -n 1 -w 120000 > nul
-*-RUN
My_long_running_program.fex
... Long running step ...
-SET &JOBLOGMSG = 'Hit Setp 1';
-MRNOEDIT -INCLUDE JOBLOG
-RUN
... Long running step ...
I left it to the user to determine if they want to write out &LINES, &ERROR, or &RECORDS to the log.
- ABT
------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM
------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro