Start Archive using OnDemand (STRARCRDAR)

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

The Start Archive using OnDemand (STRARCRDAR) command archives a copy of a single object or a group of objects located in the same library. The specified objects are archived by writing a copy of each object to the archive media as specified in the object policy (either optical or tape). The objects on the system are not affected unless the command specifies that the storage should be freed. The history for the object is not updated with the fact that it was archived. Only a save of the object using one of the system save commands will update the object's history.

Top

Parameters

Keyword Description Choices Notes
OBJ Object Generic name, name, *ALL Required, Positional 1
LIB Library Name Required, Positional 2
OBJTYPE Object type *ALL, *ALRTBL, *BNDDIR, *CHTFMT, *CLD, *CLS, *CRQD, *CMD, *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
STG Storage *KEEP, *FREE Optional
DETAIL Detail *BASIC, *FULL Optional
TEXT Text 'description' Character value, *BLANK Optional
RESTART Restart *NO, *YES Optional
Top

Object (OBJ)

Specifies the names of an object or the generic name of a group of objects to be archived. All the objects must be in the same library, specified on the Library (LIB) parameter. If the Object type (OBJTYPE) parameter is not specified, all the object types listed in the description of that parameter are archived provided they have the specified names.

This is a required parameter.

*ALL
All the objects in the specified library of the type specified by the Object type (OBJTYPE) parameter are archived.
generic*-object-name
Specify a generic name for the group of objects in the specified library to be archived.
object-name
Specify the name of a specific object to archive.
Top

Library (LIB)

Specifies the library that contains the objects to archive. Type the name of the library.

This is a required parameter.

Top

Object type (OBJTYPE)

Specifies the types of system objects to archive. For a complete list of object types that can be archived, move the cursor to the field for the Object type (OBJTYPE) parameter and press the F4 key.

*ALL
All object types that are specified by name and are in the specified library are archived. If *ALL is also specified on the Object (OBJ) parameter, then all the objects in the library that are of the types that can be saved are archived.
object-type
Specify the value for each of the types of objects that are archived, such as command (*CMD), file (*FILE), or program (*PGM).
Top

Storage (STG)

Specifies whether the system storage that is occupied by the data portion of files, programs, Structured Query Language (SQL) packages, and journal receivers in the library being archived is freed as part of the archive operation. Only the data portion of the objects is deleted (freed) not the descriptions of the objects.

*KEEP
The storage occupied by the data portion of the archived objects is not freed.
*FREE
The storage occupied by the data portion of the files, programs, SQL packages, and journal receivers being archived is freed as part of the archive operation. The storage for all the objects in a library is freed only after all the objects in that library are archived successfully.

Note: To prevent the abnormal end of a program, the program being archived must not be running in the system if *FREE specified.

Top

Detail (DETAIL)

Specifies the amount of detail that is provided about the archive operation. This information is printed with the job's spooled output in the printer file QPRLOARC.

*BASIC
A list of the parameters specified on the command, the object policy used and statistics about the archive are listed.
*FULL
In addition to the information provided by the *BASIC parameter, a list of each object archived is provided.
Top

Text 'description' (TEXT)

Specifies text that briefly describes the archive.

*BLANK
No text is specified.
'description'
Specify no more than 50 characters of text, enclosed in apostrophes. This text is stored by OnDemand, along with other object information. This text also appears in the printer file QPRLOARC that is printed when you archive objects.
Top

Restart (RESTART)

Specifies whether this is a restart of a previously failed archive.

*NO
This is not a restart of a previously failed archive.
*YES
This is a restart of a previously failed archive.
Top

Examples

Example 1: Simple Example

STRARCRDAR OBJ(MYOBJECT) LIB(MYLIB)

This command archives objects of any type in MYLIB library by the name of MYOBJECT into OnDemand Object Archive.

Example 2: More Complex Example

STRARCRDAR OBJ(MYOBJECT) LIB(MYLIB) OBJTYPE(*FILE)

This command is similar to Example 1 but archives only objects of type *FILE.

Top

Error messages

*ESCAPE Messages

RDR1001
Previous archive for library &1 failed and RESTART(*NO) was specified.
RDR1002
Archive for library &1 already in progress
RDR1003
Archive restart failed.
RDR1005
Archive failed. &1 objects successfully archived.
RDR1006
Archive failed. No objects archived.
RDR1007
Object Control Table (OCT) missing default entry.
RDR1008
Object policy &1 not found.
Top