OASIS can automatically generate or email daily, weekly, and monthly reports. This is done using a command line and using the OASIS notification account user's email. This article will explain how to write the command line in a plain text file on macOS. CAUTION: this process should be completed by IT personnel.
To learn how to complete this process for Windows, click here.
- A Notification Account user must be created and set up with Microsoft Office 365. This is how the report will be emailed.
- The report must be saved with a unique name.
- The report must be saved as a batch report.
- The shell script must be given executable permissions.
- OASIS must be on release W542C1 or later.
- The machine running the command file must receive OASIS updates. This is done by logging into the OASIS normally on the machine.
Setting up the Report and Command File
Create and Save the Report
Any report that may be saved in the Reports application in OASIS may be run using the command line. It is best to create the report using relative dates like "This Week" or "Last Month", as the report will be able to run without any user input. For list of help articles about our reports, click here.
Once the report has been created and saved to the Reports page, it must then be created and saved as a batch report. For more information, click here.
Set Up a Batch Command File
Caution: in whatever text editor you use to create the shell script, make sure the 'Line Endings' are set to Unix line endings because Windows line endings won't work in an Unix Shell.
There are two commands required:
java -Xmx1G -jar OASIS.jar CLI=REPORTS ARGS DBKind=Sybase DBServer=10.255.10.110 DBPort=5002 DBUser=oasis DBPassword=oasis Report=Weekly_Report File=test.pdf
The first command changes the working directory to the OASIS installation directory and is required. The second command cannot be split up with a return or it will break the command and treat it as a new argument. Do not enter any other commands between these lines.
The following describes the individual components of the second command:
Bin Location. Only the memory size (-Xmx__) may be altered.
-Xmx1G -jar OASIS.jar CLI=REPORTS ARGS
DB Connection Information. The database connection parameters must be changed to match how the GUI connects to the database.
DBKind=Sybase DBServer=10.255.10.110 DBPort=5002 DBUser=oasis DBPassword=oasis
Report Name. This is the name of the report saved in OASIS. If the name of the report has spaces, replace the spaces with an underscore.
Output File Name and Type. Users can change the name of the report that is sent. This feature supports output to PDF format for individual reports when saving to a file directory. Each report will be a separate attachment on the email.
Give the File Executable Permissions
Running the command in your shell or terminal will give all users permissions to read, write, and execute your shell script:
chmod 777 filelocation/filename
You can learn more about the 'chmod' command by enter this command:
Generating Multiple Oasis Batch Reports Simultaneously
After creating OASIS Batch Report shell scripts via the steps above, you can generate multiple OASIS Batch Reports simultaneously. This can be done by calling your already created shell scripts from another shell script.
Below is an example of a shell script that calls shell scripts previously created:
Note: this shell script will require executable permissions.