Version 6.3.13 for Windows
 —  Tools and Utilities  —

Examples of Using Direct Commands

This section provides examples for using Object Handler direct commands.

Tip:
For additional examples, you can view the command generated for an Object Handler function. This command is automatically displayed when you use a wizard. In advanced-user mode, you can activate the display of the command by either entering the Object Handler command SET ADVANCEDCMD ON or setting the parameter Display-Cmd-in-Advanced-Mode to Y (Yes) in the Object Handler profile (see also Profile Settings).


Unloading Objects for the Same Platform

This section contains examples of how to unload objects in internal format to a work file in order to load them on the same platform, within either a local mainframe, UNIX, OpenVMS or Windows environment:

Top of page

Unloading Objects for Different Platforms

This section contains command examples of how to unload objects in Transfer format to a work file in order to load them on a different platform such as unloading in a mainframe and loading in a UNIX, an OpenVMS or a Windows environment.

Top of page

Loading Objects in Internal Format

This section contains command examples of how to load objects from a work file in internal format.

Top of page

Loading Objects in Transfer Format

This section contains command examples of how to load objects from a work file in Transfer format.

Top of page

Batch Processing in a Remote Environment

You can use direct commands to unload objects in batch mode from a remote Natural Development Server (NDV) environment or load objects in batch into a remote NDV environment.

The examples in this section illustrate the use of direct commands in batch to transfer objects from one remote NDV environment to another.

Input Commands in CMSYNIN File

MAP ENVIRONMENT=UX1 SUNNAT63 6312 SAG
SYSOBJH
UNMAP
MAP ENVIRONMENT=MF1 IBM2 4742 SAG
SYSOBJH
UNMAP
FIN

Input Data in CMOBJIN File

UNLOAD * LIB SAG-TEMP %
WHERE TRANS WFLOC PC WORK D:\NAT-Work\w1.dat REPORT
SHOW STATISTICS
END
LOADALL WHERE TRANS WFLOC PC WORK D:\NAT-Work\w1.dat %
REPLACE ALL REPORT
SHOW STATISTICS
END

Explanation of File Contents

MAP ENVIRONMENT=UX1 SUNNAT63 6312 SAG Maps to an NDV environment on a UNIX or an OpenVMS platform.
SYSOBJH Invokes the Object Handler (on the Windows client) that receives the following three commands from the input data in the CMOBJIN file:

UNLOAD * LIB SAG-TEMP %
WHERE TRANS WFLOC PC WORK D:\NAT-Work\w1.dat REPORT

Causes the Object Handler to unload all objects from library SAG-TEMP in the remote UNIX or OpenVMS environment into the work file contained in the local Windows directory D:\NAT-Work\w1.dat.

SHOW STATISTICS

Writes statistical data about the unloaded objects to the CMPRINT output file.

END

Terminates the Object Handler.

UNMAP Unmaps the NDV environment on the UNIX or OpenVMS platform.
MAP ENVIRONMENT=MF1 IBM2 4742 SAG Maps to an NDV environment on a mainframe platform.
SYSOBJH Invokes the Object Handler (on the Windows client) that receives the following three commands from the input data in the CMOBJIN file:

LOADALL WHERE TRANS WFLOC PC %
WORK D:\NAT-Work\w1.dat REPLACE ALL REPORT

Causes the Object Handler to load all objects from the work file in the local Windows directory D:\NAT-Work\w1.dat into the remote mainframe environment.

SHOW STATISTICS

Writes statistical data about the loaded objects to the CMPRINT output file.

END

Terminates the Object Handler.

UNMAP Unmaps the NDV environment on the mainframe platform.
FIN Terminates the Natural batch session.

Top of page