Call External Program

jde_uk

Active Member
Hi all,
I am trying to cal an external SQL file from a UBE and am using the BSFN to call the external program and am successful in doing that, through a batch file.
now, the UBE that I have developed has a Processing Option attached to it and is suppose to carry the parameters passed from the PO and then run the Bath file which in turn calls the SQL file and PL/SQL command.
Could you write about a way to pass parameters to te Batch Fiel from the Processing Option and the the same parameters to the SQL and then Procedure and further. If this is not possible then is there a way to do this.........!!!!!
 
I'm assuming you're calling a .bat file that is running some program.

You could instead call a Windows Script Host/VBScript program and pass parameters. There are many examples of this process found on the web. If you email me I'd be glad to send you an example.

The more in-depth option (but much more robust) would be to create an executable using C++, VB, etc.

- Scott
 
I am assuming you are using B34A1030 (Execute External Program) to call your batch file. If you have written your batch file to accept parameters, couldn't you format the command line passed to the BSFN to include the necessary parameters? I don't know much about running .sql files or pl/sql commands, so I have no suggestions there.
 
Hi,
Thanks for the mail, yes I am calling an SQL Procedure through an sql file
from that Batch file and thats where I need to carry the Parameters .
I would be grateful if you could send me some examples as that will be great
help. As of now the, stuff is working but, I would like it to be with non
.bat file as well.
Take Care
Tipu







You could instead call a Windows Script Host/VBScript program and pass
parameters. There are many examples of this process found on the web. If
you email me I'd be glad to send you an example.

The more in-depth option (but much more robust) would be to create an
executable using C++, VB, etc.

- Scott


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
 
Hi,
Thanks for the mail, I am using the BSFN to call a Batch file and am passing
the parameters thru the command line. This batch file in turns call an .sql
file which is then executing a Procedure.
Paramters have to be carried all along to the Procedure and then used there.
I think I have got a way to do that now. Thanks a lot for the mail and the
very best to you.
Take Care
Tipu








_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
 
hi, thanks for that, i am using the BSFN to call te external prog which is an sql file which inturn calls and sql procedure, parameter has to travel from the JDE to the procedure through various file.
 
i would be glad to use your suggestion for my application, please send me the examples and i will try to use them. as of now i am able to run the .bat file which is calling a sql file to execute a sql prcodure, things now seems to be working but a more robutst solution will always be a better thing.
 
It sounds as though your .bat file is working fine, but this might give you a few more options.

Here's the "argument" portion of the script I've attached.

Set oArgs = WScript.Arguments
sFile = oArgs.Item(0)
sStringToGrab = oArgs.Item(1)
sDelimiter = oArgs.Item(2)

I renamed the attachment as "loggrab.txt" since many email programs block .vbs files. Rename the file with a .vbs extension to use it.

Good luck.

- Scott
 

Attachments

  • 49172-loggrab.txt
    1.8 KB · Views: 160
Hi,
Thanks for that attachment, I am now in a position to use the Batch file-->SQLfile-->procedure-->Views to run the application with parameters, but, I will be using your solutions also in the others as this way of doing things also looks very very interesting.Thanks again.
 
Back
Top