>I am not getting the point wheather data type mismatch or space function doesn't match with actcod values. e.g. '123456789' = ' '
>am i right?
Mohammed, you are first creating a variable called actcod and assigning the string value '123456789' to it. This is a char string. To be clear, at this point actcod contains the string value '123456789'. Then you are asking:
IF (pending = "I" .AND. actcod = SPACE(9))
which is testing two things: 1) whether the variable pending contains the value "I" and 2) whether the variable actcod contains the value SPACE(9) ie 9 spaces.
The variable pending does contain the value of "I" as you assigned this at the start of your code. However the variable actcod does not contain the value of 9 spaces but contains the string value of '123456789'. Hence the entire IF condition fails becuase one of its component conditions has failed.
BTW - when you write
IF actcop = SPACE(9)
you are not making an assignment operation. You are performing a test in the format of
does variable x contain value y.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.