Troubleshooting
Problem
This document explains how to restore a single member from a source physical file.
Resolving The Problem
If unsure what the source file and its member are, run the DSPPGM command to get the source file name, the library it is in, and what the source file member name is.
For example, DSPPGM includes information as follows:
Program creation information:
Program creation date/time . . . . . . . . . . . : 03/22/01 12:15:38
Type of program . . . . . . . . . . . . . . . . : OPM
Source file . . . . . . . . . . . . . . . . . . : QCLSRC
Library . . . . . . . . . . . . . . . . . . . : QGPL
Source member . . . . . . . . . . . . . . . . . : QSTRUP
It is safer to first restore the source member into a source file in another library and copy that into the original source file. This provides an opportunity to verify the contents of the source file member before it is replaced or restored.
Because it is recommended that this source file member be restored into a different library (such as TEMP) first, you should do the following:
If you want to restore a new member directly into the desired file, it is recommended that you save the entire file first and then try one of the following commands:
RSTOBJ OBJ(QCLSRC) SAVLIB(QGPL) DEV(TAPnn) +
ALOWOBJDIF(*COMPTIBLE) FILEMBR((*ALL (QSTRUP))) MBROPT(*NEW) RSTLIB(GQPL)
or
RSTOBJ OBJ(QCLSRC) SAVLIB(QGPL) DEV(TAPnn) +
ALWOBJDIF(*AUTL *FILELVL *OWNER *PGP) +
FILEMBR((*ALL (QSTRUP))) MBROPT(*NEW) RSTLIB(QGPL)
There is a risk that the restore might replace the entire QCLSRC file and restore single member QSTRUP if correct options are not taken. In that case you can run RSTOBJ using media saved for SAVOBJ command.
For example, DSPPGM includes information as follows:
Program creation information:
Program creation date/time . . . . . . . . . . . : 03/22/01 12:15:38
Type of program . . . . . . . . . . . . . . . . : OPM
Source file . . . . . . . . . . . . . . . . . . : QCLSRC
Library . . . . . . . . . . . . . . . . . . . : QGPL
Source member . . . . . . . . . . . . . . . . . : QSTRUP
It is safer to first restore the source member into a source file in another library and copy that into the original source file. This provides an opportunity to verify the contents of the source file member before it is replaced or restored.
Because it is recommended that this source file member be restored into a different library (such as TEMP) first, you should do the following:
1. | On the operating system command line, type the following and press Enter: CRTLIB TEMP |
2. | Type the following, and press Enter: RSTOBJ OBJ(QCLSRC) SAVLIB(QGPL) DEV(TAPnn) + FILEMBR((*ALL (QSTRUP))) MBROPT(*ALL) RSTLIB(TEMP) where TAPnn is the name of tape drive. This will restore only one member, QSTRUP, into source file QCLSRC in library TEMP. |
3. | Run the STRPDM command. |
4. | Select Option 3, Specify the file QCLSRC in library TEMP. This brings up member QSTRUP that was restored. |
5. | Select Option 5, Display and verify its contents. |
6. | Select Option 3 to copy that source member to the target/original source file/library. You may first have to delete that source file member (such as QSTRUP) before it is copied. Note: Make sure that you delete the original member rather than the file. |
RSTOBJ OBJ(QCLSRC) SAVLIB(QGPL) DEV(TAPnn) +
ALOWOBJDIF(*COMPTIBLE) FILEMBR((*ALL (QSTRUP))) MBROPT(*NEW) RSTLIB(GQPL)
or
RSTOBJ OBJ(QCLSRC) SAVLIB(QGPL) DEV(TAPnn) +
ALWOBJDIF(*AUTL *FILELVL *OWNER *PGP) +
FILEMBR((*ALL (QSTRUP))) MBROPT(*NEW) RSTLIB(QGPL)
There is a risk that the restore might replace the entire QCLSRC file and restore single member QSTRUP if correct options are not taken. In that case you can run RSTOBJ using media saved for SAVOBJ command.
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0;7.3.0;7.4.0;7.5.0"}]
Historical Number
25632949
Was this topic helpful?
Document Information
More support for:
IBM i
Component:
IBM i
Software version:
7.2.0, 7.3.0, 7.4.0, 7.5.0
Operating system(s):
IBM i
Document number:
640721
Modified date:
15 October 2024
UID
nas8N1017133
Manage My Notification Subscriptions