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     How to check the existence of a file from within WebFOCUS Fex Code

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to check the existence of a file from within WebFOCUS Fex Code
 Login/Join
 
Gold member
posted
I remember there was a trick to check the existence of a disk file (by using WebFOCUS Fex Code).
I am not able to recollect what was the exact syntax .... does anybody know ?


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Expert
posted Hide Post
in a windows environment you can
CMD STATE D:\IBI\APPS\..\filename.ext
-RUN
-IF &RETCODE NE 0 THEN you got no file.
also there was an interesting post by jg
and he says
!IF EXIST C:\ibi\apps\baseapp\NEWXHT.XLS (DEL C:\ibi\apps\baseapp\NEWXHT.XLS /F)
 
here's the link to that code




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
Guru
posted Hide Post
or you can use the old DOS STATE

-* Note: zero is a good return code
DOS STATE \\IMPRS01\APPS\PMS\DATA\FTFLAG.DAT
-IF &RETCODE NE 0 GOTO NOFLAG;

then add appropriate labels and loop.



WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Member
posted Hide Post
In the Unix/Linux environment, just use 'STATE' without the preceding CMS/DOS/etc. qualifier.
STATE filename.txt
-RUN
-IF &RETCODE EQ 0 GOTO FILEOK ;
-TYPE Error message
-GOTO ERREXIT

-FILEOK
... Rest of fex here
 
Posts: 15 | Location: New York | Registered: April 02, 2004Report This Post
Gold member
posted Hide Post
I am on Unix/Solaris. 'STATE' worked out for me. Thx.


WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
 
Posts: 85 | Registered: December 20, 2005Report This Post
Gold member
posted Hide Post
Alternatively,

-UNIX ls /path/to/your/file 1>/dev/null 2>/dev/null
-IF &EXITRC NE 0 THEN GOTO WHATEVER;


WF 7.1.6 moving to WF 7.7, Solaris 10, HTML,PDF,XL
 
Posts: 83 | Location: Dartmouth Hitchcock Medical Center | Registered: April 17, 2003Report 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     How to check the existence of a file from within WebFOCUS Fex Code

Copyright © 1996-2020 Information Builders