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     [SOLVED] "SYSTEM" command

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] "SYSTEM" command
 Login/Join
 
Platinum Member
posted
Anyone know the syntax of the SYSTEM command? Specifically, is there an option that will pause processing of that focexec until whatever DOS command was issued by SYSTEM has completed?

Is there a SYSTEM START/WAIT (program name) command?

Thank you,

John

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
According to the documentation, the SYSTEM command will stop execution of FOCUS code til the DOS command is finished.

If it is not doing this, then perhaps you will have to put in a case with IBI


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
I don't know if we're thinking of the same SYSTEM command, but my understanding is that it's not really a command, but a function to which you pass and receive parameters. Would guess that it is usually used in Dialogue Manager commands. So when you say "pause processing of that focexec" it would otherwise obey normal processing "rules" for DM, but DM processing would stop until the command specified as the function parm completes. It cannot pause processing of a TABLE request that has been submitted to the server.

Just looked it up in the docs - here's and example to run chkdsk:

SYSTEM runs the check disk program and redirects the output to a file called CHKDSK.TXT. (Redirecting the output to a file makes it accessible to a program that might want to read it.)

-SET &RETCODE=SYSTEM(19,'CHKDSK > CHKDSK.TXT','D4');


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Perhaps we need to see the command in context.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
John,

SYSTEM is not a command for WebFOCUS, as Darin pointed out.
And the SYSTEM function indeed halts processing until the dos command is completed, as Waz stated.
If you need any other wait functionality, a simple search on the internet will give you various 'wait.exe' hits that allow you to pause a number of seconds.
If the above is not what you're looking for, then as Waz suggested, show us your context.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
There is a SLEEP n, where n is seconds, which might be useful to you. Also, as of 7.6.4, there is a SLEEP function. But that runs in a TABLE request.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Firstly, you do not need to have the process sleep etc. as the SYSTEM syntax causes the result of the OS command to be placed into the declared variable.

The syntax for SYSTEM (from memory) is -

-SET &variable = SYSTEM([length of command], [command in quotes], [output format of result - always double precision]);

I use this to allow a VB Script file to run, which creates a log file, which the remaining code in the fex uses - I actually update a FOCUS database with the results but it could be anything.

So,

-SET &VBS_Return = SYSTEM(13, 'runscript.vbs', 'D4');
-RUN
-IF &VBS_Return NE 0 THEN :Error;
-* If you get here then the command returned a zero value return code

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Hi Antony, Hope you are doing good.

-SET &ECHO=ALL;
-SET &SYS_CMD = 'F:\KickOff\OpenDoc.bat';
-SET &RETCODE = SYSTEM(&SYS_CMD.LENGTH,'&SYS_CMD.EVAL','D4');

OpenDoc.bat has just Notepad.exe written in it.

On executing, I do not get any error but the notepad window doesn't come up. Although I can see a new task in the task manager for it.

Any suggestions?

Thanks

Kartik


WebFOCUS 8010,8204
Windows
 
Posts: 59 | Registered: June 26, 2015Report This Post
Expert
posted Hide Post
Hi Kartik,

If you think about how you are initiating the "OpenDoc.bat" file, you will realise that it is running on the server and not in an interactive way as would be the situation as a user. Therefore you should realise that there is probably a notepad.exe open on the server.

Go to the server and open task manager and look for all those notepad.exe tasks that you have set off!

If you want to deliver a document to the user then you will need to look at using EDAGET.

I see that Waz has responded to your original question in a similar manner.

Good luck


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [SOLVED] "SYSTEM" command

Copyright © 1996-2020 Information Builders