Output to the Report Repository
If you are developing a new SQR that creates files that need to be posted from the process scheduler to the report repository, (report manager), here are the steps for doing this. Note this uses delivered SQCs.
getlogou.sqc can be used to post files to the report repository. There are two functions in this SQC:
get-prcsoutputdirwhich is used to get the original output destination from the
get-logoutputdir-valuewhich is used to get the process output directory from the
Both functions require a global variable,
#prcs_process_instance to be declared somewhere in your SQR. This is normally taken care of if you call
The orignal output destination is what has been entered into the process definition for the output location. This is normally
%%Log/Output Directory%%. The process output directory is the expanded application server path to the log output directory.
The log output directory contains folders that are posted to the report repository. The naming convention for these folders is:
CCLTRGEN is an SQR process. If the process instance is
1234567 then folder for this process in the log output directory would be:
This folder typically contains log files (
.out), any of the common files output by the process (e.g.
This is a typical example of how you would use the get-logoutputdir-value procedure to determine the output location for a CSV file generated by your SQR:
do Get-logoutputdir-value ! getlogou.sqc if (rtrim($prcsoutputdir,' ') <> '') move $prcsoutputdir to $CSVPath end-if
You can check the process output location using the following SQL if you know the process instance:
select PRCSOUTPUTDIR from PSPRCSPARMS where PRCSINSTANCE = '123456789'