| Cevela about COBOL | COBOL language - Home - Site Map - About Cevela - MX COBOL <prev next> | 
| 
                                                                 60-1
file-control.
   select  [optional]  File-1
      assign  DatX-1
              Dev-1
      [organization]  org-spec-1*
      [access  access-spec-1*]
      [sharing-spec-1*]
      [file status  FileS-1]  .
   ...
 | 
| 
                                                                 60-1
open
   work-mode-1*  file-spec-1*         ...
      input      File-1  [no rewind]
      output
      i-o                                                        68-1
      extend                                                     85-1
   ...
     | 
| 
                                                                 60-1
close  File-1  ...
 | 
| 
                                                                 60-1
read  File-1  [into  Dat-2]
   end
      imperative-statements-3*
   [not end                                                      85-1
      imperative-statements-4*]
end-of-statement*
   end-read
   .
 | 
| 
                                                                 85-2
read  File-1  next  [into  Dat-2]
              previous
   end
      imperative-statements-3*
   [not end
      imperative-statements-4*]
end-of-statement*
   end-read
   .
 | 
| 
                                                                 85-3
read  File-1  [into  Dat-2]  key  Dat-3
   invalid
      imperative-statements-3*
   [not invalid
      imperative-statements-4*]
end-of-statement*
   end-read
   .
 | 
| 
                                                                 60-1
write  Rec-1  [from  Dat-2]  [print-spec*]
   end-of-page
      imperative-statements-3*
   [not end-of-page                                              85-1
      imperative-statements-4*]
end-of-statement*
   end-write
   .
 | 
| 
                                                                 85-2
write  Rec-1  [from  Dat-2]
   invalid
      imperative-statements-3*
   [not invalid
      imperative-statements-4*]
end-of-statement*
   end-write
   .
 | 
| 
                                                                 85-2
start  File-1  key-spec-2*
   invalid
      imperative-statements-3*
   [not invalid
      imperative-statements-4*]
end-of-statement*
   end-start
   .
 | 
| 
                                                                 85-2
rewrite  Rec-1  [from  Dat-2]
   invalid
      imperative-statements-3*
   [not invalid
      imperative-statements-4*]
end-of-statement*
   end-rewrite
   .
 | 
| 
                                                                 85-1
delete  File-1
   invalid
      imperative-statements-2*
   [not invalid
      imperative-statements-3*]
end-of-statement*
   end-delete
   .
 | 
| 
                                                                 02-1
unlock  File-1
 | 
| 
                                                                 MF-1
commit
 | 
| 
                                                                 MF-1
rollback
 |