|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
I have created a driver fex that runs a stream of fexes for a monthly production run.
At this point, I have the following code: -TYPE ___________________________________________________ -TYPE Starting Car1.fex: ( &BEG1 - &END1 ) FREQ = &FREQ -RUN -INCLUDE CAR1 -RUN -TYPE Ending Car1 Fex: ( &BEG1 - &END1 ) FREQ = &FREQ -TYPE ___________________________________________________ -RUN -EXIT -*********** However, if I remove the -RUN below the -INCLUDE car1.fex statement, I will see this message when I click on view source: ___________________________________________________ Starting Car1.fex: ( 2008/07/01 - 2008/09/30 ) FREQ = Q Ending Car1 Fex: ( 2008/07/01 - 2008/09/30 ) FREQ = Q ___________________________________________________ 0 NUMBER OF RECORDS IN TABLE= 4 LINES= 4 Then if I put the -RUN back to follow the -INCLUDE CAR1 statement, I see this message: Starting Car1.fex: ( 2008/07/01 - 2008/09/30 ) FREQ = Q 0 NUMBER OF RECORDS IN TABLE= 4 LINES= 4 Does anyone have any DM code that will effectively monitor that a called FEX is about to start its run, and when it is complete, with the statistics - hopefully - displaying before a message appears that it has completed?. What about capturing a return code in the fex (at end) and passing that value back to driver fex? Thanks! Tomsweb WebFOCUS 5.3.3, 7.1.3, 7.4.1, 7.6 Windows, Aix 5.2, MVS, VM WebFOCUS’ Developer Studio and ESRI/GIS mapping capabilities |
||
|
|
Virtuoso |
Tom,
You need the -RUN to force the execution of the code in car1.fex before you can type out a message saying that the fex is complete. If you don't have the -RUN, all the DM commands run first before FOCSTACK is executed. If you want to test a return code, &LINES is as good as any. Ginny --------------------------------- Prod: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15 Dev: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15 Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable |
|||
|
|
Virtuoso |
Where I worked previously, we allocated a file in a directory when the caster job ran and then did -WRITE commands to the file with various information. As Ginny indicates, for most control, the -RUN should be used. For our purposes we didn't use it often. Leah |
|||
|
|
Master |
Tom,
Ginny gave you the "secret". When you run a WF procedure you have to be a bit schyzophrenic... or think "stereo". Focexecs are read sequentially from line 1. If a line starts with a '-' it is executed immediately. If it doesn't, the line is written to the FOCSTACK. When either -RUN, -EXIT or last line is encountered, whatever has accumulated in the FOCSTACK is executed. Hence, what you have observed. As for testing "return codes" you have a choice: &RECORDS (number of records extracted) &LINES (number of lines generated) &READS (number of records read from an external data source) &BASEIO (number of I/O on a Focus db) &FOCERRNUM (number of last error encountered - should be 0) For efficiency, you can use &FOCCPU which shows the amount of CPU milliseconds. For example: -* File ByTocXL.fex -SET &START= &FOCCPU; TABLE FILE CAR SUM SALES BY COUNTRY NOPRINT BY CAR BY BODY ON TABLE SET BYDISPLAY ON ON TABLE HOLD FORMAT EXL2K BYTOC END -RUN -SET &END= &FOCCPU; -SET &USEDCPU=&END - &START; -TYPE USED CPU = &USEDCPU |
|||
|