I have this piece of code.
IF COND(%TRIM(&BLANK_VAR) *EQ '') THEN(DO)
CALL PGM(MY_PROGRAM) PARM(&BLANK_VAR)
ENDDO
I would like to check if &BLANK_VAR
is an empty string. However my program won't compile because of error message:
* CPD0126 30 Operand not valid or operator missing in COND.
Is this an issue with %TRIM
? I tried using %LEN
but it gives me lenght of the variable declared, not the actual data inside.
&BLANK_VAR
is 10 characters in length.
Do I have to do:
IF COND(&BLANK_VAR *EQ ' ')