Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

VERIF - Recover file

Macro type: type S (E form/L form); see "Macro types"

The VERIF macro is used to recover files, file generations or file generation groups which, due to a system crash or the abortion of a job, have not been closed correctly.

The macro can be used to

  • clear a file lock so that the file becomes generally accessible again

  • recover a disk file: the catalog entry is updated and, if necessary, the file is closed. ISAM files are recovered on the basis of the existing records.

Note

If file access was interrupted while there were data buffers in main memory, the last changes made to the file may be missing in the recovered file, since the buffer contents are transferred to external storage only when the buffer becomes full.

The user can unlock disk files and tape files reserved exclusively with the SECURE-RESOURCE-ALLOCATION command if the job causing the lock has been terminated by the system with the console message TASK PENDED INDEFINITELY.

Disk files which were not locked via the SECURE-RESOURCE-ALLOCATION command can only be unlocked by the system administrator.

The associated crypto password must be specified to reconstruct an encrypted ISAM file.

Format

Operation

Operands

VERIF

pathname1[,pathname2][,MF = L]

[,REPAIR = YES / ABS / NO / CHECK]

MF = (E,adr / E,(r))

Operand descriptions

pathname1

Specifies the path name of the permanent or temporary file, file generation group or file generations to be recovered:
<c-string 1..54: filename 1..54>

“pathname1” means [:catid:][$userid.]filename

catid
Catalog ID;
Default value: the catalog ID assigned to the user ID.

userid
User ID;
Default value: the user ID specified in the SET-LOGON-PARAMETERS or LOGON command.

filename
Fully qualified name of a permanent or temporary file, file generation, or file generation group.

pathname2

Designates the file in which the ISAM file “pathname1” is to be reconstructed;
with <c-string 1..54: filename 1..54>

“pathname2” is relevant only for the recovery of ISAM files and must not be the same as “pathname1”. “pathname2” may be the name of a permanent or temporary file or file generation but not the name of a file generation group. If “pathname2” is omitted, the system creates a work file for reconstruction of the ISAM file. However, “pathname2” must be specified if the ISAM file is stored on private disk with its index and data sections on separate disks. If an encrypted file needs to be reconstructed, “pathname2” is assigned the same encryption attributes as “pathname1”.

“pathname2” means [:catid:][$userid.]filename

catid
Catalog ID; default value: the catalog ID belonging to the user ID.

userid
User ID; default value: the user ID specified in the SET-LOGON-PARAMETERS or LOGON command.

filename
Fully-qualified file name of a permanent or temporary file, or a file generation. File generation groups must not be specified.

REPAIR

Specifies how the files defined by “pathname1” are to be recovered. Reconstruction depends on the access method with which the files were created.

“Clearing a file lock” means that the entry for the file in the file lock table is deleted.

Concurrent copy locks remain in place if the concurrent copy session has not yet ended. With REPAIR=YES/ABS/CHECK, a requested reconstruction or consistency check is still performed. For REPAIR=NO, see the operand description under “Notes”.

Only REPAIR=NO is permitted for tape files and file generation groups.

= YES
Only for disk files

PAM:
The pointer to the last PAM page which was written (i.e., the last-page pointer LPP) is set to the highest possible value. This corresponds to the actual size of the file (with BLKCTRL=PAMKEY) or to the file size rounded up to a multiple of the block size (with BLKCTRL=DATA/NO). In this case the last-page pointer is also incremented to a block boundary.

The file is closed.

If a mirrored disk (DRV) is available, the file will be equalized.

SAM:
The highest PAM page written in the file is determined, and the last-page pointer (LPP) is set to this value.

If the file is on a mirrored disk (DRV), the contents of the blocks contained in it are restored by equalization if required.

The file is closed.

ISAM:
The file lock is cleared. If the file is marked as open, it is reconstructed.

= ABS
Only for disk files
The reconstruction is performed regardless of whether or not the file is identified as open.

PAM:
The file lock is cleared and the last-page pointer is updated to point to the last PAM page actually written and the last-byte pointer to a block boundary provided that the file is marked as open; otherwise the last-page pointer and the last-byte pointer remain unchanged.

In the case of files opened with BLKCTRL=PAMKEY/DATA, the highest written PAM page in the file is determined, and the last-page (LPP) pointer is set to that value.

For files opened with BLKCTRL=NO, the LPP is set to the highest possible PAM page (i.e. the file size, rounded up to a multiple of the block size).

If the file is open and on a mirrored disk (DRV), the contents of the blocks contained in it are restored by equalization if required.

The file is then closed (if required).

