Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
MS script error
 Login/Join
 
Platinum Member
posted
I'm trying to run an MS script from a Webfocus fex, and I'm running into an error. My code is this:

FILEDEF TEST DISK \\SHAREDDRIVE\FILE\TEST.BAT
CMD TEST.BAT

I keep getting the error:
'TEST.BAT' is not recognized as an internal or external command,
operable program or batch file.

Does anybody know how I can fix this? Thanks!


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Virtuoso
posted Hide Post
I would think you just need to say
CMD TEST


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Master
posted Hide Post
Either of these should work

DOS \\SHAREDDRIVE\FILE\TEST.BAT
or
CMD \\SHAREDDRIVE\FILE\TEST.BAT




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
When I do the .BAT file, it gives me an error for every word in my file. For example, the first word in my .BAT file is 'Option', and it gives me this error:

'Option' is not recognized as an internal or external command,
operable program or batch file.

When I change the .BAT file to a .VBS file, it just runs and runs and runs and doesn't produce. Any clues?


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
What's in your bat file?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Just a MS VB script. Starts like this:

Option Explicit

Dim objAccess
Dim strPath
Dim strQuery


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Expert
posted Hide Post
Doesn't this have to be compiled?

This is not Windows Command syntax. Could you tell me how you would run this normally, without WebFOCUS.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
It appears MS VB Script is normally embedded in HTML files:

<html>
<head>
</head>
<body>

<script type="text/vbscript">
document.write("Hello from VBScript!")
</script>

</body>
</html>

Found in http://www.w3schools.com/vbscript/vbscript_howto.asp


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Normally, I would just go to my start menu in Windows, then my run prompt and then just type in the path of the script. It runs fine then.


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Platinum Member
posted Hide Post
These are all DOS errors that I'm getting. I do know that. This is weird too - when I go to Start then Run and I type:

cmd C:\scripts\test.vbs

nothing happens. However, when I type cmd, hit enter then type C:\scripts\test.vbs at the C:> prompt, it runs fine. So, how can I make the leap?


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Platinum Member
posted Hide Post
vbscript is not the same as a dos bat file. You need run it inside wsh(windows scripting host), as far as I remember.

Normally all you need to do is call it like you would a batch file because WSH is a normal part of windows, unless a resriction is in place, like when running on a server which may be why you are getting errors.

Check MSDN for the syntax for calling it from within another program, because I have never done that.


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
Expert
posted Hide Post
What are you doing in the vb script that is called from the command prompt?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I think you got it Lloyd. I got some help from the MS sight. The correct syntax for running a VB script (.vbs file) in Webfocus is:
CMD CSCRIPT.EXE \\MYFILE\MYSCRIPT.VBS

Now the problem I run into is that my VB script is referrencing MS ACCESS ActiveX objects, which the Webfocus server doesn't recognize.


Windows version 768
 
Posts: 215 | Registered: March 16, 2006Report This Post
Platinum Member
posted Hide Post
That's one problem you will ru into. WSH is very powerful and can cripple a machine if one is not careful (thats how a lot of the script kiddie virus variants get written), so alot shops resrict its usage, you should check with them with what is allowed and what isnt.

As far as the ActivX, it may not be installed on the webfocus server (WSH locally where its called from, in this case the WEBfocus server). One way around this (if allowed on your network) is to use a RPC (remote Procedure call) to a server which has access and the activex installed. I dont have syntax for this because I have not done it, but it is possible.

Please note this may or may not work dependant on the resriictions on your network, some allow RPC on Intra-connected (local network) machines some do not. Almost all will restrict inter-connected (over the internet) machines.


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
 
Posts: 157 | Location: Secaucus, NJ | Registered: May 21, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders