HELPLIB.HLB  —  SET  FILE  /BI_JOURNAL
    Requires read (R), write (W), and control access. Being the owner
    of the file is one way to get control access.

    Marks one or more RMS files for before-image journaling. You can
    also specify certain characteristics of the journal with this
    command, including its file specification, whether it is to be
    created, its initial size, and its default extension quantity.
    The SET FILE/NOBI_JOURNAL command unmarks a file for before-image
    journaling.

    The SET FILE command is not supported for remote files. You
    must use the SET FILE command from the system where the file
    is located.

    For more information, see the RMS Journaling documentation.

    Format

      SET FILE/[NO]BI_JOURNAL[=(keyword[,...])] data-filespec[,...]

1  –  Parameter

 data-filespec[,...]

    Identifies the file to be marked for before-image journaling. If
    you specify more than one file, separate the file specifications
    with commas. The asterisk (*) and the percent sign (%) wildcard
    characters are allowed. The file specification cannot include a
    node name, since the SET FILE command is not valid for network
    access.

2  –  Description

    The SET FILE/BI_JOURNAL command marks one or more RMS files
    for before-image journaling. You can also specify certain
    characteristics of the journal with this command, including its
    file specification, whether it is to be created, its initial
    size, and its default extension quantity. The SET FILE/NOBI_
    JOURNAL command unmarks a file for before-image journaling.

    After a data file is marked for before-image journaling with the
    SET FILE/BI_JOURNAL command, the following events occur whenever
    the data file is opened by RMS for write operations:

    o  The journal is opened.

    o  All subsequent modifications to the data file are recorded in
       the journal.

    By default, the journal has the same file specification as
    the data file that is to be journaled, but with the file type
    RMS$JOURNAL. That is, if you issue the following command, then,
    by default, the file specification for the before-image journal
    is FINANCE_DISK:PAYROLL.RMS$JOURNAL:

    $ SET FILE/BI_JOURNAL FINANCE_DISK:PAYROLL.DAT

    If erroneous or corrupt data is introduced into the data file,
    you can use the RMS Recovery Utility to "roll back" the data file
    that has been marked for before-image journaling. This will allow
    you to restore the data file to a previous state by removing data
    until a specified time (prior to the introduction of bad data).

    Use the SET FILE/NOBI_JOURNAL command to unmark a file for
    before-image journaling. After you use the SET FILE/NOBI_JOURNAL
    command for a file, modifications to that data file will no
    longer be written to the journal.

    You must use the SET FILE/NOBI_JOURNAL command before you can
    delete a file that has been marked for before-image journaling.

3  –  Keywords

    Four keywords are used as optional parameters to the SET FILE/BI_
    JOURNAL command: ALLOCATION, [NO]CREATE, EXTENSION, and FILE. You
    can use any, all, or none of these keywords.

    Use an equal sign (=)  immediately after the SET FILE/BI_JOURNAL
    command to use a keyword. If you use more than one of the
    keywords, enclose the list in parentheses and separate the items
    in the list with commas.

 ALLOCATION=n

    Specifies the initial size, in blocks, of the journal. The
    ALLOCATION keyword is meaningful only when the CREATE keyword
    is also used.

    The default allocation is 0 blocks.

 CREATE

    Specifies that a new journal is to be created. If no journal
    exists, using this keyword creates a new one. If a journal (with
    the file specification given in this command) already exists,
    using this keyword creates a new version of the journal. In the
    latter instance, the data file named in this SET FILE command
    is journaled to the new journal. Any other files that are being
    journaled to the previous version of the journal will continue to
    be journaled to that previous version.

    If a journal does not already exist, be sure to use the CREATE
    keyword with the SET FILE/BI_JOURNAL command. If you do not
    specify the CREATE keyword and a journal does not exist, a
    journal is not automatically created and an error message is
    displayed.

    When you create a journal for before-image journaling, the file
    protection for the journal is determined as follows:

    o  If a version of the journal that you specify with the CREATE
       keyword already exists, then the new version of the journal
       has the same file protection and access control list (ACL) as
       the most recent version.

    o  If there is no existing journal (that is, if you are creating
       version 1 of the journal), then the file protection and
       ACL of the journal are the default file protection for the
       process that creates the journal, except that none of the four
       ownership categories (system, owner, group, world) is given
       delete access.

    If you want to use a single journal for both after-image and
    before-image journaling, do not use the CREATE keyword with both
    the /AI_JOURNAL and /BI_JOURNAL qualifiers, because that will
    create two separate journals. When you create a journal that
    will be used for more than one data file or more than one type
    of journaling (after-image or before-image), you should first
    use a SET FILE command to create the journal for a single type
    of journaling and for a single data file. After the journal is
    created, then you can use a single SET FILE command for multiple
    data files and both after-image and before-image journaling. For
    example, you might use the following sequence of commands:

    $ SET FILE/AI_JOURNAL=(FILE=JNL_DISK:,CREATE) [WEEKLY]SALES.DAT
    $ SET FILE/BI_JOURNAL=(FILE=JNL_DISK:[WEEKLY]SALES) -
    _$INVOICES.DAT,COMMISSIONS.DAT

 EXTENSION=n

    Specifies the default extension quantity, in blocks, for the
    journal. You can specify a value from 0 to 65,535.

    The EXTENSION keyword is meaningful only when you use the CREATE
    keyword. If the file is extended, the value that you specify is
    used. If you do not use the EXTENSION keyword when you create a
    journal, RMS calculates its own EXTENSION value for the journal.

 FILE=journal-filespec

    Specifies the journal where all before-image journal entries for
    the data file will be recorded. The default file specification
    for the journal is the file specification of the data file that
    you name, but with a file type of RMS$JOURNAL. Use the FILE
    keyword if you wish to modify this default file specification
    for the journal. If you provide a partial file specification for
    the before-image journal, any unspecified portions are taken from
    the default file specification.

    The file specification cannot include a node name, since the SET
    FILE command is not valid for network access.

    The FILE keyword is optional with the SET FILE/BI_JOURNAL
    command.

    You can use a single journal for multiple data files for before-
    image journaling, and you can also use the same journal for both
    before-image and after-image journaling.