SAM:
The file lock is cleared. Even if the file is not marked as open, the last-page pointer is updated to point to the last PAM page actually written, and the file is then closed (if required).

ISAM:
The file lock is cleared and the file is reconstructed.

The verification process (with reconstruction) for the SAM and ISAM access methods is analogous to REPAIR =YES.

= CHECK
Only meaningful for NK-ISAM files processed with WROUT=YES:
only files which are marked as open are selected. The file lock is cleared, the last-page pointer is updated to point to the last page which was written, data blocks which consist of more than one PAM page (multiblocks) are checked for consistency of the blocking structure, and the file is closed.

The file lock is cleared. If the file is identified as open, the pointer to the last PAM block is set to the highest written page; multi-blocks are checked for consistency, and the defined secondary keys are verified to ensure that they have been created or deleted completely.

If the file is on a mirrored disk (DRV), the contents of the blocks contained in it are restored by equalization if required.

If no error was detected, the file is closed.

The “consistency of multi-blocks” implies that no abort occurred when writing a multiblock.

= NO
For tape input files:
“filename” must be fully qualified; the file lock is cleared.

For disk files:
PAM – The file lock is cleared. The file is not regarded as closed, i.e. it will still be included in the output from FSTAT ..., STATE= NOCLOS, and will be regarded as a file which is to be repaired for VERIF ..., REPAIR=YES.

SAM:
The file lock is cleared. The file is not regarded as closed, i.e. it will still be included in the output from FSTAT ..., STATE= NOCLOS, and will be regarded as a file which is to be repaired for VERIF ..., REPAIR=YES.

ISAM:
The file lock is cleared. If the file is marked as open, the system executes a privileged close operation and the last-page pointer is updated to point to the last PAM page written. The file is not reconstructed.

If the file is on a mirrored disk (DRV), the contents of the blocks contained in it are restored by equalization if required.

Inconsistencies between the INDEX and data section are neither detected nor removed in the process.

This also applies to inconsistencies with regard to the secondary keys. The file is considered to be closed, i.e. will not be reported by FSTATUS, STATE=NOCLOS and will not be flagged as a file requiring repair by VERIFY ..., REPAIR=YES.

Note on “concurrent copy” save procedure

Concurrent copy locks in a file are set up by the system/HSMS (see the “HSMS” manual [10]). The user can only remove these locks once the save procedure (concurrent copy session) is over. The following should be noted with respect to return codes:

      • If a file is locked via both file locks and concurrent copy locks, a positive return code will be issued if the file locks could be removed.

      • If, however, a file is locked only via a concurrent copy lock, a positive return code will only be issued once the concurrent copy session is over, otherwise a negative return code will be issued.

MF

For a detailed description of the MF operand, refer to the Appendix ("Macro types").

Programming notes

If the macro is executed successfully, the contents of register 15 are set to zero. The error codes for unsuccessful execution are defined in the IDEMS macro.

Reconstruction of ISAM files

  • If “pathname2” is not specified for an ISAM file on public volumes, this file is reconstructed in a work file created by the system. The file “pathname1” is then erased without “DESTROY” (see the CATAL macro, DESTROY operand, "CATAL - Process catalog entry"), and the work file is renamed “pathname1”.

    If “pathname2” is not specified for an ISAM file on private volumes or on a Net-Storage volume, this file is reconstructed in a work file on public volumes. The work file is then copied into the file “pathname1” and then erased by means of “DESTROY” (see the CATAL macro, DESTROY operand, "CATAL - Process catalog entry"). This may take a very long time and it is therefore better to specify “pathname2”.

  • If “pathname2” is specified in the VERIF macro, the file “pathname1” is reconstructed in this file and “pathname1” remains unchanged. If “pathname2” is to be on a private disk or on a Net-Storage volume, or if the file “pathname1” is an ISAM file with its index and data sections on separate disks, “pathname2” must be cataloged before the VERIF macro is issued and space must also be reserved for it.

    Records with identical index and data are transferred only once to the reconstructed file.

  • No space is reserved in the data blocks of the reconstructed file for subsequent expansion (equivalent to specifying PAD=0 in the FILE macro).

    ISAM files with their data and index blocks on separate volumes can be reconstructed by means of the VERIF macro only if BLKSIZE=STD applies.

  • If an ISAM data block contains data which cannot be assigned to a defined record, the entire block is saved in the PAM file “S.filename1.REPAIR”. After VERIF processing has been completed, the user can use this file for his/her own reconstruction efforts. If the new file name would be too long, “filename1” is truncated as required.

  • Since a copy of the file is created during reconstruction of an ISAM file, and since this copy occupies part of the public space, the user must ensure that sufficient storage space is available.