FILE-CONTROL. SELECT CLIENTES ASSIGN TO 'C:COBOL\CLIENTES.DAT' ORGANIZATION IS INDEXED ACCESS MODE IS RANDOM FILE STATUS IS CLIENTES-STATUS RECORD KEY IS CLIENTES-CHAVE.```
1000-INICIAR. OPEN I-O CLIENTES IF CLIENTES-STATUS = 35 THEN OPEN OUTPUT CLIENTES CLOSE CLIENTES OPEN I-O CLIENTES END-IF.