Using Import/Export Functions in Batch Mode

This document covers the following topics:


Required JCL Specifications

For mass import or export, you are recommended to use import/export functions in batch mode and consider the following for your JCL:

  • The LFILE parameters must be set as described in Mandatory Parameter Blocks/Parameters in the Installation and Setup documentation.

  • The JCL must contain a LOGON SYSEOR statement followed by an IE program call and the parameters required to specify the objects to be imported or exported.

  • Whenever a parameter is not required in the JCL (for example, no library if the location is WRK), enter a hyphen (-) for this parameter.

  • During import or export, information about the process is written to the SYSOUT. When the import or export operation terminates, it writes a last message to the SYSOUT, to inform you that the function ended successfully.

This section covers the following topics:

Example of JCL for Export

//EXPOBAT  JOB  BSP,CLASS=L,MSGCLASS=X,MSGLEVEL=1
//*********************************************************
//** IE-EX--P OWNER,WRK,-,-,N,N,N,N,N,REQUEST
//**  -> EXPORT ALL FROM OWNER REQUEST WITHOUT RELATED OBJECTS
//** IE-EX--P NETWORK-MASTER,WRK,-,-,N,N,Y,NATQA,P205753*,*
//** IE-EXA-P WRK,-,-,N,N,N,N,N
//** -> EXPORT ALL         
//**
//*********************************************************
//EXPORT   EXEC PGM=NATBATvr,REGION=3000K,
//  PARM=('PROFILE=NOPvrJOB')
//STEPLIB  DD   DSN=NATURAL.QA.LOAD,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//CMPRINT  DD  SYSOUT=*
//CMWKF01  DD  DISP=SHR,DSN=EXPOBAT.TEMP(NOPOBJ1)
//CMSYNIN   DD *
LOGON SYSEOR
IE-EX--P OWNER,WRK,-,-,N,N,N,N,N,OWNER
FIN
//

In the example above, vr is a two-digit product version.

Example of JCL for Import

//IMPOBAT  JOB  CLASS=L,MSGCLASS=X
//* ****************************************
//IMPORT   EXEC PGM=NATBATvr,REGION=3000K,
//  PARM=('PROFILE=NOPvrJOB')
//STEPLIB  DD   DSN=NATURAL.QA.LOAD,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//CMPRINT  DD  SYSOUT=*
//CMWKF01  DD  DISP=SHR,DSN=TST.NOPvrs.TMP.EXPORT
//CMSYNIN   DD *
LOGON SYSEOR
IE-IM--P WRK - - A 9999 9999
FIN
//

In the example above, vr is a two-digit and vrs a three-digit product version.

Export Commands for Batch Processing

This section describes the commands available to export individual or all objects of your Entire Operations environment in batch mode.

Export of Individual Objects

You can export individual objects by using the IE-EX--P command. The following syntax applies:

IE-EX--P object-type,location,library,natural-object-prefix,
  export-mode,export-passwords,export-schedules,
  export-calendars,export-symbols,export-grants,
  key-field-1,key-field-2,key-field-3,key-field-4
Export of All Objects

You can export all objects by using the IE-EXA-P command. The following syntax applies:

IE-EXA-P location,library,natural-object-prefix,
  export-mode,export-passwords,export-schedules,
  export-calendars,export-symbols,export-grants,[owner]

This section covers the following topics:

Parameter Description

The parameters of the IE-EX--P and IE-EXA-P export commands are described in the following section.

Syntax Element Format Description
object-type A20 A valid object type (see Object Type to be Exported: Key Fields of the Objects).
location A3 The location of the file that should be created.
NAT Export to Natural text object.

See also library and natural-object-prefix.

WRK Export to work file. Work File 1 must be defined.

The work file format must be the same as for Natural INPL utility.

Note:
The location PC is not available in batch mode since it requires Entire Connection as a transport medium.

 
library A8 Only for NAT locations. Enter a blank character if the location is not NAT.

Enter the name of the library, where the Natural object should be created.

natural-object-prefix A8 Only for NAT locations. Enter a blank character if the location is not NAT.

Enter the prefix (maximum is 5 characters) of the Natural object you want to create or to which you want to append the data.

For explanations of prefix, see the description of the NAT Member Prefix field used for the export operation.

