November 20, 2013, 12:02 PM
Francis Mariani
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
November 25, 2013, 03:11 PM
Norb EckertYou 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
December 03, 2013, 01:38 PM
TexasStingrayTesting &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.