Start Retrieve using OnDemand (STRRTVRDAR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Start Retrieve using OnDemand (STRRTVRDAR) command retrieves a single object in a library that was previously archived. It restores the object description and contents of the object to the library specified on the command. The types of objects that can be retrieved by this command are listed on the Object type (OBJTYPE) parameter.

Top

Parameters

Keyword Description Choices Notes
OBJ Object Name Required, Positional 1
LIB Archived library Name Required, Positional 2
OBJTYPE Object type *ANY, *ALRTBL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CRQD, *CSI, *CSPMAP, *CSPTBL, *DTAARA, *DTAQ, *EDTD, *EXITRG, *FCT, *FILE, *FNTRSC, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IGCTBL, *JOBD, *JOBQ, *JOBSCD, *JRN, *JRNRCV, *MENU, *MODULE, *MSGF, *MSGQ, *NODGRP, *NODL, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SPADCT, *SQLPKG, *SRVPGM, *SSND, *SVRSTG, *S36, *TBL, *USRIDX, *USRQ, *USRSPC, *WSCST Optional, Positional 3
GEN Generation -98-0, *CURRENT Optional
OPTION Option *NEW, *OLD, *FREE, *ALL Optional
FILEMBR File member Values (up to 20 repetitions): Generic name, name, *ALL, *NONE Optional
MBROPT Database member option *MATCH, *ALL, *NEW, *OLD Optional
ALWOBJDIF Allow object differences *NONE, *ALL Optional
RTVLIB Retrieve to library Name, *LIB Optional
RTVASP Retrieve to ASP 1-16, *ARCASP Optional
DLTSAVF Delete save file *OMC, *IMMED Optional
Top

Object (OBJ)

Specifies the name of the object to retrieve. The object you specify will be retrieved from the archive that contains the specified generation.

If the generation of the object does not exist in the archives, a diagnostic message is issued.

This is a required parameter.

Top

Archived library (LIB)

Specifies the name of the library that contains the archived object. If the Retrieve to library (RTVLIB) parameter is not specified, this is also the name of the library to which the object is retrieved. Specify the name of the library.

This is a required parameter.

Top

Object types (OBJTYPE)

Specifies the type of object that is retrieved.

*ANY
The first object type found with the specified object name that was archived from the specified library is retrieved.
object-type
Specify the type of object to be retrieved, such as command (*CMD), file (*FILE), or program (*PGM). For a complete list of object types, position the cursor on the field for the Object type (OBJTYPE) parameter, and press the F4 key while prompting the command.
Top

Generation (GEN)

Specifies which generation of the archived object to retrieve.

*CURRENT
The current archive is restored. This is the newest archive that exists. This is equivalent to specifying a value of 0.
-98-0
Each archive of the object represents a new generation. To retrieve the most recent archive, specify the value 0. To retrieve the one before that, specify the value -1. Up to 99 generations may be retained. The maximum for a particular object is controlled by the object policy that is used when it is archived. If you specify a generation that does not exist, a diagnostic message is issued that also tells you how many generations do exist.
Top

Option (OPTION)

Specifies under what conditions the object is retrieved to disk.

*NEW
The object is retrieved only if it does not already exist in the library.
*OLD
The object is retrieved only if it already exists in the library.
*FREE
The object is retrieved only if it already exists in the library on the system with its storage freed.
*ALL
The object in the archived library is retrieved to the library on the system regardless of whether it already exists or not in the library on the system.
Top

File member (FILEMBR)

Specifies the database file members to restore. This parameter cannot be specified if *MATCH is specified on the Database member option (MBROPT) parameter.

The Object type (OBJTYPE) parameter must be *ANY, or *FILE.

You can enter multiple values for this parameter.

The member name values are:

*ALL
All members are retrieved from the specified file.
*NONE
No members are retrieved from the specified file. Only the file description is retrieved.
generic*-member-name
Specify the generic name of the members to retrieve from the specified file.
member-name
Specify the name of the member to retrieve from the specified file.
Top

Database member option (MBROPT)

Specifies, for database files already known to the system, which members are restored. Unless *MATCH is used, the member list in the archived file need not match, member for member, the current version on the system.

*MATCH
The archived members are retrieved if the members in the archived file match, member for member, with the members in the current system version.
*ALL
All members in the archived file are retrieved.
*NEW
Only new members (members not known to the system) are retrieved.
*OLD
Only members already known to the system are retrieved.
Top
Top

Retrieve to library (RTVLIB)

Specifies whether the object is retrieved to a different library or to the same library from which it was archived.

*LIB
The object is retrieved to the same library from which it was archived.
name
Specify the name of the library where the archived object should be placed.
Top

Retrieve to ASP (RTVASP)

Specifies whether the object is retrieved to the auxiliary storage pool (ASP) from which it was archived or to another ASP. Objects may be retrieved to user ASPs (2 through 32). However, some objects cannot be restored to user ASPs.

More information about object types which can be restored to user ASPs is in the operating system's Backup and Recovery. If the library exists in the system ASP, journals, journal receivers, and save files can be restored to user ASPs. All other object types will be restored to the ASP of the library.

*ARCASP
The object is retrieved to the ASP from which it was archived.
1-32
When the specified ASP is 1, the object is retrieved to the system ASP, and when the ASP ranges from 2 through 32, the object is retrieved to the user ASP specified.
Top

Delete save file (DLTSAVF)

Specifies if the temporary save file should be deleted by this command or retained and managed by the Object Management Cycle (OMC). If you are retrieving multiple objects from the same archive by issuing multiple commands, then you don't want to delete this temporary save file until the last object has been retrieved.

*OMC
The temporary save file is managed by OMC. The retention value specified in the object policy determines how long the save file is kept on disk.
*IMMED
The temporary save file is deleted when this command completes.
Top

Examples

Example 1: Simple Example

STRRTVRDAR OBJ(ACCTDETAIL) LIB(ACCTINGLIB)

This command retrieves a single object in a library that was previously archived using OnDemand Object Archive. This command example retrieves the most current generation of any object type with the name ACCTDETAIL that was archived from the ACCTINGLIB library, and places it back into the ACCTINGLIB library on disk.

Example 2: More Complex Example

STRRTVRDAR OBJ(ACCTDETAIL) LIB(ACCTINGLIB) OBJTYPE(*FILE) GEN(-1)
             RTVLIB(ACCTINGTMP) DLTSAVF(*IMMED)

This command is similar to Example 1 but only retrieves *FILE object types. It retrieves not the most current generation of the file, but instead retrieves the one PRIOR to the most current archived generation. This example also places the retrieved file into an alternate library called ACCTINGTMP and immediately deletes the OnDemand Object Archive save file that contained the object that was retrieved.

Top

Error messages

*ESCAPE Messages

CPF1338
Errors occurred on SBMJOB command.
RDR0320
&1 Stored reports checked, &2 processed, &3 failed
Top