I am using DM to dynamically create a fex but I cannot figure out how to run it afterwards.
Here is a simple example.
-SET &FILEDEF='D:\IBI\APPS\TEST\MYFEX2.FEX (APPEND'; FILEDEF MYFEX2 DISK &FILEDEF -RUN -WRITE MYFEX2 TABLE FILE CAR -WRITE MYFEX2 SUM SALES -WRITE MYFEX2 BY MODEL -WRITE MYFEX2 END -RUN
-*does not work... -INCLUDE MYFEX2.FEX
-*does not work... EX MYFEX2.FEX
This gives me a file called "D:\IBI\APPS\TEST\MYFEX2.FEX" and the contents of it are
TABLE FILE CAR SUM SALES BY MODEL END
The problem is... how can I run this once I created it on the fly like that? The include and ex lines do not work (ERROR: ERROR_MR_NO_OPEN can't open MYFEX2.fex). The reason I need this is that the contents of the file are extremely dynamic. I know I can work around this with tons of amper variables and goto branching, but this would be the easiest way. Anybody know how to run dynamically generated code like that?
Thanks
JodyeThis message has been edited. Last edited by: Kerry,
August 17, 2005, 05:07 PM
HÃ¥kan
I can't try it right now, but first of all issue a FILEDEF MYFEX2 CLEAR. Provided the directory test is in the APP PATH it should work with the following:
-mrnoedit EX MYFEX2 (or -INCLUDE MYFEX2)
August 17, 2005, 05:09 PM
Francis Mariani
This works, you need to close the file, and you don't need to allocate to a specific directory:
FILEDEF MYFEX2 DISK MYFEX2.FEX -RUN
-WRITE MYFEX2 TABLE FILE CAR -WRITE MYFEX2 PRINT * -WRITE MYFEX2 END
-CLOSE MYFEX2
-INCLUDE MYFEX2
August 17, 2005, 05:26 PM
jodye
Hi Guys
Thanks a million. The -MRNOEDIT works perfectly. And I will close the file.
Jodye
January 16, 2012, 01:23 PM
Doug
Thanks All... This is still worthwhile and relevant today. - Doug