Work Files

#### Search Results

Search

# Work Files

This section describes work files and valid formats that apply to the unload, load and scan functions of the Object Handler.

See also Work File Options in the section Settings.

This section covers the following topics:

- Work File Assignment

- Work File Format

## Work File Assignment

The following table lists the work files used by the Object Handler.

File | Explanation
--- | ---
Work File 1 | Used for the unload, load and scan functions. Contains the data unloaded.
Work File 7 | Only used if Entire Connection is installed and if Use PC File is selected on the Options screen (see also Set Additional Options). Work File 7 must be defined as Entire Connection work file to be used for the unload, load and scan functions. Contains the data unloaded.
Work File 8 | Only used if Entire Connection is installed and if Use PC File is selected on the Options screen (see also Set Additional Options). Work File 8 must be defined as Entire Connection work file to be used for the unload, load and scan functions. Used as internal file for processing Entire Connection commands. Anmerkung The number of the work file can be changed with user exit routine OBJHEX03 (see Batch Condition Codes and User Exit Routines) or with the options `PCCOMMANDFILENUMBER`, `PCCOM` and `PCCFN` (see option-setting) when using a Workplan of the type PROCEDURE.

## Work File Format

There are two file formats for unloading objects in the source environment into work files and for loading them from work files into the target environment: an internal format and the Transfer format. Work files must be of internal format to transfer binary data. Work files must be of Transfer format to transfer text data.

This section covers the following topics:

- Internal Format

- Transfer Format

### Internal Format

The internal format is an internal record layout for work files that are used to transfer Natural sources and cataloged objects, error messages, Natural command processor sources, Adabas FDTs (Field Definition Tables), Natural DDMs (data definition modules) and Natural-related objects from one environment to another.

Use work files of internal format to transfer objects between identical platforms.

With the internal format activated, Natural objects are read from the source environment and written to a Natural work file by using the unload function of the Object Handler. This work file can be transported to another environment with standard file transfer services. In the target environment, the objects can then be read from the work file and loaded into the local file or database system with the load function of the Object Handler.

We strongly recommend that you define Work File 1 with `RECFM=VB` (variable blocked) because the Object Handler writes records of variable length to the work file, which reduces the work file size.

If you define Work File 1 with `RECFM=FB` (fixed blocked), you must specify the option `FIXEDLENGTH` for the unload function. Otherwise, the records written to the work file are filled up with binary zeros.

Anmerkung
Work files created by the utility NATUNLD on the server, must be processed in internal format. The work files must be created on a server of the same platform where NATUNLD was applied.

### Transfer Format

See also Transfer format in the section Settings.

The Transfer format is a general record layout for work files that contain load or unload data. This format is platform-independent and can be used to transfer the sources of Natural objects, Natural command processor sources, error messages, DDMs and Adabas FDTs from one hardware platform to another and between Linux, z/OS and Windows platforms.

With the option Transfer format set, the unload function of the Object Handler reads Natural objects from a hardware platform and then restructures them.

Formatted records are written to a Natural work file that can be transported to another platform with standard file transfer services. On the target platform, the load function of the Object Handler then reads the objects from the work file and loads them into the local file or database system. The objects read from the work file are restructured according to the structure of the new hardware platform.

#### Handling Sources in Unicode/UTF-8

Transfer format is also used to unload or load sources of Natural objects in Unicode/UTF-8 (Universal Transformation Format, 8-bit form). If you specify the corresponding unload option (`WORKFILETYPE` set to `UTF-8` in command mode or Unicode work file in menu mode), all object sources will be unloaded into a work file in UTF-8. If you specify the corresponding load option (`LOAD-CODE-PAGE` in command mode or Use load code page in menu mode), all object sources in UTF-8 will be converted with the specified code page when they are loaded into a Natural system file.

#### Work Files from SYSTRANS

Use Transfer format to process work files created by the utility SYSTRANS. Work files that contain object sources encoded in UTF-8 cannot be processed with SYSTRANS.

### On this page

- Work File Assignment
- Work File Format