DelayedStart.prl
Description
Repetitively reruns an interface when it reaches a stable point and can be restarted.
Command Syntax
Parameters (Required)
| <job_name> |
The job name that you wish to force a start. |
| <mail_alias> |
Allows you to receive email if the job fails. |
Return Codes
| 0 |
Job force started correctly. |
| 1 |
Job failed to start correctly. |
| 2 |
Invalid number of arguments. Check the syntax of the command string. |
Error Messages
- Error: Invalid number of arguments
Usage: DelayedStart.prl jobname mail_alias
An invalid number of arguments was passed. Check the syntax of the command.
- Error running <filename>
Job status is <current_status>
The above job failed to start correctly and currently is in <status>.
Examples
- DelayedStart.prl zpmmrp1002 ops_user
Will constantly force start for the job named zpmmrp1002. If job fails to start, an email is sent to you.
FileWatch.prl and NTFileWatch.prl
Description
Checks for the arrival of a file (with wildcard search) until a specified termination time, instead of the AutoSys term_run_time..
Command Syntax
UNIX - FileWatch.prl <File> <Time> [<optional parameters>]
Windows - NTFileWatch.prl <File> <Time> [<optional parameters>]
Parameters (Required)
|
<File>
|
Name of the file to watch for (wildcarding such as *.txt, fi*.* or * can be used)
|
|
<Time>
|
Termination time.
|
Parameters (Optional)
|
<sleep seconds>
|
Specify search interval in seconds.
|
Return Codes
|
0
|
The selected file was found.
|
|
1
|
The selected file was not found.
|
|
2
|
Invalid number of arguments. Make sure the syntax of the command is correct.
|
Error Messages
- Invalid number of arguments.
Usage: Filewatch.prl file time Sleep_Seconds (optional)
Please check to make sure that the number of arguments is correct.
- Warning: Could NOT open <path> for Read.
The directory could not be opened. Verify that read permissions are available for this directory.
- Time has expired...shutting down
The desired time has passed and the file was not found.
Examples
- Filewatch.prl file.txt 12:00 120
UNIX - Will search for file.txt, until 12:00pm and search for the file every 120 seconds.
- NTFilewatch.prl*.txt 08:00 60
Windows - Will watch for the arrival of any file with a ".txt" extension, until 8:00am, and search for a file every 60 seconds.
FTPDel.prl
Description
Issues a delete command within FTP to a file and wraps error checking into the routine, printing a report if there are any errors during the deletes.
Command Syntax
FTPDel.prl <host> <id> <disk> <password> <hostfile>
Parameters (Required)
|
<host>
|
The host machine that you want the file deleted from.
|
|
<id>
|
The id that will be used to connect to the host machine.
|
|
<disk>
|
The location of the file on the host machine. |
| <password> |
The password for the id used to login to the host machine. |
|
<hostfile>
|
The file that you wish to delete.
|
Return Codes
|
0
|
The ftp delete of the specified file completed successfully.
|
|
1
|
Invalid number of arguments passed. Check the syntax of the command.
|
|
3
|
Error during ftp command. Could be a permissions problem or file doesn't exist.
|
Error Messages
- Error: invalid number of arguments passed
Usage: FTPDel.prl host id disk password hostfile
There was an error in the syntax of the command. Make sure the correct number of arguments was passed.
- Error: while processing ftp_cmd
There was an error during the ftp routine. Either you do not have sufficient rights, or the file does not exist in the specified location.
Examples
FTPDel.prl Prod user1 /usr pass report.txt
This will delete the file report.txt from the Prod server in the directory /usr using FTP with username user1 and password pass. Any errors in the process will be printed on a report.
FTPGet.prl
Description
Issues a get command within FTP to a file and wraps error checking into the routine, printing a report if there are any errors during the get.
Command Syntax
FTPGet.prl <host> <id> <disk> <password> <hostfile> <unixfile>
Parameters (Required)
|
<host>
|
The host machine where the desired file resides.
|
|
<id>
|
The id that will be used to connect to the host machine.
|
| <disk> |
The location of the file on the host machine. |
| <password> |
The password for the id used to login to the host machine. |
| <hostfile> |
The file that you wish to retrieve. |
|
<unixfile>
|
The filename of the file once it's on the Unix side.
|
Return Codes
|
0
|
The ftp get of the file desired completed successfully.
|
|
1
|
Invalid number of arguments passed. Check the syntax of the command.
|
|
3
|
Error during ftp command. Could be permissions problem.
|
Error Messages
- Error: invalid number of arguments passed
Usage: FTPGetl.prl host id disk password hostfile
There was an error in the syntax of the command. Make sure the correct number of arguments was passed.
- Error: while processing ftp_cmd
There was an error during the ftp routine. The specified user may not have sufficient rights.
Examples
- FTPGet.prl Prod user1 /usr pass report.txt report1.txt
This will retrieve the file report.txt from the server named Prod in a directory /usr using FTP with username user1 and password pass. Once it's retrieved from the server, the file will be renamed report1.txt. Any errors in the process will return a report to you.
FTPMput.prl
Description
Issues a Mput command within FTP to a group of files with error checking and reporting. This tool allows for the transfer of an entire directory.
Command Syntax
FTPMput.prl <sleep seconds> <host> <id> <password> <disk> <source directory/Filename> [<Optional Parameter>]
Parameters (Required)
|
<sleep seconds>
|
Specifies the search interval in seconds.
|
|
<Host>
|
Machine name where the file will be uploaded.
|
|
<id>
|
Your login ID. |
| <Password> |
The password for accessing the remote host. |
| <disk> |
The drive where the file is kept. |
|
<source directory/filename>
|
The directory location and name of the upload file.
|
Parameters (Optional)
|
<Backupdir>
|
The location of a backup directory.
|
Return Codes
|
0
|
The transfer was completed successfully or there are currently no files to ftp.
|
|
1
|
Invalid number of arguments.
|
|
3
|
An error occurred when processing an FTP command. |
| 5 |
An error occurred when transferring the file. |
|
7
|
No wildcards were found.
|
Error Messages
- Transfer Complete/Successfully
The FTP transfer was completed successfully.
- No files to ftp at this time.
There are currently no files to upload.
- Error: invalid number of arguments passed.
Please check to make sure that the number of arguments is correct.
- Error: while processing an FTP command
An error occurred while running an FTP command.
- Error: $move_cmd
An error occurred while running the move command.
- Warning: no wildcards found!
No files match the specified wildcard parameter.
Examples
- FTMPut.prl - 60 Target Admin Administrator c: c:\test* d:\backup
Connects with the machine named Target using the user name "Admin" and its password "Administrator". It then searches the local c: drive for any files beginning with "test," uploads those files to Target's c: directory and archives them into the local d:\backup directory. The system sleeps for 60 seconds between each search.
- FTMPut.prl - 60 Target Admin Administrator /tmp /tmp/test* /backup
Connects with the machine named Target using the user name "Admin" and its password "Administrator". It then searches the local Unix /tmp drive for any files beginning with "test," uploads those files to Target's /tmp directory and archives them into the local Unix /backup directory. The system sleeps for 60 seconds between each search.
FTPPut.prl
Description
Issues a put command within FTP to a file with error checking and reporting.
Command Syntax
IFTPPut.prl <host> <id> <disk> <password> <unix file name> <host file>
Parameters (Required)
|
<Host>
|
Machine name where the file will be uploaded.
|
| <id> |
Your login ID. |
| <Disk> |
The drive where the file is kept. |
| <Password> |
The password for accessing the remote host. |
| <Unix Filename> |
The file name of the downloaded FTP file. |
|
<Host file>
|
The name of the file on the target machine.
|
Return Codes
|
0
|
The upload was completed successfully.
|
|
1
|
Invalid number of arguments.
|
|
3
|
Error occurred while processing an FTP command.
|
Error Messages
- Transfer Complete/Successfully
The FTP transfer was completed successfully.
- Error: invalid number of arguments passed.
Please check to make sure that the number of arguments is correct.
- Error: while processing an FTP command
An error occurred while running an FTP command.
Examples
- IFTPGet.prl Target Admin d:\ pswd /tmp/input.ftp output.ftp
Connects with the remote machine named Target and accesses the output.ftp file in Target's d: drive using the password pswd. Transfers ftp file to the UNIX server/system (/tmp directory) and names the file "input.ftp".
HeaderWatch.prl
Description
Checks the name of a file header until it changes or a shutdown time is specified. Useful in checking to see if a filename has changed within a specified time.
Command Syntax
HeaderWatch.prl <filename> <string> <target shutdown time> [<optional parameters>]
Parameters (Required)
|
<filename>
|
The name of the file with the desired header string.
|
|
<string>
|
Specifies the header string that you wish to watch.
|
|
<target shutdown time>
|
The desired shutdown time.
|
Parameters (Optional)
|
<sleep seconds>
|
Specifies the search interval in seconds.
|
Return Codes
|
0
|
The header containing the specified string was found.
|
|
1
|
Time has expired. The shut down time is given in seconds.
|
|
2
|
Invalid number of arguments.
|
Error Messages
- String was Found.
The header containing the specified string has been located.
- Time has expired..Shutting down /n
The search time has expired and the search process will shut down in n seconds.
- Error: invalid number of arguments passed.
Please verify that the number of arguments is correct.
- Time already expired - assume the present file will wait 1 minute.
The search time has expired and the search process will wait 1 minute before shutting down.
Examples
- HeaderWatch.prl c:\output.jil test 13:00 60
Searches the output.jil file in the c: directory for the "test" string in the header. The process will shut down at 1pm and each search will restart after 60 seconds of sleep time.
- HeaderWatch.prl /tmp/output.jil test 13:00 60
Searches the output.jil file in the /tmp directory for the "test" string in the header. The process will shut down at 1pm and each search will restart after 60 seconds of sleep time.
ISQL.prl
Description
Simulates SQL, but gives better error reporting and can automate the SQL process.
Command Syntax
ISQL.prl <Entire ISQL statement>
Parameters (Required)
|
<Entire ISQL Statement>
|
The entire ISQL statement.
|
Return Codes
|
0
|
ISQL was successfully simulated.
|
|
2
|
Shows the ISQL statement is in use.
|
|
> 8
|
An ISQL error/command.
|
Error Messages
- Completed
The simulation was successful.
- Usage: ISQL.prl ISQL Statement
Verifies that the ISQL statement that was sent.
Examples
- ISQL.prl c:\input
Simulates the ISQL command of c:/input.
- ISQL.prl /tmp/input
Simutlates the ISQL command of /tmp/input.
Rcp.prl
Description
Copies (rcp) files from one directory to another on a remote machine. Wraps the rcp command with error checking to make sure the program exits properly and prints a report if errors occur.
Command Syntax
Rcp.prl <Full Directory path or file> <MACHINE>:<directory> <MACHINE>:<directory> <MACHINE>:<directory>
Parameters (Required)
|
<Full Directory path or File>
|
The path of the directory or file to be transferred to multiple locations on multiple machines.
|
|
<MACHINE>
|
Each of the servers the script will attempt to transfer the file(s) to.
|
|
<directory>
|
The directory for the <MACHINE> that specifies where the file(s) should be placed.
|
Return Codes
|
0
|
This script successfully sent the files to the multiple speicifed locations.
|
|
1
|
Invalid Number of Arguments.
|
|
3
|
Invalid destination specified. |
|
5
|
Remote copied failed.
|
Error Messages
- Error: invalid number of arguments passed.
Look at the command syntax to verify that all of the arguments were passed correctly.
- Error: Invalid Destination parameter.
One of the destinations that was selected had incorrect syntax.
- Error during rcp of files.
This message will appear with the destination of the problematic file.
Examples
- Rcp.prl C:\temp\ SAL 23:/tmp/out/ PRD_FIN_6:/tmp/out/
Sends all the files in the C:\temp\ directory to the server SAL 23, the directory /tmp/out/, the server PRD_FIN_6 and the directory /tmp/out/.
ResetJils.prl
Description
Resets all JIL to INACTIVE. Also verifies that a job is not ON_ICE. If ON_ICE, the program asks if you would still like to place job ON_ ICE.
Command Syntax
ResetJils.prl <Server> <DataBase Server> <File> [<optional parameters>]
Parameters (Required)
|
<Server>
|
The machine that you are logged into that has an AutoSys Client installed.
|
|
<DataBase Server>
|
The machine that has the AutoSys database installed.
|
|
<File>
|
The full path of the file that contains the status of each job before resetting to INACTIVE.
|
Parameters (Optional)
|
<Job Name Pattern>
|
Using the AutoSys wildcard, the script will only select the jobs that match the name pattern to place INACTIVE.
|
Return Codes
|
0
|
The jobs in AutoSys were all set to INACTIVE and the previous job STATUS was saved in <FILE>.
|
|
1
|
Invalid Number of Arguments.
|
|
3
|
Not Authorized to perform this task.
|
| 5 |
Host Machine is Invalid. |
| 7 |
Source File Does not exist. |
|
9
|
Error while running SQL step.
|
Error Messages
- Error: invalid number of arguments passed.
Check the command syntax to verify that all of the arguments were passed correctly.
- Error: Only autoedit can perform this routine!
Autoedit is the only user authorized to run this script.
- Warning: hostname is Invalid!
This server does not have AutoSys installed, please run this script on an AutoSys client or server machine.
- Error: source File doesn't exist.
The output file could not be opened or does not exist.
- Error: while performing sql on server.
There was a problem performing the select statement from the Database, please ensure all authorities are correct.
Examples
- ResetJils.prl MACHINE DbMACHINE C:\output.txt
MACHINE is the server you are running the script from. The DbMachine is where the AutoSys DataBase resides. All the jobs are set to INACTIVE and the previous status of all jobs is saved to C:\output.txt.
- ResetJils.prl MACHINE DbMACHINE C:\output.txt IA%
MACHINE is the server you are running the script from. The DbMachine is where the AutoSys DataBase resides. All the jobs whose names begin with IA are set to INACTIVE and the previous status of all these jobs is saved to C:\output.txt.
Sname.prl
Description
Substitutes a given string within a file name. Renames the old file with an .old extension if desired.
Command Syntax
Sname.prl <File> <Old String> <New String>
Parameters (Required)
|
<File>
|
The full path of the file affected by the string substitution.
|
|
<Old String>
|
The old string to be replaced in the <File>.
|
|
<New String>
|
The new string to replace the <Old String> in <File>.
|
Return Codes
|
0
|
This script successfully sent the message that you listed in the input file.
|
|
1
|
Invalid number of arguments.
|
|
3
|
The file does not exist or cannot be written to.
|
Error Messages
- ERROR: invalid number of arguments passed.
Check the command syntax to verify that all of the arguments were passed correctly.
- <File> does not exist or can't be written to, please check.
The File cannot be written to or does not exist. Please check the file permissions.
Examples
- Sname.prl C:\data.txt receivable received
Changes the string receivable to received in the file C:\data.txt.
- Sname.prl /tmp/data.txt receivable received
Changes the string receivable to received in the file /tmp/data.txt.
TimedRun.prl
Description
Cleanly shutsdown processes at a specific time. If process ends early, it assumes there is a problem and provides an exit code in an error report.
Command Syntax
TimeRun.prl <Timeout Setting> <Command>
Parameters (Required)
|
<Timeout Setting>
|
The time, in hours:minutes format, before which the command should not complete.
|
|
<Command>
|
The command to execute.
|
Return Codes