I have a requirement where in which i need to validate the comp-3 field in the input file, I have coded it in rexx as below.
I am using C2X function to convert the packed to hexadecimal and validating it for numeric check, but the code is giving problem.
The comp-3 field declaration is as follows
NUMB = OFFC
THEN DSN = 'AMOUNT NOT VALID'
IF (RESULT = -NUMB)
THEN DSN = 'AMOUNT is NEGATIVE'
/* CONVERT PACKED DATA TO HEX AND SPLIT */
ERG = C2X(NUMB)
SIGN = RIGHT(ERG,1)
NUMB = LEFT(ERG,LENGTH(ERG)-1)
/* CHECK SIGN AND NUMERIC SECTIONS */
IF VERIFY(SIGN, "ABCDEF" ) > 0 THEN ,
IF VERIFY( NUMB, "0123456789" ) > 0 THEN ,
/* CHECK NEGATIVE SIGN */
IF POS(SIGN, "BD" ) > 0 THEN,
I am getting one error as below