Focal Point
is missing problem

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

February 09, 2006, 12:06 PM
Mike Johnson
is missing problem
I have the following define in my code. It always evaluates to 0. Does anyone know why?

DEFINE FILE TEROT001_RDWY_CNTRT
FLAG1/I1=IF KEY_DATE IS MISSING THEN 1 ELSE 0;
END

KEY_DATE is of format I8YYMD
February 09, 2006, 12:51 PM
Carol Dobson
Change your define to

FLAG1/I1 MISSING ON =IF KEY_DATE IS MISSING THEN 1 ELSE 0;

and see what happens.



WebFOCUS 7.6.6/TomCat/Win2k3
February 09, 2006, 01:36 PM
Mike Johnson
Thanks, Carol. I gave that a try without success. I was getting the KEY_DATE value from a HOLD file. It turnout the HOLD file was returning no records. I used the following code to resolve my issue. If this can be done a better way I'm open to suggestions.

-IF &LINES EQ 0 GOTO FLAG1;
-IF &LINES GT 0 GOTO FLAG2;
-FLAG1
-SET &FLAG = 1;
-GOTO DONE
-FLAG2
-SET &FLAG = 0;
-DONE
-TYPE FLAG &FLAG

Then used the &FLAG VALUE IN MY MAIN REPORT TO DETERMINE IF SOMETHING SHOLD BE ON OR OFF. Thanks for your help.
February 09, 2006, 02:28 PM
Tony A
One thing on the missing front.

If you are going to use the MISSING attribute in your define then I would suggest that you set the alternate value to MISSING, otherwise there is no pointin the attribute.

FLAG1/I1 MISSING ON =IF KEY_DATE IS MISSING THEN 1 ELSE MISSING;

OR

FLAG1/I1 MISSING ON =IF KEY_DATE IS MISSING THEN 1;

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 10, 2006, 04:29 PM
TexasStingray
Some Data sources are never missing like fix format master, hold files if missing was not set, etc. One way to code for all data type is to test like this.
  
FLAG1/I1 = IF KEY_DATE EQ '' THEN 1 ELSE IF KEY_DATE IS MISSING THEN 1 ELSE 0;





Scott

I will give this a try on Tuesday. everyone have a great weekend.