You could do this.
PROCESS.REC:
************
READ RECORD FROM FILE,ID THEN
IF RECORD<FLD.1> EQ COND1 AND RECORD<FLD.2> EQ COND2 AND RECORD<FLD.3>
EQ COND3 THEN
RECORD<FLD.4> = 'PROCESSED'
WRITE RECORD TO FILE, ID
END IF
END IF
RETURN
Or, you could try:
READ RECORD FROM FILE,ID THEN
BEGIN CASE
CASE RECORD<FLD,1> NE COND1
CASE RECORD<FLD,2> NE COND2
CASE RECORD<FLD,3> NE COND3
CASE 1
RECORD<FLD,4> = "PROCESSED"
WRITE RECORD ON FILE, ID
END CASE
END
For my money, the CASE statement, sensibly used, is much better than
multiple IF statements
Colin.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/