Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

IMPORT Transfer saved data

&pagelevel(4)&pagelevel

The IMPORT statement permits files, catalog entries or job variables which were saved to tape, disk or MT cartridge in the same EXPORT run to be transferred to another BS2000 system or to another user ID (RENAME).

The files and/or job variables to be processed must be specified with the FILES and/or JOBVAR statement before the IMPORT statement is entered.

I[MPORT]

DIR[ECTORY] = NONE / filename

,FR[OM] = svid / [svid,](vsn,...),...
,DEVICE = TAPE-C4 / device type
,DRIVES = 1 / integer

,CONSISTENCY-CHECK / CONS-CHK = NO / YES

,REP[LACE] = NO / YES / ALL / ALLP
,SPACE = REORG / KEEP
,CONV[ERSION] = STD / NO / CONV

,NOW = YES / NO[,TIME = sec]
[,P[ASSWORD] = password / (password,...)]
,L[IST] = { SYSLST / SYSOUT / BOTH / NONE } [,ALL]


DIRECTORY =

This specifies whether a directory file is used for an IMPORT run.

DIRECTORY = NONE
Unless otherwise specified, IMPORT runs are executed without a directory file.

DIRECTORY = filename
Name of the directory file used for the EXPORT run. The file must first be imported in a separate IMPORT run with DIRECTORY=NONE.

FROM =
This specifies the input volumes or save version from which the files or job variables are to be read. The FROM operand must be specified for IMPORT runs.
Only those files are read in which are stored in full on the specified volumes.  

When importing a volume created by HSMS in several-svid mode, the SVID (not the SFID) must be specified.

FROM = svid
Every file or job variable requested in the FILES or JOBVAR statement and belonging to this save version (svid) is read in. A directory file must be specified.

FROM = (vsn,...)
Every required file or job variable on the specified volumes is imported.
The volumes must be listed in the order in which they were recorded during export.
If a directory file is used, only those files located in their entirety on the specified volumes are read in.

FROM = (vsn,...),(vsn,...)
When files or job variables saved in parallel runs are imported, the volumes must be grouped according to the parallel runs, i.e. the volumes of a parallel run must be specified in each parentheses in the order in which they were written to.

Data of an export run which was saved using

FILES
EXPORT ...,DRIVES=2,TAPES=(vsn1,vsn2)

and distributed according to the EXPORT listing in two parallel runs over vsn1 and vsn2 must be transferred as follows:

FILES
IMPORT ...,DRIVES=2,FROM=(vsn1),(vsn2)

An attempt to import the files with

IMPORT ...,DRIVES=2,FROM=(vsn1,vsn2)

causes the run to abort because ARCHIVE cannot allocate the volumes correctly.

FROM = svid,(vsn,...)
See previous operand value.
In addition, if a directory file is specified, ARCHIVE checks whether the specified volumes belong to this save version. Should this not be the case, the run is aborted.
This entry is mandatory for IMPORT runs from disk.

DEVICE = TAPE-C4 / device type
This operand is used to define the device type. It must be the same as the one used for the EXPORT run.
The DEVICE operand defines the device type for all the VSNs. This also applies to VSNs only specified indirectly, e.g. in FROM=svid.

DRIVES = 1 / integer
This specifies the number of parallel runs (maximum 16).

The number of parallel runs should correspond to the number defined for the appropriate EXPORT run.

CONSISTENCY-CHECK / CONS-CHK =
This determines whether a consistency check of the save data is carried out.

CONSISTENCY-CHECK = NO
No consistency check is carried out.

CONSISTENCY-CHECK = YES
Before transferring save data, the check bytes are calculated and a comparison is made with the check bytes stored with the save data during EXPORT. If an error occurs, the message ARC0413 is output.

This operand value is ignored if the EXPORT operation was carried out with the CONSISTENCY-CHECK=NO operand.


REPLACE =

This specifies whether or not existing job variables and files are to be replaced.

REPLACE = NO
A file or job variable is not read in if one with the same name already exists under this user ID. In this case a message is output.

REPLACE = YES
If a file or job variable with the same name already exists, it is replaced by the file or job variable from the save run.

However, a file or job variable is not replaced if

  • only read access is permitted for it,

  • it has an expiration date (EXPIR DATE) in the catalog which is later than the current date, or

  • it is protected by a password which has not been specified.

REPLACE = ALL
If a file or job variable with the same name already exists, it is replaced by the saved file or job variable. The file or job variable is replaced even if only read access is permitted for it or if the expiration date has not yet been reached. If the existing file is protected by a password, however, the password must be specified.

REPLACE = ALLP
This operand is only permitted with the TSOS privilege. It permits files or job variables protected by passwords to be replaced by the corresponding files from the save run without the passwords having previously been specified.
Otherwise the same applies to the ALLP operand as for ALL.

SPACE =
This specifies whether or not files to be replaced by files with the same names from the save run are to be deleted before restoration.

SPACE = REORG
Files to be replaced by files with the same names from the save run are deleted before restoration. Usually the file then occupies a different disk extent after restoration. Thus restoration runs with SPACE=REORG have the effect of reorganizing the disks. 

