[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | FOCUS, from INFORMATION BUILDERS |
|
Moderator: | ZAYIUS::BROUILLETTE |
|
Created: | Thu Feb 19 1987 |
Last Modified: | Mon May 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 615 |
Total number of notes: | 1779 |
407.0. "Simple screening problem ended in FOC015" by ZUR01::WELTI () Mon Mar 25 1991 08:58
I've got a simple screening wish.
Trying to compare two fields with character string screening
ended with the error message below.
Any help would be great.
Regards Heinz
/ cross posted in IBI_FOCUS & FOCUS
FILE=FLOW ,SUFFIX=FIX
SEGNAME=FLOW
FIELDNAME =LOG_NO ,E01 ,A5 ,A08 ,$
FIELDNAME =COMMAND ,E02 ,A20 ,A20 ,$
FIELDNAME =SOURCE ,E03 ,A1 ,A04 ,$
FIELDNAME =DESTINATION ,E04 ,A1 ,A04 ,$
FILEDEF OFFLINE DISK flow.LIS
OFFLINE
DEFINE FILE FLOW
COMM/A4=EDIT(COMMAND,'9999');
END
TABLE FILE FLOW
SUM LOG_NO NOPRINT AND ROW-TOTAL AND COLUMN-TOTAL
COUNT LOG_NO NOPRINT AS ''
BY DESTINATION AS 'TO'
ACROSS SOURCE AS 'FRM'
-*
-*
-*
-*
IF DESTINATION OMITS SOURCE
or
IF DESTINATION NE SOURCE
-*
(FOC015) TEST VALUE HAS MORE CHARACTERS THAN FIELD FORMAT LENGTH SOURCE
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
-*
-*
IF COMM CONTAINS 'ROUT'
END
T.R | Title | User | Personal Name | Date | Lines |
---|
407.1 | WHERE ever IF doesn't work. | GERBIL::BAMFORTH | | Mon Mar 25 1991 11:29 | 48 |
|
FOCUS is interpreting your request as if it were written in the
following manner.
IF DESTINATION OMITS 'SOURCE'
or
IF DESTINATION NE 'SOURCE'
FOCUS doesn't allow one to use a fieldname as the object of a string
comparison in an IF statement. As shown above, it tries to interpret
the field (SOURCE) as a string, then determines it exceeds the length
of DESTINATION.
There are many ways around this, including:
1) IF you are using a recent version of FOCUS, you'll be able to take
advantage of the WHERE statement, in which case you'd replace your IF
statement with the following.
WHERE DESTINATION NE SOURCE;
2) If WHERE isn't available on your version of FOCUS, you can use the
the approach below.
DEFINE FILE yourfile
DEST_SW/A1 = IF DESTINATION NE SOURCE THEN '1' ELSE '0';
END
TABLE FILE yourfile
whatever, whatever, whatever ...
IF DEST_SW EQ '1'
END
Good Luck!
|
407.2 | thanks | ZUR01::WELTI | | Tue Mar 26 1991 09:17 | 7 |
|
Thank you much!
HEINZ
|