AddPageBreak.prl
Description
Formats the output file with page breaks for easy printing and viewing.
Command Syntax
AddPageBreak.prl <Input File> <Output File> <Line Number>
Parameters (Required)
|
<Input File>
|
The full path name to the input file.
|
|
<Output File>
|
The full path name to the output file.
|
|
<Line Number>
|
Specifies the line number where the script will add a page break. For example if <Line Number> value is 33, the script will add a page break every 33 lines.
|
Return Codes
|
0
|
The script was able to add the appropiate page breakes per specified number of lines.
|
|
1
|
Invalid Number of Arguments.
|
|
3
|
The input files does not exist.
|
Error Messages
- ERROR: invalid number of arguments passed.
Look at the command syntax to verify all arguments were passed correctly.
- File <Input File> does not exist.
The input file does not exist, so please check to make sure it exists.
Examples
- AddPageBreak.prl C:\temp\input.txt D:\output.txt 33
Creates the D:\output.txt file from the C:\temp\input.txt file after adding page breaks every 33 lines.
- AddPageBreak.prl /tmp/input /tmp/output 33
Creates the /tmp/output file from the /tmp/input file after adding page breaks every 33 lines.
Download this Script
BulkStoredProc.prl
Description
Submits a file with Stored Procedures stored on it to the StoredProc.prl script.
Command Syntax
BulkSordProc.prl <Sybase Server> <Sybase User> <Sybase Password> <Sybase DB> <Stored Proc> <Parameter file>
Parameters (Required)
|
<Sybase Server>
|
The Sybase Server that the user desires to read parameters from.
|
|
<Sybase User>
|
The Sybase User that will connect to the Sybase Database to run a procedure.
|
| <Sybase Password> |
The password required to connect to the
Sybase database with the Sybase user.
|
| <Sybase DB> |
The Sybase database that the user wishes to connect to. |
| <Stored Proc> |
The stored procedure to add parameters to. |
|
<Parameter file>
|
The parameter file that is read and to added to StoredProc.prl.
|
Return Codes
|
0
|
The procedure completed successfully.
|
|
1
|
Invalid number of arguments passed. Check syntax of script.
|
| 3 |
Parameter file referenced does not exist. Check location of file. |
|
5
|
Error was encountered during process of updating StoredProc.syprl
|
Error Messages
- Error: Invalid number of arguments passed
Usage: BulkStoredProc.prl Server User Password Database Stored_Proc Parameter_filename
There was something wrong with syntax of the command. Make sure the correct number of arguments was passed.
- Error: <file> File does not exist
The specified parameter file does not exit. Check the location of the file to be sure it actually exists in the specified location
- Error while running <program>
An error occurred during the process of updating StoredProc.syprl. Check the Sybase User and password to be sure they were correct.
Examples
- BulkStoredProc.prl Prod Autosys Preekdsk Syb3 proced param.txt
Adds parameters from flat file named param.txt, to stored procedure named proced, using user name Autosys, with password Preekdsk, within database Syb3, on Sybase server Prod.
Download this Script
JobAlarms.syprl
Description
Prints status of jobs and job names.
Command Syntax
JobAlarms.syprl <Server> <User> <Password> <Database> <Alarm State>
Parameters (Required)
|
<Server>
|
The name of the server you desire to report alarms on.
|
|
<User>
|
The user name with the valid access rights.
|
| <Password> |
The password associated with the user name. |
| <Database> |
The name of the database which you wish to report alarms on. |
|
<Alarm State>
|
Specify the alarm status you wish to show.
|
Return Codes
|
0
|
The report has completed successfully.
|
|
2
|
Invalid number of arguments.
|
|
4
|
Invalid alarm status specified.
|
Error Messages
- Process Complete
The reporting process is now complete.
- Error: Invalid number of arguments passed
Please check to make sure that the number of arguments is correct.
- Alarm State is an invalid state type
Please check to make sure that the specified alarm state is valid.
Examples
- JobAlarms.syprl Test Admin Administrator Resource Duplicate_event
Logs into the Test server with the user name "Admin" and the password "Administrator." Reports on all the events within the Resource database that has a "Duplicate_event" alarm status.
Download this Script
JobCalc.syprl
Description
This syprl script gives the total number of jobs in the database (does not include boxes as jobs). Can also be broken down to the number of jobs that are in any given state (i.e. running, inactive, activated, failure, success, etc.). This is very useful in report format to balance the workload in a production environment.
Command Syntax
JobCalc.syprl <Server> <User> <Password> <Database> <Output file> [<optional parameters>]
Parameters (Required)
|
<Server>
|
The name of the server where you desire to report the number of jobs.
|
|
<User>
|
The user name with the valid access rights.
|
| <Password> |
The password associated with the user name. |
| <Database> |
The name of the database where you desire to report the number of jobs. |
|
<Output File>
|
Name and location of report.
|
Parameters (Optional)
|
<Group Designation>
|
The group you wish to calculate.
|
Return Codes
|
0
|
Process Complete.
|
|
1
|
Invalid number of arguments.
|
|
3
|
Error occurred during renaming process.
|
Error Messages
- Process Complete
The calculation process is completed successfully.
- Error: invalid number of arguments passed
Please check to make sure that the number of arguments is correct.
- Error: during renaming
An error occurred during the renaming process.
Examples
- Jobcalc.syprl Test Admin Administrator Resources c:\output Failure
Logs into the Test server with the user name "Admin" and the password "Administrator." Reports on all the jobs within the Resource database that have the status of "Failure". The report is named "output" and is located in the c:\directory.
- Jobcalc.syprl Test Admin Administrator Resources /tmp/output Failure
Logs into the Test server with the user name "Admin" and the password "Administrator." Reports on all the jobs within the Resource database that have the status of "Failure". The report is named "output" and is located in the /tmp directory.
Download this Script
MachDepends.syprl
Description
Generates the list of jobs that run on that specified machine.
Command Syntax
MachDepends.syprl <Machine> [<optional parameters>]
Parameters (Required)
|
<Machine>
|
The machine where you desire to list all the jobs.
|
Parameters (Optional)
| -I <INSTANCE> |
Specifies the AutoSys Instance name to query. |
|
-F <filepath>
|
Specifies the path and filename for the output report
|
Return Codes
|
0
|
The query generated the list of jobs which rely on a specific machine.
|
|
1
|
The script was killed while generating the Job list.
|
| 7 |
The query could not access the AutoSys INSTANCE, or the INSTANCE was not specified. |
|
9
|
The File could not be written - either the destination does not exist, or the target file already exists
|
Error Messages
- Job Terminated Prematurely
Something killed the NT/UNIX process that was gathering the list of information.
- Could not ACCESS AutoSys INSTANCE
The AutoSys INSTANCE could not be reached to submit queries. Either there is something wrong with the Database, or the INSTANCE currently has configuration problems.
- Target File could not be written too
Either the directory specified does not exist, or the File already exists.
Examples
- MachineDepends.syprl MACHINE -I PSY -F /tmp/report.txt
Creates a text report that lists all the jobs that run on MACHINE. This report will be generated from the PSY AutoSys instance and will be placed in the /tmp directory called "report.txt."
Download this Script
RunSQL.syprl
Description
Submits a file or command that generates a report from the database of the scheduler.
Command Syntax
RunSQL.syprl <Machine> <User> <Password> <DataBase> <SQL file/command> [<optional parameters>]
Parameters (Required)
|
<Machine>
|
The machine that you want the SQL commands to execute on.
|
|
<User>
|
The User name to access the SQL database.
|
| <Password> |
The Password used to access the SQL database. |
|
<DataBase>
|
The DataBase the SQL commands will query. |
|
<SQL cmd or file>
|
The actual SQL command or SQL file to be executed.
|
Parameters (Optional)
|
<filepath>
|
Specifies the specific file that the output is sent. If not selected, output will be directed to STDOUT.
|
Return Codes
|
0
|
The SQL command executed successfully, and the output was either sent to <filepath> if a path was specified, or the output is in STDOUT.
|
|
1
|
Invalid Number of Arguments.
|
|
2
|
The SQL command was not specified. |
|
> 3
|
SQL command error.
|
Error Messages
- ERROR: invalid number of arguments passed.
Look at the command syntax to verify all arguments were passed correctly.
- File <SQL File> does not exist.
The SQL file does not exist.
- File <SQL File> can not be opened.
The SQL file does not have the appropriate permissions.
- Error: while processing <SQL command>.
SQL could not perform the appropriate SQL command. More information pertaining to SQL will follow this message.
Examples
- RunSQL.syprl DEV peoplesoft testing123 PSY /tmp/report.sql
Runs the list of SQL commands in /tmp/report.sql, on DEV using peoplesoft as the user and testing123 as the password, on the database PSY. The result is output to STDOUT.
- RunSQL.syprl PSY /tmp/report.sql
/tmp/report.out
Runs the list of SQL commands in /tmp/report.sql, on DEV using peoplesoft as the user and testing123 as the password on the database PSY. The output is saved with the filename, report.out, in the /tmp directory.
Download this Script
StoredProc.syprl
Description