kill autosys job using Talend - talend

i want to kill a autosys job using Talend tSystem component with 'sendevent' command.
the command is : sendevent -E KILLJOB -j
but i got error : sendevent : command not found
any help on this..

you might find this link useful

Related

AUTOSYS: Command to fetch job status for multiple jobs at the same time

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?
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
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 .
If you access to IDash Tool then login to IDash and generate a report in reports section based on your requirement . (Easy to use and many report formats are available to download )
Note: 1 Use Autosys command line instead of server command line if you prefer script ( search for command line) .
Hope it helps !

Informatica windows job scheduling

need help :
informatica is installed on windows ,
so pmcmd will not work to schedule informatica workflow,
n e patch or utility to schedule informatica workflow (on windows) through unix(pmcmd).
any other solution to schedule informatica workflow (on windows). ??
Please Google for the error you have: " no gateway connectivity is provided for domain". And to resolve the issue, add the environment variable INFA_DOMAINS_FILE.
More can be found for example on: this page
We can run pmcmd command from windows command line.In command line mode we have to give every bit of information like (domain name,integration service name,username and passwords in each command.Below is the syntax
pmcmd startworkflow -sv Myintservice -d Mydomain -u username -p password -f foldername workflowname
Please lookup the help of pmcmd command just to make sure if I have misstated anything.

unable to take user input in perl

I am having a strange issue. I have written a script which is basically running a perl script in remote server using ssh.
This script is working fine but after completion of the above operation it will ask user to choose the next operation.
it is showing the options in the command prompt but while I am giving any input it is not showing in the screen even after hitting enter also it remain same.
I am not getting what is the exact issue, but it seems there is some issue with the ssh command because if I am commenting out the ssh command it is working fine.
OPERATION:
print "1: run the script in remote server \n2: Exit\n\nEnter your choice:";
my $input=<STDIN>;
chomp($input);
..........
sub run_script()
{
my $com="sshg3.exe server -q --user=user --password=pass -exec script >/dev/null";
system("$com");
goto OPERATION;
}
after completing this ssh script it is showing in screen:
1: run remote script
2: exit
Enter your choice:
but while I am giving any input it is not displaying in the screen until and unless I am exiting it using crtl C.
Please can anyone help what might be the issue here ?
One of the classic gotchas with ssh is this - that it normally runs interactively, and as such will attach STDIN by default.
This can result in STDIN being consumed by ssh rather than your script.
Try it with ssh -n instead.
You can redirect the output in command prompt if -n option is not available for you.
try this one it might work for you.
system("$com />null");
As per https://support.ssh.com/manuals/client-user/62/sshg3.html there is an option for redirecting input use --dev-null (*nix) or --null (Windows).
-n, --dev-null (Unix), -n, --null (Windows)
Redirects input from /dev/null (Unix) and from NUL (Windows).

Scala Process Terminal Output

I'm using the Scala (2.10.3) Process object to run commands. The docs show me how to run a command and then capture the standard output, but I'm running s3cmd and want to see upload progresses. How can I capture the output as if the command were running in a terminal?
Solution:
"s3cmd sync --recursive --delete-removed --progress local/ s3://remote" ! ProcessLogger(line => log.info(line))
Line at a time:
http://www.scala-lang.org/api/2.10.3/#scala.sys.process.ProcessLogger
for vanilla stdout
https://github.com/s3tools/s3cmd/blob/master/S3/Progress.py

Permission denied (publickey,keyboard-interactive)

Permission denied (publickey,keyboard-interactive) got this error while i am trying to cvs checkout from perl.
what is issue and how to reslove this ?
Code :
system ( "CSVROOT:--- CVSRSH:--- cvs co a ");
# i have proper value in cvs root and cvs rsh .
its running alone and using ssh key
Steps to diagnose the error:
Are you using an SSH key?
Does that key have a passphrase?
Does it work when you run it by hand?
Is the script running as the same user as when you run it by hand?
Is the script running under the same environment as when you run it by hand? (e.g. cron jobs do not run under the same environment)
If you think all of the answers are yes, then most likely the last answer is really no. If the script is running from a scheduler like cron it most likely does not run with the same environment as when you run it by hand. The way I normally solve this is to use a shell script between the scheduler and the Perl script:
#!/bin/bash
source /home/USERNAME/.profile
#set any other environment variables it needs like
export CSVROOT=:pserver:USERNAME#HOST:/path/to/repo
export CVSRSH=ssh
/path/to/perl/script/script.pl
Follow-up investigations after Chas.'s questions:
Does that command normally run under /bin/sh or some other shell?
To test, execute /bin/sh command to start Bourne shell and try the command by hand again.
I'm not familiar with "CVSROOT:---" notation - is that meant to set CVSROOT environmental variable? In Bourne shell it's usually done using "=", never saw ":" used.
Does the command, when run by hand, expect some input from you? I never saw cvs co to do so, but I don't use it with ssh.
Try to add a redirect to the end of the command and look what's in the file after running:
system ( "CSVROOT:--- CVSRSH:--- cvs co a > /tmp/log_cmd 2>&1");