Being able to run sequences of LINC reports against test data allows more complete development and testing on the workstation before production deployment. LDA III does not provide a mechanism to initiate a sequence of reports in batch mode. IEG’s REPRUN reads records from a "batch" file and initiates LINC Reports or operating system commands.
The format of the "batch file" is:
| Record | Description |
|---|---|
| 1 | Begin Job <Jobname>;[Debug] |
| 2 | <Path to LINC executables> (where LINCRPT.EXE resides). The ending "\" is not required. |
| 3 | <Path to LINC.INI> |
| 4 | <Business Segment name in the LINC repository> |
| 5 | <Trace file name> |
| 6-n | [START] <Report name> or *<task> or ">"<task> (one line per Report or task) |
| n+1 | END JOB. (With the period) or END JOB! |
The batch file (a "Job") is a free-format text file with no word processing formatting applied such as highlighting, etc. A percent sign (%) indicates that the rest of the line is purely comments.
Although records 1 through 5 and ‘n+1’ are required, records 1, 2, 3 and 5 can be blank or comments only.
If record 1 has "Debug" following the semi-colon (;) with no intervening space, then a message will pop up before processing each line allowing you to continue ("OK") or abort ("Cancel") the job.
If record 2 is blank or only comments, LINCRPT.EXE must be in the same directory as REPRUN.
If record 3 is blank or only comments, the LINC.INI file must be in the same directory as REPRUN.
If record 4 begins with a "-b ", all LINC reports will begin running in debug mode. Other LDA run time options can be placed here as well as long as they are all separated with a space.
If record 5 is blank or only comments, no message file will be created.
If the first non-space character of records 6 through n is an asterisk (*), the rest of the line (up to a % sign) is passed literally to the operating system as a command. Use the same conventions as if calling for "File...Run" from the menu bar of Windows’ Program manager or File Manager. If the first non-space character of records 6 through n is a greater than symbol (>), the rest of the line is appended to "command.com /c " and then passed to the operating system. If the first word on the line (before the *, > or report name) is "START", then the task is processed asynchronously and REPRUN continues immediately with the next line. For example:
*COMMAND.COM /C DEL C:\REP\*.TMP % Get rid of temporary files
> COPY C:\REP\*.* C:\REPBAK\ % Do the backup
START *sol.exe % play some solitaire AND
*winmine.exe % windows mine game at the same time
% ******************** Say good-bye and go home ******************
The "END JOB." statement may optionally be followed by the name of another Job to "Chain" to. The name must begin immediately after the "." of "END JOB." If "END JOB" is all in capital letters, a Job summary will be printed; otherwise, no summary will be printed. If "END JOB" is punctuated by a "!", then REPRUN will go to end of job itself after processing the last task.
REPRUN looks for the Job to be in the same directory as itself. REPRUN can be initiated with a Job name in its command line. In this case, REPRUN will look for the specified Job instead of "JOB.BAT." The specified Job can include a path. If the specified Job name is terminated with "!", REPRUN will not ask for permission to begin and will not display job progress; otherwise, you will be given the opportunity to cancel the job.
REPRUN shows a log of activities on the screen. The title bar shows the name of the currently processing Job. The text area shows entries from the Job file. The currently executing Report or Task is highlighted. Under each line having a Report name or Task is the current disposition of the task which can be: 1) "waiting prior task," 2) an error message, 3) a task number assigned by Windows and initiation time/date. A job summary is always saved in the same directory as the batch file with the name <ddhhmmss>.SUM, where dd is the day of the month and hhmmss is the time of day on a 24 hour clock.