I have users that are putting in invalid codes, the hex value is 2A but I want to see if I can store these codes in a file and use the program to read thru all of them and scan the fields for them, the reason is that when I encounter more of them it would be easier to update the file with those values instead of changing the program when this happens.
Here's the code that I have that doesn't work..
HEXCOD is the field in the Hex Code File that I created
Read FLOB
DOW NOT %EOF(FLOB)
Read HEXFILE
DOW NOT %EOF(HEXFILE)
IF %SCAN(HEXCOD:OBSITE) > 0 *NOTE HEXCOD Value is 2A
Eval @FLAG = 'Y'
Else
Eval @FLAG = 'N'
Read HEXFILE
ENDDO
Read FLOB
ENDDO
However if I define a Constant like
@Hex CONST(X'2A')
Then it works....
Read FLOB
DOW NOT %EOF(FLOB)
IF %SCAN(@HEX:OBSITE) > 0
Eval @FLAG = 'Y'
Else
Eval @FLAG = 'N'
Read FLOB
ENDDO
Any Ideas or Suggestions? Thanks in advance
Here's the code that I have that doesn't work..
HEXCOD is the field in the Hex Code File that I created
Read FLOB
DOW NOT %EOF(FLOB)
Read HEXFILE
DOW NOT %EOF(HEXFILE)
IF %SCAN(HEXCOD:OBSITE) > 0 *NOTE HEXCOD Value is 2A
Eval @FLAG = 'Y'
Else
Eval @FLAG = 'N'
Read HEXFILE
ENDDO
Read FLOB
ENDDO
However if I define a Constant like
@Hex CONST(X'2A')
Then it works....
Read FLOB
DOW NOT %EOF(FLOB)
IF %SCAN(@HEX:OBSITE) > 0
Eval @FLAG = 'Y'
Else
Eval @FLAG = 'N'
Read FLOB
ENDDO
Any Ideas or Suggestions? Thanks in advance