cobol1.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
File-Control Entry (↑ Statements)
 ◄Key►                                       ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
 
  Construct:    File-Control Entry (SELECT)
 
  Function:     Assigns names to files, for use in the program,
                and describes the files.
 
  Syntax:       Which format?  ◄Sequential►  ◄Relative►
                                Indexed      ◄Sort-Merge►
 
  ►►───SELECT─┬──────────────┬─file-name-1────►
              ├─NOT OPTIONAL─┤
              └─OPTIONAL─────┘
 
                 ┌────────────────────────────────────────────────┐
                 ▼                                                │
  ►──ASSIGN─┬──┬─┬┬──────────┬─┬┬────┬┬─external-file-reference─┬┬┬─►
            └TO┘ │├─EXTERNAL─┤ │└DISK┘├─data-name-1─────────────┤││
                 │└─DYNAMIC──┘ │      └─literal-1───────────────┘││
                 │             └─DISK────────────────────────────┘│
                 └─DISK FROM data-name-1──────────────────────────┘
 
  ►─┬───────────────────────────────────────┬─►
    └─RESERVE─┬─integer─┬─ALTERNATE─┬AREA─┬─┘
              └─NO──────┘           └AREAS┘
 
 
  ►─┬───────────────────┬─INDEXED───────────────────────────────────►
    └─ORGANIZATION─┬──┬─┘
                   └IS┘
 
  ►┬────────────────────────────────────┬───────────────────────────►
   └──ACCESS─┬────┬┬──┬─┬─SEQUENTIAL─┬──┘
             └MODE┘└IS┘ ├─RANDOM─────┤
                        └─DYNAMIC────┘
 
  ►┬─────────────────────────────────────────────────────────────────────┬►
   └─LOCK─┬────┬┬──┬─┬─EXCLUSIVE────────────────────────────────────────┬┘
          └MODE┘└IS┘ └┬─AUTOMATIC─┬┬───────────────────────────────────┬┘
                      └─MANUAL────┘└┬────┬┬─LOCK ON─┬────────┬┬RECORD─┬┤
                                    └WITH┘│         └MULTIPLE┘└RECORDS┘│
                                          └─ROLLBACK───────────────────┘
 
  ►─RECORD─┬───┬┬──┬─┬─data-name-2─────────────────────┬────────────►
           └KEY┘└IS┘ │                    ┌──────────┐ │
                     │                    ▼          │ │
                     └─split-key-name-1 = data-name-3──┘
 
  ►─┬───────────────────────────┬──────────────────────────────►
    └─PASSWORD─┬──┬─data-name-4─┘
               └IS┘
 
  ►┬─────────────────────────────────────────────────────────────────►1
   │                             ┌─────────────────────────────────┐
   │                             ▼                                 │
   └─ALTERNATE─┬──────┬┬───┬┬──┬─┬─data-name-5─────────────────────┬─►2
               └RECORD┘└KEY┘└IS┘ │                    ┌──────────┐ │
                                 │                    ▼          │ │
                                 └─split-key-name-2 = data-name-6──┘
 
 2►──┬───────────────────┬─┬───────────────────────────┬────►2
     └─┬────┬─DUPLICATES─┘ └─PASSWORD─┬──┬─data-name-7─┘
       └WITH┘                         └IS┘
 
 1►───────────────────────────────────────────────────────┬────►
 2►──┬─────────────────────────────────────┬──────────────┘
     └─SUPPRESS─┬────┬─┬─ZEROS───────────┬─┘
                └WHEN┘ ├─ZEROES──────────┤
                       ├─SPACES──────────┤
                       └─┬─────┬─literal─┘
                         └─ALL─┘
 
  ►─┬───────────────────────────────────────────────┬──. ──────►◄
    └┬────┬─STATUS─┬──┬─data-name-8─┬─────────────┬─┘
     └FILE┘        └IS┘             └─data-name-9─┘
                                    -♦-