Purpose
Copies one table or all tables from a file to an area.
Syntax
┌─────────────────────────────────────────────────────────────────────┐ ►►─▼─ IMPort ┬──────────────────────────────────────┬┬──────────────────┬┴─ . ─►◄ ├─ ALL ◄──┬────────────┬───────────────┤└─ AREa area-name ─┘ │ └─ WITh TDN ─┘ │ └─ TDN tbl-def-no ─┬──────────────────┬┘ ├─ AS TDN new-tdn ─┤ └─ WITh TDN ───────┘
Parameters
Copies all tables from the file.
By default, if you do not specify a table definition number, each imported table will get the next available table definition number.
Specifies that each imported table get its original table definition number.
Specifies the table to import.
The table definition number of the table to import.
Directs IDMSRADM to give the table a new table definition number.
new-tdn The new table definition number of the imported table.
Directs IDMSRADM to give the table its original table definition number.
The name of the area to import the table(s) into.
Usage
You can reset the default area with another SET statement.
You can override the default area by specifying another area on an IMPORT statement.
Specifying the area as a blank enclosed by double quotes (" ") sets the import area to the area from which the table was exported.
Conflicting Table Definition Numbers
If the target area already contains a table with the specified or default table definition number of a table to be imported, IDMSRADM prints an error message and does not import the table.
If you are importing more than one table, and some have conflicting table definition numbers, an error message will be printed for each case of conflict, but tables with non-conflicting table definition numbers will be imported.
Default Area Names
If you do not specify an area in the IMPORT statement, IDMSRADM imports into the area specified by the SET AREA statement. If you did not include a SET AREA statement, IDMSRADM uses the name of the area from which the table was exported.
Importing Tables to a Specific Area
You can import either single or multiple tables to a named area.
Import single tables to an area
To import single tables to an area, specify the area on the IMPORT statement.
Import two or more tables to the same area
To import two or more tables to the same area, set a default area name prior to the IMPORT statement.
Subsequent imports to the same area
For subsequent imports to the same area, you don't have to re-specify the area. You can override the default area by specifying an area on another IMPORT statement. You can also change the default by specifying another SET command.
Examples
Example 1
Importing specific tables to a default area
SET AREA ABC IMPORT TDN 123. IMPORT TDN 204. SET AREA " ". IMPORT TDN 333. IMPORT TDN 527. BYE.
Example 2
Overriding the default area to import specific tables
SET AREA ABC IMPORT TDN 123. IMPORT TDN 572 AREA EMP. IMPORT TDN 415. IMPORT TDN 501 AREA EMP. BYE.
Example 3
Specifying a default owner for importing
SET AREA DEPT SET OWNER USER1. IMPORT TDN 123. IMPORT TDN 395. SET OWNER " ". IMPORT TDN 934. BYE.
Example 4
Specifying commits
SET COMMIT 25. SET AREA DEPT. IMPORT TDN 802. BYE.
Example 5
Importing tables with table-definition numbers
SET AREA EMP. SET OWNER USER1. IMPORT TDN 415 WITH TDN. IMPORT TDN 578 AS TDN 398.
|
Copyright © 2014 CA.
All rights reserved.
|
|