Thank you for the help Crox.
I have one more question. According to your example, is this how I should go about it.
name1 pic x(30).
name2 pic x(30).
check-name pic x(30).
check-name2 pic x(30).
etc.
...
IF NAME1 = NAME2
CONTINUE (HAVE THIS ACTUALLY IN A DIFFERENT "PARAGRAPH"
ELSE
MOVE NAME1 TO CHECK-NAME
MOVE ' ' TO REPORTNAME1
MOVE NAME2 TO CHECK-NAME2
MOVE ' ' TO REPORT-NAME2
PERFORM CHECK-CHARACTERS
END-IF.
CHECK-CHARACTERS.
PERFORM VARYING SUB-1 FROM 1 BY 1 UNTIL SUB-1 > 30.
IF CHECK-NAME(SUB-1:2)= SPACE
CHECK-NAME(SUB-1= CHECK-NAME(SUB-1 + 1
END-IF.
IF CHECK-NAME2(SUB-1:2) = SPACE
CHECK-NAME2(SUB-1)=CHECK-NAME2(SUB-1+1
END-IF.
IF CHECK-NAME = CHECK-NAME2
MOVE REPORTNAME1 TO REPORT-LINE1
WRITE REPORTLINE1
ELSE
MOVE REPORTNAME1 TO REPORT-LINE1
WRITE REPORTLINE1
MOVE REPORTNAME2 TO REPORT-LINE2
WRITE REPORTLINE2
END-IF.
END-PERFORM.
Your help is wonderful, and I truly appreciate the insite.
I have one more question. According to your example, is this how I should go about it.
name1 pic x(30).
name2 pic x(30).
check-name pic x(30).
check-name2 pic x(30).
etc.
...
IF NAME1 = NAME2
CONTINUE (HAVE THIS ACTUALLY IN A DIFFERENT "PARAGRAPH"
ELSE
MOVE NAME1 TO CHECK-NAME
MOVE ' ' TO REPORTNAME1
MOVE NAME2 TO CHECK-NAME2
MOVE ' ' TO REPORT-NAME2
PERFORM CHECK-CHARACTERS
END-IF.
CHECK-CHARACTERS.
PERFORM VARYING SUB-1 FROM 1 BY 1 UNTIL SUB-1 > 30.
IF CHECK-NAME(SUB-1:2)= SPACE
CHECK-NAME(SUB-1= CHECK-NAME(SUB-1 + 1
END-IF.
IF CHECK-NAME2(SUB-1:2) = SPACE
CHECK-NAME2(SUB-1)=CHECK-NAME2(SUB-1+1
END-IF.
IF CHECK-NAME = CHECK-NAME2
MOVE REPORTNAME1 TO REPORT-LINE1
WRITE REPORTLINE1
ELSE
MOVE REPORTNAME1 TO REPORT-LINE1
WRITE REPORTLINE1
MOVE REPORTNAME2 TO REPORT-LINE2
WRITE REPORTLINE2
END-IF.
END-PERFORM.
Your help is wonderful, and I truly appreciate the insite.