Page 1 of 1

JCF External Connection

Posted: Thu Nov 01, 2012 9:48 pm
by M45HY
Hi guys,

I just had a quick question. Does anybody know how an individual can setup the connection between the JCF and an executable program? I am trying to make the JCF connect to a program that converts files into a .pdf format.

Thanks
Omash

Re: JCF External Connection

Posted: Fri Nov 02, 2012 7:40 am
by murray
Hi guys,

I just had a quick question. Does anybody know how an individual can setup the connection between the JCF and an executable program? I am trying to make the JCF connect to a program that converts files into a .pdf format.

Thanks
Omash
Do you mean the Jade Command File (.JCF) that is created when you extract a schema? It can be treated as a plain text file, identified by its file extension.

Re: JCF External Connection

Posted: Tue Nov 06, 2012 7:24 pm
by M45HY
Hi Murray,

Thanks for the reply but I'm sorry; I don't think I explained my criteria correctly. I was actually referring to the Jade Job Control Manager application. Basically, I wish to create a job for the Job Control Manager to run, which I'm hoping, will execute a command via the command prompt on the server. My initial assumption was that I would have to use the Job Control Manager's External Routine option, but I'm not entirely sure how this would be obtained.

Thank you for your time and consideration,
Omash

Re: JCF External Connection

Posted: Tue Nov 06, 2012 8:03 pm
by murray
Hi Murray,

Thanks for the reply but I'm sorry; I don't think I explained my criteria correctly. I was actually referring to the Jade Job Control Manager application. Basically, I wish to create a job for the Job Control Manager to run, which I'm hoping, will execute a command via the command prompt on the server. My initial assumption was that I would have to use the Job Control Manager's External Routine option, but I'm not entirely sure how this would be obtained.

Thank you for your time and consideration,
Omash
Hi Omash,

Let me hazard a guess that you have a JET'ed LINC system and are using the Job Control Manager application for scheduling batch jobs? (If so you will probably also have applications such as JCAMgr, JCIMgr, JCMScheduler). That's what we have and the External Routine sounds familiar. From what I can recall, the External Routine does just what you require, i.e. it launches a worker process that in turn runs a Windows command shell with the command line that is passed to it. There is also "Jade Routine" which will run a Jade method in the application (JET'ted LINC) system. I can't remember more detail off the top of my head - I can get more details for you if you can confirm that my guess is correct.
Just beware that if it is the "JCF" system that I think it is, every installation has probably been customised and modified in different ways.

Anyway, to get you started, read the Jade manual (EncycloSys2.pdf) on Node::createExternalProcess(). This will be of help to you as this is what is used to run a Windows command. If you follow the references to that method in your system you may find the core of the code you are looking for.

Re: JCF External Connection

Posted: Wed Nov 07, 2012 8:53 am
by JohnP
Yes, it is the External Routine you are after. It allows you to run a .bat file or .cmd file on the database host. From memory, the External Routine also captures and logs the stdout and stderr from the external process. You may also be able to specify a command directly, without requiring a separate file. There is a documentation PDF that JCF comes with - this should be covered in that.

Re: JCF External Connection

Posted: Fri Nov 09, 2012 10:14 am
by M45HY
Hi Murray and John,

Once again, thank you for your replies and yes - you guys have hit the nail on the head! I shall look into the PDF's you guys have mentioned and hopefully I can get the job to work. I'll hopefully get it to work and let you guys know. Thank you guys so very much.

Omash

Re: JCF External Connection

Posted: Tue Dec 04, 2012 11:52 pm
by M45HY
Hi guys,

Just had a quick query, because I was so busy at work, I didn't actually get the chance to try out the External Routine method within the JCF.
Hi Omash,

Let me hazard a guess that you have a JET'ed LINC system and are using the Job Control Manager application for scheduling batch jobs? (If so you will probably also have applications such as JCAMgr, JCIMgr, JCMScheduler). That's what we have and the External Routine sounds familiar. From what I can recall, the External Routine does just what you require, i.e. it launches a worker process that in turn runs a Windows command shell with the command line that is passed to it. There is also "Jade Routine" which will run a Jade method in the application (JET'ted LINC) system. I can't remember more detail off the top of my head - I can get more details for you if you can confirm that my guess is correct.
Just beware that if it is the "JCF" system that I think it is, every installation has probably been customised and modified in different ways.
Anyway, to get you started, read the Jade manual (EncycloSys2.pdf) on Node::createExternalProcess(). This will be of help to you as this is what is used to run a Windows command. If you follow the references to that method in your system you may find the core of the code you are looking for.
I read the Jade manual (EncycloSys2.pdf) on Node::createExternalProcess(), which you mentioned, however, I noticed that this talks about creating a method, which I was hoping to avoid. That's why I've uploaded an image of the JCF manager that we use, but as Murray suggested, I don't know whether this is specific to our company's use. All that I wish to do is to go to a certain directory and run a .bat file. Can anyone suggest an example (using the image that I've provided) on how that can be done? I understand that I place the directory in the Directory row; I've tried this and then ran the routine but it didn't work.
Problem.jpg
JCF Manager
Problem.jpg (116.32 KiB) Viewed 8399 times
Thanks,
Omash

Re: JCF External Connection

Posted: Wed Dec 05, 2012 8:01 am
by murray
Hi Omash,

Your JCF system may be similar to ours...
You may probably need to put the full path to the batch file in the command line, or it may use a system default path (e.g. ...server/bin/).
In your JCF environment, do you have a JCFInterfaceSchema? if so, have a look at classes Worker and CommandProcessor.
Worker::runExternalProcess is invoked by the JCF task and executes CommandProcessor::run (well, at least it does in our system).
There should be some diagnostic logging to check what is happening (e.g. run_msg.log).
If you have access to the JCF User Manual, there is information in it about managing external routines.

Re: JCF External Connection

Posted: Wed Feb 06, 2013 3:47 am
by M45HY
Hi guys,

Sorry for the late reply and carelessness - I just got so busy tied up with some stuff at work. Shockingly, I still haven't got this to work but that's because I haven't been able to give this my full concentration. I have come up with another problem and because it's a completely different problem and is of slightly higher priority, I have given a link just in case anyone knows about it.

My problem of using SHA256 in JADE:
https://forums.jadeworld.com/viewtopic. ... A256#p6919

And I have already used this part of the forum for help:
https://forums.jadeworld.com/viewtopic. ... hilit=SHA1

Cheers guys
Omash