export-mode A1 A  Append to existing output file. This output file must be defined with OP=EXTEND in the /FILE statement (for BS2000) or the DD statement (for z/OS).
N  Create new output file.
export-passwords A1 Y  Export passwords.
N  Do not export passwords.
export-schedules A1 Y  Export schedules.
N  Do not export schedules.
export-calendars A1 Y Export calendars which are used in the network.
N Do not export calendars.
export-symbols A1 Y Export symbol tables which are used in the network.
N Do not export symbol tables.
export-grants A1 Y Export granted access rights defined for the network.
N Do not export granted access rights defined for the network.

key-field-1
key-field-2
key-field-3
key-field-4

A20 IE-EX-P:

Required key fields, specific to objects (see Object Type to be Exported: Key Fields of the Objects).

owner A10 IE-EXA-P:

The owner (optional) whose objects are to be exported.

If specified, only objects that belong to the owner are exported. Related items or objects such as passwords, schedules, calendars, symbols and grants can be excluded from the export operation as shown in the export example.

Target Entire Operations Version Setting

Export program invocations can be prefix by a target Entire Operations version definition as shown in the following examples:

IE-TVS-P -

Target version is the current Entire Operations version.

IE-TVS-P 0504030006

Target version is Entire Operations Version 5.4.3 CF 6 (or above).

If no target version is specified, the exported file will be importable to the Entire Operations version in which it was created, or in a higher Entire Operations version.

Examples of Export

Example of Exporting a Network

This example deals with the export of network E60-FLOW of owner EXAMPLE to Work File 1 including schedules, calendars, and symbol tables.

The export will be compatible to the Entire Operations version, in which the export file is being created. See Target Entire Operations Version Setting.

IE-TVS-P 0504030006
IE-EX--P NETWORK-MASTER WRK - - N N Y Y Y Y EXAMPLE E60-FLOW

For an example of how the network E60-FLOW appears in external format after it has been exported, see the section Sample Network.

Example of Exporting all Objects

This example deals with the export of the whole environment to Natural library PROD objects starting with EXP--001. Schedules, calendars, and symbol tables will be exported with the networks.

IE-TVS-P 0504030006
IE-EXA-P NAT PROD EXP N Y Y Y Y Y

Import Command for Batch Processing

You can use the IE-IM--P command to import Entire Operations objects in batch mode. The following syntax applies:

IE-IM--P location,library,natural-object-prefix,initial-mode,
  error-limit,warning-limit,
  owner,network,network-version,job

This section covers the following topics:

Syntax Description

The syntax of the IE-IM--P import command is described in the following table.

Field Format Description
location A3 The location of the import file. Possible values:
NAT  Import from Natural text object.

See also library and natural-object-prefix.

WRK  Import from work file.

Work File 1 must be assigned.

Note:
The PC location is not available in batch mode since it requires Entire Connection as a transport medium.

library A8 Only for NAT locations. Enter a blank character if the location is not NAT.

Enter the name of the library, where the Natural object(s) is/are located.

natural-object-prefix A8 Only for NAT locations. Enter a blank character if the location is not NAT.

Enter the prefix of the Natural objects you want to read.

initial-mode A1 A  Add
C  Check
D  Delete
U  Update
error-limit I4 The number of errors, after which the import is interrupted.
warning-limit I4 The number of warnings, after which the import is interrupted.
owner A10 Owner selection for import. See also Specifying Object Ranges for Import.
network A10 Network selection for import. See also Specifying Object Ranges for Import.
network-version A10 Network version selection for import. See also Specifying Object Ranges for Import.
job A10 Job selection for import. See also Specifying Object Ranges for Import.

Specifying Object Ranges

You can use an asterisk (*) as a wildcard to delimit the range of objects to be imported for owner, network and job. For example: if you specify TEST* for the job, all jobs with names that begin with TEST are exported.

If you specify an asterisk (*), all objects of the specified object type are imported.

See also Notes in the section Fields: Import Objects Window.

Examples of Import

Example 1

Import from Work File 1, check only; any number of errors and warnings.

IE-IM--P WRK - - C 99999 99999
Example 2

Import from NAT; Add Object; Owner EXAMPLE, Network E01* only.

IE-IM--P NAT - - A 99999 99999 EXAMPLE E01*  *

Natural Batch Condition Codes

Depending on warnings and / or errors during a batch import or export, the Natural batch execution will return one of the following condition codes:

Code Description
0   Import/Export ended OK.
4   Warnings were issued.
8   At least one error occurred.
16   A fatal error occurred (e.g., a parameter error).