Focal Point
[SOLVED] If -Then - Else syntax question

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

July 18, 2017, 11:14 AM
tlbrydie
[SOLVED] If -Then - Else syntax question
I have the following code and I'm receiving IF .. THEN .. ELSE .. SYNTAX ERROR. Could someone assist me please. I have the following:

Define..
DISP_DISB/MDYY MISSING ON=HDATE (CONTRACTDATE, 'MDYY' );
DISP_FHA/MDYY MISSING ON=HDATE (GOVT_UFMIP_DATE_REMITTED, 'MDYY' );
DISP_VA/MDYY MISSING ON=HDATE (GOVT_VAFF_DATE_REMITTED, 'MDYY' );

DISPLNTYP/A3= DECODE LOANTYPE (22 'FHA'
23 'FHA'
26 'VA'
27 'VA');

DSPDR/A10 = IF (LNKEY NE LAST LNKEY) AND (DISPLNTYP EQ 'FHA') THEN DISP_FHA
ELSE IF (LNKEY NE LAST LNKEY) AND (DISPLNTYP EQ 'VA') THEN DISP_VA ELSE ' ';

END

--Note: LNKEY is a numeric value

Any assistance would be appreciated....

This message has been edited. Last edited by: FP Mod Chuck,
July 18, 2017, 11:29 AM
FP Mod Chuck
Hi tlbrydie

Try taking the parenthesis off from around your tests.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 18, 2017, 11:32 AM
tlbrydie
Yes, I had previously tried that, just tried again...Did not work, same results
July 18, 2017, 11:39 AM
FP Mod Chuck
Hi

It may be your FORMAT of A10 you are trying to assign a MDYY field to it. Have you tried DSPDR/MDYY?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 18, 2017, 11:49 AM
tlbrydie
Chuck,

Thanks so much. That corrected my issue.

Thanks again...