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     Why a dialog statement (-IF &RETCODE ...) executed twice

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Why a dialog statement (-IF &RETCODE ...) executed twice
 Login/Join
 
Platinum Member
posted
I have the following code in a user profile:
-DOS STATE D:\Power\Users\lusheng\orgfile.foc
-IF &RETCODE EQ 0 GOTO COPYDONE;
-DOS COPY D:\Power\FileTemplates\Org\orgfile.foc D:\Power\Users\lusheng
-COPYDONE

Because the -IF statement executed twice, the second time &retcode was evaluated as 0, thus skipped the -DOS COPY command, and causing the file not found. Here is from the edaprint.log file in version 7.60 (Win2003 server).


02/08/2007 11:00:26 -DOS STATE D:\Power\Users\lusheng\orgfile.foc
02/08/2007 11:00:26 File doesn't exist
02/08/2007 11:00:26 -IF -1 EQ 0 GOTO COPYDONE;
02/08/2007 11:00:26 -IF 0 EQ 0 GOTO COPYDONE;
02/08/2007 11:00:26 -COPYDONE
02/08/2007 11:00:26 >
02/08/2007 11:00:26 -SET &&USERPATH= D:\Power\Users\lusheng;

This profile has been working since Webfocus version 4.36. Why it does not work now?
 
Posts: 118 | Location: Omaha, NE | Registered: June 12, 2003Report This Post
Expert
posted Hide Post
Lu
take the - out of your DOS statements
and put a -RUN after them.
DOS STATE D:\Power\Users\lusheng\orgfile.foc
-RUN
-IF &RETCODE EQ 0 GOTO COPYDONE;
DOS COPY D:\Power\FileTemplates\Org\orgfile.foc D:\Power\Users\lusheng /Y
-RUN
-COPYDONE
-* a /Y might be a good idea after your copy statement, forces overwrite if one already exists.
If DOS command doesn't work (doesn't for me), try CMD instead
CMD STATE ...
CMD COPY ...
works for me.




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
Virtuoso
posted Hide Post
Lusheng/Susannah
The STATE and COPY commands do not need a DOS or CMD.
Somewhere back in the mists of time there was a doc that had a list of 'DOS' commands that run without any prefix.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Master
posted Hide Post
state requires a bit of mucking around to get it to work reliably. I have posted on this before and there is a solution that will always work if you search my posting history.



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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Why a dialog statement (-IF &RETCODE ...) executed twice

Copyright © 1996-2020 Information Builders