SPACE = KEEP
Files to be replaced by files with the same names from the save run are overwritten in the extents which they occupy at the time of the restoration.
The specification SPACE=KEEP overrides any definitions of storage areas for the file to be written back.

Example

The file HUGO is to be restored with SPACE=KEEP. Let us assume that there is already a file of this name on the private disk PRIV01. If TO=PUBLIC is then specified for this run in the FILES statement, ARCHIVE still writes the file back to the private disk PRIV01. In other words the specification SPACE=KEEP overrides the specification TO=PUBLIC


The specifications in the SPACE operand are ignored if REPLACE=NO has also been specified.

Specifications in the SPACE operand are ignored for file generation groups. FGGs are always deleted before restoration.

The following points must be borne in mind for ISAM files with a separate file index section and file data section:

  • The file in the system must have the same logical structure as the saved file (i.e. the index blocks and data blocks must occupy the same logical blocks).

  • The access method must be ISAM.


The SPACE operand is irrelevant for catalog entries for files on tape or MT cartridge. The catalog entries are always deleted when REPLACE=YES is specified.

CONVERSION =
This operand controls whether files which had a PAM key when they were saved must be converted if the output volume is an NK disk (see the table in the section "NK4 disks").
The operand is ignored for job variables.
Entering CONVERSION=STD / CONV requires the PAMINT subsystem.
In the case of partially saved files, only the CONV entry is possible.
If a conversion file which is to be imported already exists, it is always reorganized; the SPACE operand is ignored.

CONVERSION = STD
In IMPORT runs to an NK disk, files with a PAM key are converted by means of PAMINT in accordance with the following rules:

  • K-ISAM files to NK-ISAM files
    (BLOCK-CONTROL-INFO=WITHIN-DATA-BLOCK)

  • K-SAM files to NK-SAM files
    (BLOCK-CONTROL-INFO=WITHIN-DATA-BLOCK)

  • K-UPAM files to NK-UPAM files
    (BLOCK-CONTROL-INFO=NO)
    PAM files whose structure is known (load modules, libraries) are converted accordingly; in the case of PAM files whose structure is not known, the PAM key information is lost. If the PAM key contained information, an appropriate message is issued.

CONVERSION = NO
Files with a PAM key are not converted in IMPORT runs to an NK disk and are thus not restored.

CONVERSION = CONV
In an IMPORT run to an NK disk, files with PAM keys are converted to “CONV format” by means of PAMINT. The restored file contains all the PAM keys at the end of the file in separate blocks.

NOW =
This operand specifies when the IMPORT statement is to be executed.

NOW = YES
The IMPORT statement is executed immediately.

NOW = NO
The IMPORT statement is checked for syntax errors and the written to the queue file ARCHIVE.LATER. This process is given the ARCHIVE identifier L.yymmdd.hhmmss. The identifier is only allocated if no LATER job exists in the same task at the time. If this is not the case, then the process is stored under the existing identifier.
The LATER job can be started by means of a PROCESS statement or deleted by means of a DELETE statement.

NOW = NO,TIME=sec
The number of CPU seconds that are available to this process when it is started. This entry corresponds to the operand CPU-LIMIT in /START-(EXECUTABLE-)PROGRAM.

PASSWORD = password / (password,...)
If you specify the operand NOW=NO, you must enter passwords here for

  • files or job variables to be imported which are protected by read passwords;

  • the directory file, if it is protected by a read password and is not under TSOS;

  • the save version, if it has been protected by a password with SVPASS.

  • magnetic tapes and MT cartridges that are protected by a password (max. 4 characters) under MAREN.

In all other cases, you should enter the passwords with the /ADD-PASSWORD command before ARCHIVE is called. Only in this case are the passwords also valid for the subsequent ARCHIVE runs of the same user task.

The system support can process files and job variables without specifying the passwords. The password for the directory file must, however, be specified if it is assigned to a foreign user ID.

LIST =
This defines the output medium for the report of this ARCHIVE run.

LIST = SYSLST
The report is output to SYSLST.

LIST = SYSOUT
In an interactive task, the report is output to the terminal.

LIST = BOTH
The report is output to both SYSLST and SYSOUT.

LIST = NONE
No report is generated.

LIST = ...,ALL
All the file names and job variables on the volumes read in are listed. If a save version (svid) has also been specified in the FROM operand, all the files belonging to this save version are listed (not only those specified in the FILES and/or JOBVAR statements).

IMPORT statement notes

  • After an EXPORT run to disk, the save file ARCHIVE.SAVE.FILE.date.time.vsn is deleted from the catalog. It must therefore be imported via the IMPORT-FILE command before an IMPORT run.

  • Catalog entries which were saved in an EXPORT run with CATONLY=YES are not restored if RENAME=... is specified for them in the FILES statement when reading the files in.

  • If the FILES statement does not contain a TO operand, the files are written to public volumes, irrespective of which volume the files resided on before the save operation.