Focal Point
[CLOSED] Calling a .bat from my Focexec

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/44610686

April 02, 2009, 05:41 PM
Jason K.
[CLOSED] Calling a .bat from my Focexec
I've been at this off and on all afternoon. We're trying to call a windows .bat file from a .fex.

When we run the .fex from developer studio, it just sort of sits there with an open window. Doesn't do anything on either machine. The .bat file runs just great when we run it manually.


We've tried
CMD \\SVR99WFRS\G\My.bat
RUN

Then we tried
-SET &ECHO=ALL;
-SET &SYS_CMD = 'G:\My.bat';
-SET &RETCODE = SYSTEM(&SYS_CMD.LENGTH,'&SYS_CMD.EVAL','D4');

Doesn't work either way. We've tried all manner of different things, the two shown above are all I recall though.

This has to be simpler than how we're going at it. Ideas?

This message has been edited. Last edited by: Kerry,


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
April 02, 2009, 07:54 PM
Waz
Have you tried

! batfile.bat
or
DOS batfile.bat

I believe there are security settings that can stop an OS call, you may need to check on them as well.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 03, 2009, 10:38 AM
Ron R
We use the CMD method to call batch files in couple of our webfocus programs and it works for us. I would check to make sure that you can run the command you are using from your webfocus report server (from a command prompt). If it works from there it should work from within the fex.
April 03, 2009, 10:50 AM
GamP
I have tried to do this and found that if the bat file is doing something that has no bearing on the other server, all goes fine. But as soon as it tries to do something on the other server, even if it just a dir, I get no output and the process just hangs there forever. The point is that the contents of the bat file is transported to my webfocus server machine and run there. And apparently this does not produce the desired results if it has business to do on the linked server.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988