Focal Point
[CLOSED] Compare the record counts of two hold files within a focexec

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3187080426

September 13, 2012, 03:00 PM
JRS
[CLOSED] Compare the record counts of two hold files within a focexec
I am using WF Dev studio 7.6.11. I'll have 7.6.04 by the end of this month.
I have program that I am trying to make smarter. In the first hold file and am holding data that meets a certain date criteria as well as a special status code and the result is just a record count. In the second hold file I am holding all data that meets the same date criteria above but not status and it returns a record count as well. I would like to know how I can write the WF code to compare the two hold files record count. If they match then create a report, if not I want to invoke the &&KILL_RPC. I appreciate any help or advice on this one.

This message has been edited. Last edited by: Kerry,


7.7.03

OS/Oracle

Windows
Output:All
September 13, 2012, 03:36 PM
Dan Satchell
If the HOLD files contain just record counts, use SAVE instead of HOLD. Then:

TABLE FILE xxx
.
.
ON TABLE SAVE AS SAVE1
END

TABLE FILE yyy
.
.
ON TABLE SAVE AS SAVE2
END
-*
-RUN
-READ SAVE1, &REC_COUNT1
-READ SAVE2, &REC_COUNT2
-*
-IF (&REC_COUNT1 EQ &REC_COUNT2) GOTO :REPORT ;
-SET &&KILL_RPC = 'Y';
-EXIT
-*
-:REPORT
<report logic or -INCLUDE report logic>

If the HOLD files contain data records, then:

TABLE FILE xxx
.
.
ON TABLE HOLD AS HOLD1
END
-RUN
-SET &REC_COUNT1 = &LINES ;

TABLE FILE yyy
.
.
ON TABLE HOLD AS HOLD2
END
-RUN
-SET &REC_COUNT2 = &LINES ;
-*
-IF (&REC_COUNT1 EQ &REC_COUNT2) GOTO :REPORT ;
-SET &&KILL_RPC = 'Y';
-EXIT
-*
-:REPORT
<report logic or -INCLUDE report logic>



WebFOCUS 7.7.05
September 14, 2012, 03:53 AM
Dave
Or...

TABLE FILE ...
END

-RUN
-SET &FILE1_LINES = &LINES;

TABLE FILE ...
END

-RUN
-SET &FILE2_LINES = &LINES;

-IF &FILE1_LINES EQ &FILE2_LINES THEN GOTO L_REPORT ELSE GOTO L_QUIT;



_____________________
WF: 8.0.0.9 > going 8.2.0.5