The -Include .FTM file is basically created like this:
Define File MyFile
CONDITIONAL/A3 = IF CTR EQ 1 THEN ' ' ELSE 'OR';
CONDITIONAL2/A4 = 'AND';
FLAGCOUNTER/P8 = LAST FLAGCOUNTER + 1;
Equal/a2 = EQ;
Space/a1 = ' ';
Name/a3 = 'SSN';
TaxName/a15 = 'TaxType';
TaxType = ''''||Tax||'''';
AmtName/a15 = 'Amount';
CityName/a5 = 'City';
Zipname/a10 = 'ZipCode;
End
Table File MyFile
Print
CONDITIONAL
Name
Equal
SSN -*** where SSN here is actually the Value stored in that field
CONDITIONAL2
TaxName
Equal
TaxType -** where TaxType is the value in that field
CONDITIONAL2
AmtName
Equal
Amount -** where Amount is the value in that field
CONDITIONAL2
CityName
Equal
City -** where City is the value in that field
CONDITIONAL2
ZipName
Equal
Zip -** where Zip is the value in that field
WHERE FLAGCOUNTER LE 100 -***** so this limits the first 100 rows we check
-*** RATEERROR1 is the first 100, this goes on RATEERROR2 for the next etc....
ON TABLE HOLD AS RATEERROR1 FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
Something like above... so that when we have later on
Define File NewFile
E_PosttaxAmt/A4 = IF TaxType EQ 'PRETAX' THEN ' '
ELSE IF
-INCLUDE RATEERROR1.FTM
THEN 'L078' ELSE ' ';
END
When you ECHO it, it shows up like this:
_PosttaxAmt/A4 = IF TaxType EQ 'PRETAX' THEN ' '
ELSE IF
-INCLUDE RATEERROR1.FTM
SSN EQ 456987458 AND TaxType EQ 'PRETAX' AND Amount EQ 5.34 AND City EQ 'San Francisco' AND ZipCode EQ '54896'
OR SSN EQ 456987458 AND TaxType EQ 'PRETAX' AND Amount EQ 5.34 AND City EQ 'Memphis' AND ZipCode EQ '54896'
OR SSN EQ 454512841 AND TaxType EQ 'AFTERTAX' AND Amount EQ 5.34 AND City EQ 'Boston' AND ZipCode EQ '54896'
OR SSN EQ 987546321 AND TaxType EQ 'PRETAX' AND Amount EQ 5.34 AND City EQ 'Dallas' AND ZipCode EQ '54896'
OR SSN EQ 123456789 AND TaxType EQ 'PRETAX' AND Amount EQ 5.34 AND City EQ 'Miami' AND ZipCode EQ '54896'
OR SSN EQ 987654321 AND TaxType EQ 'PRETAX' AND Amount EQ 5.34 AND City EQ 'South Beach' AND ZipCode EQ '54896'
OR SSN EQ 101001010 AND TaxType EQ 'AFTERTAX'AND Amount EQ 5.34 AND City EQ 'Las Vegas' AND ZipCode EQ '54896'
THEN 'L078' ELSE ' ';
So it searches New File to find a match for these SSN's in rate error 1... if not then it starts moves on to the next one:
E_PosttaxAmt/A4 = IF E_PosttaxAmt NE ' ' THEN E_PosttaxAmt ELSE IF
-INCLUDE RATEERROR2.FTM
THEN 'L078' ELSE ' ';
Where RATEERROR2.FTM has the next set of SSN's.
What was my problem was because of so many AND' ' AND ' ' AND ' ' it was telling me the computation was too large. What I have done is narrowed down my search criteria to a row number so I will say:
SSN EQ 456987458 AND RowNumber 17
OR SSN EQ 123456789 AND RowNumber 17
OR SSN EQ 987654321 AND RowNumber 17
OR SSN EQ 456987123 AND RowNumber 17
OR SSN EQ 147258963 AND RowNumber 17
THEN 'L078' ELSE ' ';
This DID NOT give me a computation too large, so I was thinking I had too many AND's in the IF Statement.
I am going to try what was suggested where instead of giving it a BLANK, I give it a value and then finally Blank it out in the end.
So if I try:
Taken from Tony's Example:
-* This is the final statement so set the ELSE value to blank
E_PosttaxAmt/A4 = IF E_PosttaxAmt NE 'X' THEN E_PosttaxAmt ELSE IF
more of the same ................
ELSE IF PosttaxAmtCalc EQ 0 THEN ' '
ELSE IF PosttaxAmtCalc EQ .02 THEN 'L000' ELSE ' ' ;
END
Then if all the If statements before were set to X, then in the End they will be set to Blank correct? (Cause I need it blank). I will try this for effeciency sake. Thanks for all your help, I hope my explanation clarified my problem. Currently I am not getting the computation too large error, but I had to limit the amount of ANDs.
Version 5.3.5
Dev, SIT, UAT, Production:7.6.6
Dev Sandbox:7.6.11
Dev Studio - 7.6.6