BASICHELP.HLB  —  OPEN
  The  OPEN  statement  opens  a  file   for   processing.    It   transfers
  user-specified  file  characteristics  to  Record  Management Services and
  verifies the results.

  Examples

  OPEN "INPUT.DAT" FOR INPUT AS FILE #4%,     &
       ORGANIZATION SEQUENTIAL FIXED

1  –  Syntax

                      [ FOR INPUT  ]
      OPEN file-spec1 [ FOR OUTPUT ] AS [ FILE ] chnl-exp1 [,
           open-clause ]...

        open-clause:  {                  { VIRTUAL    }                   }
                      {                  { UNDEFINED  }                   }
                      { [ ORGANIZATION ] { INDEXED    } [ STREAM   ]      }
                      {                  { SEQUENTIAL } [ VARIABLE ]      }
                      {                  { RELATIVE   } [ FIXED    ]      }

                       {       { NONE   }                                 }
                       {       { READ   }                                 }
                       { ALLOW { WRITE  }                                 }
                       {       { MODIFY }                                 }

                       {        { APPEND  }                               }
                       {        { READ    }                               }
                       { ACCESS { WRITE   }                               }
                       {        { MODIFY  }                               }
                       {        { SCRATCH }                               }

                       {            { LIST    }                           }
                       { RECORDTYPE { FORTRAN }                           }
                       {            { NONE    }                           }
                       {            { ANY     }                           }

                       { RECORDSIZE int-exp1                              }

                       { FILESIZE int-exp2                                }

                       { WINDOWSIZE int-exp3                              }

                       { TEMPORARY                                        }

                       { CONTIGUOUS                                       }

                       { MAP map-name                                     }

                       { CONNECT chnl-exp2                                }

                       { BUFFER int-exp4                                  }

                       { USEROPEN sub-name                                }

                       { DEFAULTNAME file-spec2                           }

                       { EXTENDSIZE int-exp5                              }

                       { BLOCKSIZE int-exp8                               }

                       { NOREWIND                                         }

                       { NOSPAN                                           }

                       { SPAN                                             }

                       { BUCKETSIZE int-exp9                              }

                       { PRIMARY [ KEY ] key [ DUPLICATES ]

                                      [ ASCENDING  ]
                                      [ DESCENDING ]                      }

                       { ALTERNATE [ KEY ] key [ DUPLICATES ] [ CHANGES ]

                                      [ ASCENDING  ]
                                      [ DESCENDING ]                      }

                       { UNLOCK EXPLICIT                                  }

         key:          { str-unsubs-var                         }
                       { int-unsubs-var                         }
                       { decimal-unsubs-var                     }
                       { (str-unsubs-var1 ,... str-unsubs-var8) }
Close Help