4  –  Qualifier

4.1    /LOG

       /LOG
       /NOLOG (default)

    Controls whether the SET FILE command displays the file
    specification and the type of journaling that has been set. By
    default, this information is not displayed.

5  –  EXAMPLES

    1.$ SET FILE/BI_JOURNAL=(FILE=JOURNAL_DISK:,CREATE) -
      _$FINANCE_DISK:[PAYROLL]WEEKLY.DAT

      In this example, the file FINANCE_DISK:[PAYROLL]WEEKLY.DAT is
      marked for before-image journaling. The FILE keyword, together
      with the defaults obtained from the file specification of the
      data file, provides the journal with a file specification of
      JOURNAL_DISK:[PAYROLL]WEEKLY.RMS$JOURNAL. Because the CREATE
      keyword was used, this journal is created when this SET FILE
      command is given.

    2.$ SET FILE/BI_JOURNAL=CREATE/LOG SALES.DAT
      %SET-I-JCREATED,journal FINANCE_DISK:[REGION_1]SALES.RMS$JOURNAL;1
      created
      %SET-I-FILMARKBI, FINANCE_DISK:[REGION_1]SALES.DAT marked for RMS
      before-image journaling
      -SET-I-JFILE,using journal FINANCE_DISK:[REGION_1]SALES.RMS$JOURNAL;1
      %SET-I-MODIFIED, FINANCE_DISK:[REGION_1]SALES.DAT modified

      In this example, the file SALES.DAT in default directory
      FINANCE_DISK:[REGION_1] is marked for before-image journaling
      and the /LOG qualifier causes the result of the SET FILE
      command to be displayed on the terminal.

    3.$ SET FILE/BI_JOURNAL=(FILE=JNL_DISK:, CREATE)/LOG  OVERDUE.DAT
      %SET-I-JCREATED, journal JNL_DISK:[PAYABLE]OVERDUE.RMS$JOURNAL;1
      created
      %SET-I-FILMARKBI, WORK_DISK:[PAYABLE]OVERDUE.DAT;1 marked for RMS
      before-image journaling
      -SET-I-JFILE, using journal JNL_DISK:[PAYABLE]OVERDUE.RMS$JOURNAL;1
      %SET-I-MODIFIED, WORK_DISK:[PAYABLE]OVERDUE.DAT;1 modified

      $ SET FILE/AI_JOURNAL=(FILE=JNL_DISK:)/RU_JOURNAL/LOG  OVERDUE.DAT
      %SET-I-FILMARKAI, WORK_DISK:[PAYABLE]OVERDUE.DAT;1 marked for RMS
      after-image journaling
      -SET-I-JFILE, using journal JNL_DISK:[PAYABLE]OVERDUE.RMS$JOURNAL;1
      %SET-I-FILMARKRU, WORK_DISK:[PAYABLE]OVERDUE.DAT;1 marked for RMS
      recovery-unit journaling
      %SET-I-MODIFIED, WORK_DISK:[PAYABLE]OVERDUE.DAT;1 modified

      In this example, the file OVERDUE.DAT is marked for all three
      types of journaling using two SET FILE commands. A single
      journal (JNL_DISK:[PAYABLE]OVERDUE.RMS$JOURNAL) will be used
      for after-image and before-image journaling.

      The first SET FILE command uses the /CREATE
      qualifier to create a new before-image journal,
      JNL_DISK:[PAYABLE]OVERDUE.RMS$JOURNAL. The file specification
      uses the current default directory [PAYABLE] and the default
      file extension RMS$JOURNAL.

      The second SET FILE command checks the disk JNL_DISK to see
      whether a journal already exists, and uses the existing journal
      for after-image journaling, as well as before-image journaling.

    4.$ SET FILE/NOBI_JOURNAL/NOAI_JOURNAL-
      _$ WORK_DISK:[PAYABLE]OVERDUE.DAT,VENDORS.DAT

      In this example, the files OVERDUE.DAT and VENDORS.DAT are
      unmarked for both before-image and after-image journaling. It
      is not necessary to specify the journals that were used. If
      more than one journaling type was applied to the data files
      (as in the previous example), then you must cancel each of the
      journaling types before you can delete the data files.

    5.$ SET FILE/BI_JOURNAL=(FILE=JOURNAL_DISK,CREATE)/RU_JOURNAL
 						[FIELD]SALARY.DAT
      $ SET FILE/BI_JOURNAL=(FILE=JOURNAL_DISK:[FIELD]SALARY)
 					/RU_JOURNAL CHECKS.DAT

      In this example, the files SALARY.DAT and CHECKS.DAT are both
      marked for before-image and for recovery unit journaling. The
      before-image journaling for both files is written to the same
      journal, JOURNAL_DISK:[FIELD]SALARY.RMS$JOURNAL.
Close Help