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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Test if APP command was successful

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Test if APP command was successful
 Login/Join
 
Master
posted
Anyone know how to test to see if a call to an APP command like APP COPYFILE was successful?

This message has been edited. Last edited by: <Kathryn Henning>,




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
APP COPYFILE IBISDAMP FLOWDESC.XSD DEFAULT  TDEST FLOWDESC.XSD DEFAULT
-RUN

-TYPE &FOCERRNUM


This results in '36307' so I know that an error occurred... Perhaps testing &FOCERRNUM after a -RUN will suffice.


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
You don't list your platform in your post but if you are running on a Windows box, you could check for the file existence after the copy with the DOS STATE command then poll the value of &RETCODE. &RETCODE = 0 on success and -1 otherwise.

I suppose that if the target file exists prior to the copy that you would need to delete it, then copy the new file, and then check if it exists in the target location.

APP DELETEF ...
APP COPYF ...
DOS STATE file
-IF &RETCODE EQ 0 THEN .... ELSE...;

Hope that helps,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
 
Posts: 242 | Location: Minneapolis | Registered: February 16, 2006Report This Post
Master
posted Hide Post
Testing &FOCERRNUM does not always return an error. If the app folder is not there an error will be returned if the file is not there it does not seem to return an error. Want to get rid of all DOS commands that this can be a big security hole.




Scott

 
Posts: 865 | Registered: May 24, 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     [CLOSED] Test if APP command was successful

Copyright © 1996-2020 Information Builders