Workplans

Workplans define individual standard procedures for command execution, object selection and parameter or option settings which can be used to further automate function processing.

Workplans are Natural objects of the type Text. They are, by default, stored in the library WORKPLAN located in the current FUSER system file.

This section covers the following topics:


Creating, Selecting and Modifying Workplans

You can use the administration function (see the relevant section) to create a Workplan, select a Workplan from a list, modify a Workplan, or change the default library for Workplans. The default library can also be changed by using the Workplan-Library entry of the Profile option (see also Profile Settings).

Contents of Workplans

A Workplan consists of a header (generated by the Object Handler) and an associated instructional or textual part. Instructional parts contain Object Handler commands and parameter and/or option settings. Textual parts contain plain text only. Header and instructional or textual parts can contain comments (for example, the short description of the Workplan) that must start with the delimiter characters /* and are restricted to one line.

There are six types of Workplan: PROCEDURE, SELECTION, LIST, PARAMETER, OPTION and TEXT.

The table below lists the valid headers (to be entered if creating a Workplan outside the Object Handler) for the corresponding types of Workplan and describes the contents of the instructional or textual part. Additionally, it provides cross references to the clauses that apply when specifying Object Handler direct commands. The Object Handler direct commands provided are explained in the section Direct Commands.

Valid Headers Contents Related Topic in Direct Commands
TYPE PROCEDURE

An Object Handler command procedure.

This Workplan can contain any combination of Object Handler commands available for PROCEDURE. Enter a sequence of commands separated by semicolons (;).

Basic Command Syntax
TYPE SELECTION

Selection criteria for objects.

This Workplan can be used in Object Handler Workplan commands.

select-clause
TYPE LIST A list of objects.

This Workplan can be used in Object Handler Workplan commands.

select-clause

Object List - LIST Workplan

TYPE PARAMETER

Parameters for the unload or load function.

This Workplan can be used to change attributes for the objects to be processed such as the name of a new target library where objects are loaded.

TYPE PARAMETER can be used in Object Handler Workplan commands.

parameter-setting
TYPE OPTION

Options for the unload or load function, for example, report settings.

This Workplan can be used in Object Handler Workplan commands.

option-setting
TYPE TEXT Comments or any other text that can be used for documentation purpose. Not applicable

Examples of Workplans

The following table lists examples of instructional parts contained in a Workplan.

Workplan Type Instruction Explanation
PROCEDURE FINDLIB * LIB TEST Check whether the library TEST exists.
PROCEDURE UNLOAD A* LIB TEST

Local environments:
Unload from the library TEST into Work File 1 all Natural programming objects and shared resources starting with A, and all user-defined error messages; write the report into Work File 4.

Remote environments located on mainframe platforms:
Unload from the library TEST into Work File 1 on the server system all Natural programming objects starting with A, and all user-defined error messages; write the report into the corresponding text object of the Workplan library.

SELECTION * LIB TEST Process all objects from the library TEST.
TEXT This is a Workplan comment. Any text.

This section covers the following topic:

Example of Workplan Contents

The following is an example listing of a PROCEDURE Workplan where the UNLOAD command is executed:

TYPE PROCEDURE /* VERSION=03.01 NATURAL VERSION=06.93.09  PL=0 AUTHOR=SAG DATE=2010-07-20 09:40:12
/* unload from library TEST with target library PROD01
UNLOAD * LIB TEST OBJTYPE N
WITH NEWLIBRARY PROD01
WHERE REPORT MYREP01

Referencing Workplans

You can reference a Workplan by using Object Handler menu functions or direct commands (see also the section Direct Commands).

The following syntax applies when referencing a Workplan with the Object Handler direct commands described in the section Direct Commands.

( workplan-name
  [ LIBRARY library-name ]
  [DBID dbid [FNR fnr ] ] [NAME vsam-name ]
  [CIPHER cipher ]
 

PASSWORD
PSW

password  

)  

The syntactical options are explained in the following section:

Keyword Explanation

The table below describes the keywords and values that apply to the syntax for referencing Workplans.

Keyword Values Default Value
workplan-name The name of the Natural text object in the Workplan library to be used as the Workplan. No default
LIBRARY The name of the library where the Workplan is located. WORKPLAN
DBID The ID of the Adabas database where the Workplan library is located.

0
(current FNAT/FUSER)

FNR The number of the Adabas file where the Workplan library is located.

0
(current FNAT/FUSER)

NAME

Only applies to objects on mainframes.

The name of a valid VSAM file where the Workplan library is located.

blank
(current FNAT/FUSER)

CIPHER

Only applies to objects on mainframes.

An 8-digit cipher code.

blank
(current FNAT/FUSER)

PASSWORD

Only applies to objects on mainframes.

An 8-character Adabas password.

blank
(current FNAT/FUSER)