Reputation: 49
I don't have access privileges in UNIX for Autosys to fetch the job report by executing commands. Because, when I execute autorep command it's throwing an error which is a command not found So, I tried using the GUI method where there is an Enterprise Command Line option, but over there I could fetch a job status for one job (or) box at a time and the command which I used was
autorep -j JOB1
As because I need to fetch reports for multiple jobs, it will be more time-consuming work and a lot of manual work will be involved if I follow the above-mentioned approach.
And my query is, What I need to do to fetch the job report for multiple jobs (or) boxes at the same time? Because I tried using the below commands which are
autorep -j JOB1, JOB2
autorep -j JOB1 JOB2
autorep -j JOB1 & autorep -j JOB2
But, nothing didn't work so, can anyone please tell the solution of it?
Upvotes: 0
Views: 15660
Reputation: 1
You can do this using for loop like below:
-bash-5.0$ for i in job1 job2; do autorep -j $i; done
You will get status of all the jobs which are in loop.
job1
05/03/2024 05:12:27 ----- RU 24980619/1
job2
05/03/2024 03:35:13 05/03/2024 03:37:33 SU 24979755/1 0
Upvotes: 0
Reputation: 33
you can do that using in 3 ways :
Use WCC ( GUI ) " Quick View" and search jobs by giving a comma . i.e job1,job2,job3,......job-n . This will give you the status of all jobs you need over there but it wont give you a report as such ( copy and paste in bulk and filter out in excel ).
If you need report of those jobs then I would do like this : Autosys version - 11.3.6 SP8. write a script as follows : report.bat
echo off cls set mydir="user directory, complete path" set input_dir=D:\test\scripts\test for /f "tokens=1 delims=|" %%A in (%input_dir%\test_jobs.txt) do (autorep -j -w -10 %%A | findstr -V "^$ Job Name ______" )
test_jobs.txt:
job1 job2 job3 . . job-n
above will give the result of jobs as expected, If you want to save the output in a text file and view it use ">" at the end and export the same to a text file .
Note: 1 Use Autosys command line instead of server command line if you prefer script ( search for command line) .
Hope it helps !
Upvotes: 1
Reputation: 828
To enable access to Autosys from linux, you would need to install the Autosys binary and configure a few variables.
From GUI, just to help out with a few queries:
autorep -J ALL -s
Returns the current job status report of all the jobs in the particular instance.
autorep -j APP_ID-APP_NAME* -s
You can use globbing patterns unlike in linux.
autorep -M Machine-Name -s
Returns the current job status report of all the jobs in the particular machine/host/server.
Refer more at AUTOSYS WORKLOAD AUTOMATION 12.0.01
Upvotes: 1