A separate UNIX login called report is provided for running Perl reports. You must be logged as the user report or talis to run MIS reports. The basic syntax for running a Perl report is:
report -p[report_name]
The -p argument is mandatory for every report and identifies the report parameter file.
There are a number of other optional arguments, which vary according to which report is being run. The command
report -p[report_name] -h
will display a summary of all the switches which can be applied to a given report. Some common switches are shown below:
Argument |
Description |
-a |
Appends the data to the file name stated, rather than overwriting it. |
-b |
Defines the beginning of a range. Usually this will be a date or a number of days in the past. |
-e |
Defines the end of a range. Usually this will be a date or a number of days in the past. |
-h |
Will display a summary of all the switches which can be applied to a given report. |
-o |
Renames the output file to the name given. The default name is [script_name].out |
-s |
Determines where the output file will reside. The default directory should be /usr/opt/blcmp/data/mis. |
-d |
Determines which database is used. The default is prod_talis. |
-n |
This argument varies in meaning/usage from script to script, but is commonly used. Use the -h command to determine the exact use. |
-q |
This argument varies in meaning/usage from script to script. Use the -h command to determine the exact use. |
-r |
Names the report directory where the process will create its report file. If the option is not given, then the default is defined by the TAL_REP_DIR environment variable. |
-t |
This argument varies in meaning/usage from script to script. It typically defines a type of processing. For example, it might be used to specify an Overdue Letter Number (-t1,2) or Order Format (-t8x4). |
By default, both the output file and the report file are file are written to the directory /usr/opt/blcmp/data/mis. Subsequent runs of the report overwrite neither the output file nor the report file. They are preserved by the addition of a date/time suffix to the last output and report file.
To produce a file of all orders created since 1st September 2004, you would enter the command:
report -porr_order_letter -b01/09/04
This would create a file of orders in the directory /usr/opt/blcmp/data/mis called orr_order_letter.out with a corresponding report file orr_order_letter.rep.