I am looking to integrate jobs created in Data Manager with Java.
I want to execute a job from java application and vice-versa.
Thanks in advance.
-Bhanu
Data Manager jobs can be executed from the command line - if you right-click a job and choose "Execute", you can see/capture the command (just make sure you omit the -P switch which triggers the "press return to continue" pause at the end of the job). You could then get your Java routine to fire off this command.
From within a jobstream, you can use the system() function to call an executable from the command line (from within a procedure node, for example) if your java routine is compiled into an executable you can call, and/or you could add a User Defined Function to call a java function compiled and linked into a dll, then call this function from a procedure node.
Regards,
MF.
Thanks MF,
I will try this.
-Bhanu
Hi MF,
I tried to use procedure node. But it wasnt running. Could you please suggest how to call a .bat file using system() in procedure node.
Thanks,
Hi,
System('"C:\Cognos Demos\DataManager\Test.bat"');
This worked fine for me.
Regards,
MF.
Thanks MF,
Its working now. I didnt use double quotes ('c:/.../google.bat'). Thats why it was not running.
Thanks,
Hi MF,
Could you please suggest how to open a URL when the job runs on a server (Linux). I mean job has to open a URL whenever it runs. In windows I created batch file and then I called this batch file by using procedure node. How about in Linux?
Thanks,
Could you create a shell script in unix to do it, then call it in the same way as your windows batch file?
MF.
Sent from my iPad using Tapatalk HD
Thanks MF,
I tried the following code but I am getting error. Could you please help me?
GOOGLE.SH
#!/bin/bash
$ xdg-open http://www.google.com
Thanks,
Why are you using xdg-open? What are you trying to do exactly?
My requirement is to open an URL once after executing a job in Data Manager.
Thanks,
Hi MF,
While I tried to execute that script it was saying "$ command not found".
Thanks,
Quote from: bhanu.samas on 13 Jul 2012 07:58:48 AM
My requirement is to open an URL once after executing a job in Data Manager.
Do you mean you want to launch a browser window? Or do you just want to pass some variables to a webserver via HTTP GET or something?
If you want to read something from a website you could use the wget command.
I want to launch a browser window. Suppose lets say browser has to open and load with http://www.google.com. And I am using following script. But while I execute on server it was throwing error.
#!/bin/bash
$ open http://www.google.com
Could you please guide me.
This should let you launch firefox from the command line, just pass this into your System() call:
/usr/bin/firefox www.google.com &