When generating external objects from Predict file objects, several generation tasks can be executed comfortably in one run using an implementation plan. An implementation plan is defined online and can be executed either online or in batch mode.
This document covers the following topics:
The individual generation functions are described in Generation in this documentation.
Generation functions can be executed from an implementation plan. Each generation task contained in an implementation plan calls a generation function once.
A generation task comprises the following:
the call of the generation function (for example GENERATE FDT)
the Predict file object to be processed
a complete set of generation options to be used for generation
status information.
Implementation plans can be created, extended, copied, displayed, modified, renamed, purged and executed. An implementation plan to be processed can be selected from a list.
Whenever many generation operations are to be performed repeatedly, it is advisable to create an implementation plan containing the generation tasks. Here are some examples of where to use an implementation plan:
Creating DDMs for a Natural application. If all files to be used in an information processing system are defined in Predict, all DDMs to be used by Natural programs can easily be generated (and regenerated) using an implementation plan.
Creating all copy code used in an application written in a third generation language.
Implementing Vista elements for complex data distribution structures. If data is distributed across several machines in a complex (possibly heterogeneous) network, implementing the required Vista elements may require many calls of the generation function GENERATE VISTATAB. These calls can be executed comfortably from an implementation plan.
Note:
Using an implementation plan not only helps when several generation
functions have to be called one after another, but also helps keep track of
data structures of an application or of distributed data structures.
The following activities can or must be performed when using an implementation plan:
Implementation plans are created with the Add implementation plan function by specifying a Plan ID in the File Implementation menu and - in the subsequent Add implementation plan screen - a combination of Predict selection criteria and generation function(s).
The function Extend implementation plan is used to add generation tasks for file objects that are not yet contained in the plan.
The function Modify implementation plan is used for various tasks:
Add generation tasks for file objects that are already contained in
a plan (command IN
).
Display external object (command DI
).
Specify which generation options are to be used (commands
OO
, MO
,
DO
).
Display messages of generation functions called from the plan
(command SM
).
Determine that a generation task is to be executed again (command
RE
).
Delete generation tasks from plan (command
UN
).
The function Execute implementation plan processes all generation tasks with status no or reexecute.
Depending on the result of a generation function, the generation
status of the tasks is changed. All messages of the generation function are
stored and can be displayed with command SM
of the
function Modify implementation plan.
The function Reexecute implementation plan changes the status of all tasks which could be reset to status reexecute manually, to reexecute and then starts the execution of the implementation plan.
Implementation plans can be renamed, copied, displayed, purged, and selected from a list.
If an implementation plan contains a generation task for an Adabas file, ADAINV cards, a DDM or Vista translation tables, the virtual machine and the network that were current when adding the task(s) to the plan are stored with the plan.
Such an implementation plan can be modified/extended/executed only if the current virtual machine/network and the virtual machine/network that are stored with the plan are identical.
If you use an implementation plan to generate a DDM that is protected by Natural Security, the task is set to mis (valid generation options missing) because a countersignature is required. The function MO (modify generation options) must be performed and a countersignature entered.
If the Predict file object and the Natural Security definition have not been modified since countersigning the task, the generate DDM function will then be performed when the implementation plan is executed.
If either the Predict file object or the Natural Security definition has been modified since countersigning, the generation task will be skipped.
File implementation functions are called from the File
Implementation Menu, which is called with function code F from any
Predict main menu or with the command IMPLEMENT
FILE
.
13:13:01 ***** P R E D I C T ***** 2007-05-31 Plan 10 - File Implementation Menu - Profile HNO Function Function A Add an implementation plan D Display implementation plan C Copy implementation plan E Extend implementation plan M Modify implementation plan S Select implementation plan from list N Rename implementation plan X Execute implementation plan P Purge implementation plan R Reexecute implementation plan Function ................. Implementation plan ID ... Copy ID .................. Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Next Stop Last LnkEl Flip Print Impl AdmFi SelFi Prof Main |
Parameters | |
---|---|
Function | Select function code from menu. |
Implementation Plan ID | ID of implementation plan to be processed. Up to 12 alphanumeric characters and starting with a letter. |
Copy ID | For Copy implementation plan function: ID of new implementation plan to be created. Up to 12 alphanumeric characters and starting with a letter. |
Implementation plans can be executed, reexecuted and displayed in batch
mode. Enter command IMPLEMENT FILE
, and on the next
line the required parameters in positional or keyword form.
Field | Keyword | Position |
---|---|---|
Function | FUNCTION | 1 |
Plan ID | PLAN-ID | 2 |
To execute and list the implementation plan IMP-TEST use the commands:
IMPLEMENT FILE FUNCTION=X,PLAN-ID=IMP-TEST IMPLEMENT FILE D,IMP-TEST
Condition Code 106 is issued if
a function in the implementation plan is executed with errors,
or a function terminates abnormally,
or the plan contains at least one generation task that failed or could not be executed (status impossible).
Implementation plans are created with the Add implementation plan function by specifying an Implementation Plan ID in the File Implementation Menu and - in the subsequent Add Implementation Plan screen - a combination of Predict selection criteria and generation functions. Invalid combinations of file object and generation function are not added to the implementation plan.
Generation tasks are added for each file that meets the given selection criteria according to the following rules:
for each valid combination of file object and generation function, one generation task is added (if no external object for the file exists)
if external objects for a file already exist, one generation task is added for each external object. This facilitates regenerating existing external objects.
Note:
For Adabas files, DDMs, ADAINV cards and Vista translation tables,
tasks are added only for those external objects that are accessible in the
current virtual machine/network.
The plan is displayed and the tasks can be modified with the same functions that are provided in the Modify Implementation Plan screen.
13:13:17 ***** P R E D I C T ***** 2007-05-31 - Add Implementation Plan - Profile HNO Implementation plan ID .. HNO-PLAN1 Added 2007-05-31 at 13:12 by HNO Modified Executed File ID ........... Files of type ....* File number ... Contained in DA ... Implemented ....... N (Y,N) Modified .......... N (Y,N) with userviews .... N (Y,N) Restrictions .....* Profile HNO ,used ----------------------- Generation functions -------------------------------- ADACMP/ADAWAN ......... Adabas file ........... ADAINV cards .......... ADASCR ................ Adabas - VSAM ......... DB2 table/view ........ SQL CREATE Stmnt ...... DDM for Natural ....... OS/400 File Def. ...... BAL/ASSEMBLER ......... Language C ............ COBOL ................. FORTRAN ............... PL/1 .................. Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Next Stop Last LnkEl Flip Print Impl AdmFi SelFi Prof Main |
Parameters | |||
---|---|---|---|
Implementation plan ID | ID of the plan. A read-only field. | ||
Added | Date and time the plan was added. | ||
Modified | Date and time the plan was last modified. | ||
Executed | For function Extend implementation plan: Date and time the plan was executed last. Date and time are taken when executing the last task in the plan. Not applicable for function Add implementation plan. | ||
File ID | ID of the file(s) for which generation tasks are to be included in the plan. Use asterisk notation to select a range of files. If a unique file ID is specified, all other selection criteria are ignored. | ||
Files of type | Only files of this type are added to the plan. | ||
File number | Only files with this number are added to the plan. | ||
Contained in DA | Only files in the specified database(s) are added to the plan. | ||
Implemented |
|
||
Modified |
|
||
with userviews |
|
||
Restrictions | See Restrictions in the section Predict User Interface in the Introduction to Predict documentation. | ||
Generation functions | Mark with any non-blank character the external object(s) to be created for each file selected. |
Copies the plan Implementation Plan ID to Copy ID. The IDs are entered in the File Implementation Menu.
Generation tasks in an implementation plan can be changed with several functions. If a task is modified, its generation status (indicated in the column Generation) is changed to reexecute if it had already been executed.
Note:
Plans containing a generation task for an Adabas file, ADAINV
cards, a DDM or Vista translation tables can only be modified if the current
virtual machine/network and the virtual machine/network that are stored with
the plan are identical. It is however possible to purge a plan regardless of
the current virtual machine/network.
13:19:18 ***** P R E D I C T ***** 2007-05-31 - Modify Implementation Plan - Implementation plan ID .. CHD-FDT F Language Dbnr Fnr Library Member Op.-mem. Opt Generation __ --- FILE-ID: CHD-FDT __ ADACMP/ADAWAN 188 57 WANLIB CHD-FDT1 old performed __ ADABAS file 188 57 WANLIB CHD-FDT1 mod abended __ 181 57 mod executing __ 180 57 mod warning __ 205 57 mis impossible __ __ __ __ __ __ __ __ __ ( '.' = EXIT , 'T' = TOP ) |
Meaning of Columns | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F |
|
||||||||||||||||||||||
Language | The type of external object to be generated, for example: COBOL when generating COBOL copy code. | ||||||||||||||||||||||
Dbnr / Fnr | Database number / file number of the external object (if applicable). | ||||||||||||||||||||||
Library / Member | Member and library of the external object (if applicable). | ||||||||||||||||||||||
Op.-mem. | See description of parameters Save as member, Save in library and Op. sys member in the section Parameters Specifying the Form of Output. | ||||||||||||||||||||||
Opt |
|
||||||||||||||||||||||
Generation |
|
After calling the function Rename implementation plan, a screen appears for entering a new Implementation Plan ID.
Additional confirmation is requested before a plan is actually purged. The implementation plan will be purged if you enter DELETE.
The function Display implementation plan displays a plan as shown below:
13:42:18 ***** P R E D I C T ***** 2007-05-31 - Display Implementation Plan - Added 2007-05-31 at 13:01 by CHD Modified Executed 2007-05-31 at 13:05 Implementation plan ID .. TEST Network ................. Virtual machine ......... ------------------------------------------------------------------------------- Language DBnr Fnr Library Member Op.-mem. Option Generation File ID ...... CHD-CIPHER Language C old warning DIC1800 SUMMARY: 4 FIELD(S) PROCESSED DIC1818 WARNING: 1 FORMAT(S) CHANGED COBOL old performed DIC1800 SUMMARY: 4 FIELD(S) PROCESSED File ID ...... CHD-COBOL-PREF-G Language C old performed Command ===> Scroll ==> CSR Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Quit RFind Flip - + Left Right line 1 of 47 (line 10 on screen) |
The function Display Implementation Plan gives the following information:
Information as contained in the Add/Extend/Modify Implementation Plan screens.
If a plan contains a generation task for an Adabas file, ADAINV cards, a DDM or Vista translation tables, the virtual machine/network combination that is stored with the plan is displayed. If the current virtual machine/network combination differs from the one that is stored with the plan, a warning is issued.
Warnings and error messages issued by generation functions are displayed if the generation function was executed from the plan.
Note:
Display Implementation Plan can be executed in batch mode. See
Executing
and Displaying an Implementation Plan in Batch
Mode.
This function is used to add generation tasks for file objects that are not yet contained in the implementation plan. The function Extend implementation plan uses the same input screens as Add Implementation Plan.
Note:
New generation tasks for file object/generation function
combinations that are already contained in a plan can be added with the command
IN
of the function Modify implementation
plan.
Implementation plans can be selected for further processing. Enter function code S in the File Implementation Menu and
leave field Plan ID blank to display all plans for selection or
enter a plan ID ending with an asterisk to specify a range of values.
The Implementation Plan Selection screen will appear:
13:48:24 ***** P R E D I C T ***** 2007-05-31 - Implementation Plan Selection - M Impl. plan ID Last modification Exec. Date Remarks _ CHD 2004-07-30 at 13:59 2004-07-12 at 13:55 mod. after exec. _ CHD-A-FDT 2004-07-03 at 13:48 2004-07-03 at 13:50 _ CHD-ABC 2004-07-03 at 13:25 2004-07-03 at 13:25 mod. after exec. _ CHD-COPY2 2004-07-12 at 13:38 2004-07-12 at 13:41 _ CHD-FDT 2004-07-12 at 13:57 2004-07-03 at 13:14 _ CHD-FDT2 2004-07-03 at 13:15 _ CHD-NET 2004-07-07 at 18:09 _ CHD-TRUNC 2004-07-03 at 13:03 2004-07-03 at 13:03 mod. after exec. _ CHDA 2004-07-02 at 13:04 2004-07-02 at 13:05 _ CHDABC 2004-07-02 at 13:22 2004-07-02 at 13:22 _ CHDAN 2004-07-08 at 13:47 2004-07-08 at 13:47 _ CHDB 2004-07-02 at 19:01 _ CHDBA 2004-07-06 at 09:54 2004-07-06 at 09:55 _ CHDBBB 2004-07-12 at 18:27 _ CHDC 2004-07-05 at 13:12 currently modified _ CHDCOB 2004-07-12 at 13:03 2004-07-12 at 13:03 _ ('.' = EXIT , 'T' = TOP ) |
The following information is displayed:
implementation plan ID
date and time of last modification
execution date and time
remarks (see below)
Enter a non-blank character in column M to select a plan for further processing.
Remarks | |
---|---|
The following remarks are possible: | |
currently modified | Another user is currently modifying this implementation plan or the last attempt to modify the plan terminated abnormally. |
mod. after exec. | The implementation plan has been modified since it was last executed. |
executing | The plan is currently executing or the execution of the implementation plan terminated abnormally. |
The function Execute Implementation Plan can also be executed in batch mode. See Executing and Displaying an Implementation Plan in Batch Mode.
Note:
Plans containing a generation task for an Adabas file, ADAINV
cards, a DDM or Vista translation tables can only be executed if the current
virtual machine/network combination and the virtual machine/network combination
stored with the plan are identical.
09:57:05 ***** P R E D I C T ***** 2007-05-31 Plan 0 - File Implementation Menu - Profile HNO Function Function A Add an implementation plan D Display implementation plan C Copy implementation plan E Extend implementation plan M Modify implementation plan S Select implementation plan from list N Rename implementation plan X Execute implementation plan P Purge implementation plan R Reexecute implementation plan +----------------------------------------------+ ! ! ! File Implementation performed for ! F ! ! ! File ID ... CHD-COND ! I ! Language .. Language C ! C ! Library ... CCCLIB Member .... ! ! DBnr ...... File nr ... ! ! ! C +----------------------------------------------+ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Next Stop Last LnkEl Flip Print Impl AdmFi SelFi Prof Main |
When an Implementation Plan is executed, all generation tasks of status no or reexecute are executed. All other generation tasks are skipped. The task currently being executed is displayed in a window (see screen above). If the plan does not contain any executable task (status no or reexecute), a corresponding message is given.
You can repeat the execution of a plan if necessary (for example due to abnormal termination or system errors).
This function consists of two parts:
Tasks are set to status reexecute
All tasks in the implementation plan for which the command
RE
could be entered when executing the function
Modify Plan are set to reexecute. The command RE
is
valid for all tasks that have been started at least once, i.e. in one of the
following statuses: abended, error, executing, interrupted, performed, sav.
error, or warning. If a task is set to reexecute, any messages that were issued
during the last generation are removed from the plan. Generate DDM tasks are
set to impossible if Natural Security is installed and a countersignature is
required.
Function Execute plan is started
In the second step, the function Execute Plan is started. If the
execution terminates for any reason, the function Execute Plan can be started
again at a later time to process the tasks that could not be executed.
This function can also be executed in batch mode. See Executing and Displaying an Implementation Plan in Batch Mode.
If parameters of a generation task cannot be applied, a message is returned and in some cases a selection window. Select a valid value from this window to execute the task.
A generation task that cannot be executed due to errors is given the status error. The status can be set to reexecute with the function RE or by modifying the generation options.
If a generation task terminates abnormally (status abended or executing), call the generation function directly to get a detailed error message (DICnnnn).