IBM Support

Using the LABEL Parameter on SAVLIB and RSTLIB Commands

Troubleshooting


Problem

This document describes how to correctly use the LABEL parameter on SAVLIB and RSTLIB commands to avoid restore problem.

Resolving The Problem

When using the LABEL parameter on the SAVLIB command and saving multiple libraries to the same volume, it is important that the same label is not used for each library. If this is done, the sequence number for the library being restored must be specified on the RSTLIB command.

If the same label is used and the sequence number is not specified (*SEARCH is used), the first library on the tape that has that label is restored.

Example:

SAVLIB LIB(library_a) DEV(MLB7329) VOL(AFV004) SEQNBR(1) LABEL(AAAAAAAA) ENDOPT(*LEAVE)

SAVLIB LIB(library_b) DEV(MLB7329) VOL(AFV004) SEQNBR(*END) LABEL(AAAAAAAA) ENDOPT(*LEAVE)

SAVLIB LIB(library_c) DEV(MLB7329) VOL(AFV004) SEQNBR(*END) LABEL(AAAAAAAA) ENDOPT(*LEAVE)

Then, running the DSPTAP command shows the following:

Record
File Block Recg Record Block File Mvol Mvol
Data File Label Sequence Format Tech Length Length Length Ind Sequence
AAAAAAAA 0000000001 *U P 00000 262144 0000000002 0000000001
AAAAAAAA 0000000002 *U P 00000 262144 0000000025 0000000001
AAAAAAAA 0000000003 *U P 00000 262144 0000013860 0000000001

If the following command is run:

RSTLIB SAVLIB(library_c) DEV(MLB7329) VOL(AFV004) SEQNBR(*SEARCH) LABEL(AAAAAAAA) RSTLIB(library_d)

library_a is restored rather than library_c.

If the following command is run:

RSTLIB SAVLIB(library_c) DEV(MLB7329) VOL(AFV004) SEQNBR(*SEARCH) RSTLIB(library_d)

the following message is issued: CPF3717 - file not selected. File label or file name mismatch for file AAAAAAAA.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

332088914

Document Information

Modified date:
18 December 2019

UID

nas8N1016170