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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     run a dos command in .fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
run a dos command in .fex
 Login/Join
 
Member
posted
I am trying to run a dos command in its own .fex file, but the .fex won't run the bat file. The bat file runs successfully when I run it from Windows Explorer.

Below is my code
-* File dos_command_test.fex
-* .fex files can run DOS commands.
-* This test is to show how to run a .bat file within a .fex file.
-* If this test works, the rma_lob_summary and two other lob reports can be renamed to add the date
-* and moved to their respective folders via a bat file that is ran in the Report Caster schedule as a
-* post procedure in the lob report's task.


-DOS C:\BBTDATA\a76362\dos_test_2.bat
-END

-RUN

-EXIT

Thanks in advance,
Morgan
 
Posts: 21 | Location: NC, USA | Registered: June 12, 2006Report This Post
Master
posted Hide Post
mbedford

That should work. My guess is that you are describing the location of your batchfile relative to yourself and not relative to the server. ie dos_test_2 is on your machine's disk and not the server's C:

Hope this helps

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Member
posted Hide Post
Thanks, John. That does make sense. But this leads me to another question. What code do I write in my .fex to tell it that it is on my C: drive?

I would just put the .bat on my server, but it is an AIX box and that does not make sense to me. Eventually, the files the .bat will delete are going to be on a windows server, anyway.

Thanks,
Morgan
 
Posts: 21 | Location: NC, USA | Registered: June 12, 2006Report This Post
Master
posted Hide Post
mbedford

Again this is a question of how your server sees the files.

The .bat probably needs rewriting as the unix equivalent. There will have to be some equivalent to a windows filespec to enable the unix machine to pick the files up over the network.

dos del \\machine-name\dir1\dir2\myfile.dat

needs rephrasing into Unixspeak.

Offers anyone?

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
morgan, try taking the dash out from in front of the DOS command.
I'm on win2k and win2k3 and i prefer the CMD command, but DOS sometimes works.
If i need to map a drive, the DOS command wont work for me, e.g.
CMD NET USE F: /DELETE
CMD NET USE F: \\servername\d$
CMD COPY \\servername\sourcedirname\*.fex \\servername\targetdirname /Y
CMD ERASE \\servername\somedirname\*.*




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Morgan,
Since your on multi-platforms you may want to switch to using APP commands, which work within webfocus and avoind the operating system commands.
The syntax is easy to find but basically it as simple as:
APP DELETEF appname filename filetype
Regards,
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Master
posted Hide Post
RichH

Using APP commands is pretty smart - wish I had thought of that!

Would still be interested from a Unixer (right term?) as to how they do the equivalent of DOS .bat files.

Another thing (which still applies to APP) is I know how a file in Windows within a windows network is described but how is it done within
Unix and the APP command.

Do you use something like

FILE://machine-name/dir1/dir2/filename.ext?

Regards

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Platinum Member
posted Hide Post
Hi John,
The APP commands should work the same way on any platform as there are webfocus commands. If the goal is to just copy and/or delete files that may be a better way to go.
For UNIX you can just issue a
-UNIX unix_command
at the operating system level or create
shell scripts to run.
There are a lot of guides on the internet for converting DOS batch files to shell scripts. These should help get you going.
Regards,
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     run a dos command in .fex

Copyright © 1996-2020 Information Builders