Use this macro to restore a subfile (previously copied by the DBCPY macro)
to a file address that you specify.
- REF=dsectvv
- specifies the file or subfile that you want to access, where
dsectvv is the DSECT name and an optional 2-character version.
- REF=refname
- specifies the file or subfile that you want to access, where
refname is a label that references the DSECT name in one of the
following formats:
- refname
- is the label of an 8-byte field that contains the 6-byte DSECT name and an
optional 2-character version.
- A/refname
- is the label of a 4-byte field that contains the storage address of the
DSECT name and an optional 2-character version.
- FILE=dsect
- specifies the file or subfile that you want to access, where
dsect is the DSECT name.
- R3=address
- specifies the location of the SW00SR slot for this subfile, where
address is the label of a field that contains the address of the
SW00SR slot. Register 3 will be loaded with this address.
- Note:
- Do not use this parameter; it is provided only for migration
purposes. Use the REF parameter to specify the file that you want to
access.
- RSTRADD=fileaddr
- specifies where you want to restore the current subfile, where
fileaddr is the label of a 4-byte field containing the
address.
If this address is set to X'00000000', the DBRST macro creates a
new subfile and restores the current subfile in the new subfile. The
address of the prime block of the new subfile is placed in the SW00FAD field
of the SW00SR.
- HELD
- restores a subfile that is held; that is, one that was opened using
the DBOPN macro with the HOLD parameter specified.
- ALG=algarg
- identifies the subfile that you want to access, where algarg
specifies an algorithm argument.
The TPFDF product uses the algorithm argument to determine the subfile
(ordinal number) that is to be accessed. Specify the algorithm argument
based on the type of algorithm that is defined in the DSECT or DBDEF macro for
the file. If the DSECT or DBDEF macro defines the #TPFDB04 or the
#TPFDB0D algorithm, do not use this parameter.
If the subfile you are accessing is contained in a detail file or
intermediate index file defined with the #TPFDBFF algorithm, the TPFDF product
uses the algorithm argument to locate the subfile. See TPFDF Database Administration for more information about
how the TPFDF product uses the algorithm argument to locate the
subfile.
Specify algarg as one of the following:
- A register that contains the address of the algorithm argument
- A literal value that specifies the algorithm argument (for example,
ALG==C'SMITH')
- A label in one of the following formats:
- algarg
- is the label of a field that contains the algorithm argument.
- A/algarg
- is the label of a 4-byte field that contains the storage address of the
algorithm argument.
- Note:
- Do not modify the area of storage containing the algorithm argument until the
subfile is closed.
- FADDR=faddr
- identifies the subfile that you want to access, where faddr is
one of the following:
- faddr
- is the label of a 4-byte field that contains the file address of the prime
block of the subfile.
- A/faddr
- is the label of a 4-byte field that contains the storage address of the
file address of the prime block of the subfile.
- ORD=ordnum
- identifies the subfile that you want to access, where ordnum is
one of the following:
- ordnum
- is the label of a 4-byte field that contains the ordinal number of the
subfile.
- A/ordnum
- is the label of a 4-byte field that contains the storage address of the
ordinal number of the subfile.
If the file is partitioned or interleaved, specify the relative ordinal
number within the partition or interleave. If the file is not
partitioned or interleaved, specify the file address compute program (FACE)
ordinal number.
- CHKA=rcc
- checks the record code check (RCC) value in each block, where rcc
is the label of a 1-byte field that contains the RCC character.
- NOCHK
- specifies that you do not want to check the record code check (RCC) value
of the blocks.
- ERROR=spmlbl
- branches to the specified location if a serious error is detected when
processing the macro, where spmlbl is a TPFDF structured program
macro (SPM) label defined with the #LOCA macro. See TPFDF and TPF Structured Programming Macros for more
information about the #LOCA macro. See Identifying Return Indicators and Errors for more information about serious errors.
- ERRORA=asmlbl
- branches to the specified location if a serious error is detected when
processing the macro, where asmlbl is an assembler label. See Identifying Return Indicators and Errors for more information about serious errors.
- FLIP
- exchanges the contents of 2 subfiles rather than overwrites the original
subfile with its modified copy.
If you specify the FLIP parameter, the DBRST macro transfers the subfile
currently located at the file address you specify with the RSTRADD parameter
with the subfile that is currently open.
The SW00SR now references the subfile specified with RSTRADD rather than
the subfile that was originally opened.
- FROMCHAIN
- restores only the prime block of the subfile. Any overflow blocks
in the subfile are chained to this new prime block without copying the
overflow blocks to new pool blocks.
- INTERLV=intrlvnum
- specifies the number of the interleave that you want to use, where
interlvnum is one of the following:
- A register that contains the address of the interleave number
- An absolute value representing the interleave number
- The label of a 2-byte field that contains the interleave number.
If you specify this parameter, the maximum interleave number must be
defined in the DSECT or DBDEF macro. See TPFDF
Database Administration for more information about interleaves.
- PARTITN=partitnum
- specifies the number of the partition that you want to use, where
partitnum is one of the following:
- A register that contains the address of the partition number
- An absolute value representing the partition number
- The label of a 2-byte field that contains the partition number.
If you specify this parameter, the number of partitions and the end ordinal
must be defined in the DSECT or DBDEF macro. See TPFDF Database Administration for more information about
partitions.
- Note:
- Do not use this parameter with the #TPFDB0F algorithm. This
algorithm calculates the partition used from the algorithm argument.
See TPFDF Database Administration for more
information about algorithms.
- NODUMP
- specifies that you do not want the TPFDF product to issue any of the
following system errors while processing this macro:
- DB0100
- DB0102
- DB0117
- DB0123
- DB0138
- DB0140.
See Messages (System Error, Online, Offline) and
Master Glossary for more information about these system errors.
- Note:
- Using the NODUMP parameter is not recommended because it can prevent system
errors from being issued that indicate a critical problem.
- NOPGM
- specifies not to change the program stamp in a block when filing
it.
- PATH
- specifies the path for a detail subfile using index support. If
there is only one index path, do not specify this parameter. Specify
one of the following:
- pathnum
- is the path number or the label of a 2-byte field that contains the path
number. The number of index paths used is defined by your database
administrator.
- ALL
- specifies all paths.
See TPFDF Database Administration for more
information about path numbers.
- REG=register
- specifies a register in which to return the address of the current LREC
(this address is contained in SW00SR field SW00REC). You must specify
this parameter for T-type files.
- REGD=register
- specifies a register in which to return the base address of the userLREC
part of an extended LREC.
- SEQ=seqaddr
- specifies an update sequence number, where seqaddr is the address
of a 2-byte field that contains the number. The number you provide must
match the sequence number contained in the subfile that is specified by the
RSTRADD parameter.
If the numbers do not match, the DBRST macro does not proceed and issues an
error return. If the numbers match, the DBRST macro restores the
subfile and increases the sequence number by 1. This sequence number is
placed in the prime block of the restored subfile.
- SUFFIX=char
- allows you to use the same DSECT to map two different areas of storage,
where char is the suffix character.
Before you can use the DBRST macro, you must make a copy of a subfile using
the DBCPY macro. You can modify this copy using other TPFDF
macros.
The restored file (with any modifications you have made to the copy)
becomes the currently open subfile. You can continue processing it
using other TPFDF macros. The copy is released unless you use the FLIP
parameter.