Administration of External Objects

Information stored in Predict objects can be used to generate external objects, and documentation objects can be incorporated from external objects. External objects generated from documentation objects and documentation objects incorporated from external objects are connected. Predict provides functions to administrate external objects connected to documentation objects. These functions are described in this section.

See the section Handling of External and Documentation Objects in this documentation for a more detailed description of how external and Predict objects are handled.

This document covers the following topics:


Overview of Options

The following topics are covered below:

Overview of Administration Functions

Administration functions are used to perform the following tasks. See External Object Types and Administration Functions for a list of external objects and the functions that can be applied.

  • Disconnect implementation
    Disconnects external objects from their corresponding Predict objects. The implementation pointer from the documentation object to the external object is deleted, but the objects themselves remain intact.

    DISCONNECT <ext.object-type><dict.object-ID>[<parameters>]
  • Display implementation
    Displays external objects.

    DISPLAY <ext.object-type> <dict.object-ID> [<parameters>]

    The following information is displayed:

    • Predict documentation data: object ID, type, creation and modification dates.

    • Entire System Server data if external object was stored with Entire System Server.

    • Generation options: the most important generation options are listed.

    • Generated code.

  • Rename implementation
    Moves generated code to another member and/or to another library. Only applicable to copy code or utility cards generated from files.

    RENAME <ext.object-type> <dict.object-ID> [<parameters>]

    Note:
    This command cannot be used in batch mode. If the command is used online, not all parameters can be specified and must be supplied in the screens that appear.

  • Purge implementation
    Purges external objects. Any dependent objects are physically deleted. It is sometimes necessary to delete an external object before the connected Predict object can be deleted.

    PURGE <ext.object-type> <dict.object-ID> [<parameters>]
  • Refresh file
    Deletes all records stored in Adabas files or DB2 tables/views.

    REFRESH <ext.object-type> <dict.object-ID> [<parameters>]
  • Select implementation
    Selects external objects for further processing.

    SELECT <ext.object-type> <dict.object-ID> [<parameters>]
  • Purge Vista elements
    Deletes entries in Vista translation tables. This function cannot be executed in batch mode.

    PURGE VISTATAB

General Rules

  • External objects to be processed are identified by the Predict documentation object to which they are connected.

  • For all functions except Select implementation, an external object type must be specified.

  • The standard functions Disconnect implementation and Purge implementation and the file-specific functions Rename implementation and Refresh file can only be applied to one object at a time.

  • If the Predict object was incorporated or connected with an Incorporation function, no generation protocol is stored in Predict.

Commands

All functions except Rename implementation and Purge VISTATAB can be executed with direct commands. See Overview of Administration Functions for syntax.

Batch Mode

All Select functions for administrating implemented objects can be executed in batch mode.

SELECT <ext.obj.type> <dict.object-ID> [<parameters>]

See list of external object types. The parameters are listed in the respective sections of this section.

This command produces a report.

Administrating External Objects Stored with Entire System Server

With Entire System Server, generated code for COBOL, PL/I, Assembler (BAL), FORTRAN, C, ADACMP/ADAWAN, ADAINV, Adabas Security, or Adabas VSAM BRIDGE can be stored directly as a member in an operating system library on a local or remote machine.

If an external object was stored with Entire System Server, the administration functions Display implementation, Purge implementation and Rename implementation list the following Entire System Server information:

  • database ID

  • DSname

  • volser

  • operating system member.

Purging Objects Stored with Entire System Server

Please note the following when applying the Purge implementation function to objects stored with Entire System Server:

DELETE: Generated code stored in the Predict system file is purged.

SCRATCH: Generated code stored in the Predict system file and operating system member is purged.

External Object Types and Administration Functions

This table lists all types of external objects and the administration functions that can be applied to them.

External Object Code Discon. Display Purge Select Rename Refresh file Purge VISTATAB
Connected to Predict Databases
Adabas database AD Y           Y
IMS or DL/1 ND Y            
DB2 database D2 Y Y Y1        
Connected to Predict Files
ADACMP/ ADAWAN AC   Y Y Y Y    
Adabas file AF Y   Y Y   Y  
ADAINV cards AI   Y Y Y Y    
Vista Trans. table AN       Y2     Y
ADASCR AS   Y Y Y Y    
Adabas-VSAM AV   Y Y Y Y    
BAL/Assembler BA   Y Y Y Y    
COBOL CO   Y Y Y Y    
SQL CREATE Statement CR   Y Y Y Y    
DDM for Natural DD Y Y Y Y      
NSC file NF     Y Y Y    
NSP file SF Y   Y Y      
Preprocessor for 3GL DD Y   Y Y      
DB2 table/view T2 Y Y Y Y Y Y  
Adabas table/view EQ Y Y Y Y Y    
FORTRAN FO   Y Y Y Y    
Language C CC   Y Y Y Y    
PL/I PL   Y Y Y Y    
Verification rule RU   Y   Y      
UDF for DL/1 UD Y   Y3 Y      
Connected to Predict Dataspaces
DB2 tablespace TS Y Y Y Y      
Connected to Predict Programs
DB2 procedure/function P2 Y Y Y Y      
Connected to Predict Storagespaces
DB2 storagespace SG Y Y Y Y      

1 A DB2 database can only be purged if it is empty.

2 It is not checked whether the Vista translation table is accessible.

3 UDF for DL/1 can only be purged if no DDM for the file exists.

Administrating External Databases

Implemented databases, Predict database objects and generation logs can be processed with functions of the Administration Implemented Database menu. This menu is called with function code L and object code DA in a Predict main menu or with the command ADMINISTRATE DATABASE.

 12:54:21             *****  P R E D I C T  *****              2007-05-31
 Plan   0          - Administration Implemented Database -        Profile SYSTEM
                                                                                
  Function                              Function                                
                                                                                
  C  Disconnect implementation          S  Select implementation                
  D  Display implementation             U  Purge Vista elements                 
  P  Purge implementation                                                       
                                                                                
 Function ..............                                                        
 Database ID ...........                                                        
 Belongs to VM .........                                                        
 SQL Server ...........*                                  <Default Server>      
 Database number .......                                                        
 External object ......*                                                        
 Only modified ......... N (Y/N)                                                
                                                                                
                                                                                
 Restrictions .........*   Profile Default ,used                                
                                                                                
 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
Database ID ID of Predict database object connected to the external database. ID must be unique for functions Disconnect implementation, Display implementation and Purge implementation. If asterisk notation is used for function Select implementation, the scope can be limited by the parameters below.
Belongs to VM Restricts the selection to databases in the specified virtual machine.
SQL Server Restricts the selection to the specified server. For Select implementation function: Enter ## to display implementations on all available servers. Leave this parameter blank to display only implementations on <Default Server>.
Database number Restricts the selection to databases with the specified physical database number.
External object
Enter the type of external object to be processed.
AD Adabas database
AT Vista table
D2 DB2 database
ND Natural DBD
blank all
Only modified
Y Restricts the selection to databases that have been modified since generation.
N All databases are to be selected, whether they have been modified since generation or not.
Restrictions See Restrictions in the section Predict User Interface in the Introduction to Predict documentation.

Functions

Disconnect implementation - Code C

Disconnects implemented databases connected to the Predict database object by deleting the implementation pointer of the documentation object.

Display implementation - Code D

For DB2 databases: displays documentation data, generation options and the generation log for the specified database. For Adabas and IMS databases: only the implementation pointer is displayed.

Purge implementation - Code P

For DB2 databases: Deletes the database and all dependent tablespaces, tables and views. The database ID must be entered again to confirm deletion. If a table holds the last reference to a distinct type, the distinct type is also deleted.

The function can only be applied to one DB2 database at a time. The function is not available for Adabas and IMS databases.

Warning:
Database and all dependent tablespaces, tables and views are physically deleted in DB2. Recovery from this action is not possible.

Select implementation - Code S

This function is used to select a database for further processing with one of the functions above. The following information is given in a single-line list:

  • database ID

  • database type

  • whether the database has been modified since generation

  • implementation pointer depending on database type:

    Adabas Adabas database ID, DBnr.
    DB2 DB2 database name implemented in SQL server.
    IMS NDB name.

Purge Vista elements - Code U

Deletes entries in the Vista translation table.

Enter unique database ID and external object code AT. Other parameters are ignored. A screen appears with all the Vista elements for the specified file. Delete one or more elements by entering P or X in the Cmd column.

If several elements are purged in one transaction, each purge must be confirmed individually.

Administrating External Dataspaces

DB2 tablespaces/SQL/DS DBspaces, Predict Dataspace objects and generation logs can be processed with functions of the Administration Implemented Dataspace menu. This menu is invoked with code L and object code DC in a Predict main menu or with the command ADMINISTRATE DATASPACE.

 12:57:11             *****  P R E D I C T  *****              2007-05-31
 Plan   0          - Administration Implemented Dataspace -       Profile SYSTEM
                                                                                
                         Function                                               
                                                                                
                         C  Disconnect implementation                           
                         D  Display implementation                              
                         P  Purge implementation                                
                         S  Select implementation                               
                                                                                
 Function ..............                                                        
 Dataspace ID ..........                                                        
 Located in DA .........                                                        
 SQL Server ...........*                                  <Default Server>      
 Member ................                                                        
 Library ...............                                                        
 Only modified ......... N (Y/N)                                                
                                                                                
 Restrictions .........*   Profile Default ,used                                
                                                                                
 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
Dataspace ID ID of Predict Dataspace object connected to the DB2 tablespace or SQL/DS DBspace. ID must be unique for functions Disconnect, Display and Purge implementation.
Located in DA For Select implementation function: limits the scope to Dataspaces contained in the specified Predict database object.
SQL Server Restricts the selection to the specified server. For Select implementation function: Enter ## to display implementations on all available servers. Leave this parameter blank to display only implementations on <Default Server>.
Member, Library If Select function has been executed, these values are displayed, but are not evaluated by any other function.
Restrictions See Restrictions in the section Predict User Interface in the Introduction to Predict documentation.
Only modified
Y Restricts the selection to dataspaces that have been modified since generation.
N All dataspaces are to be selected, whether they have been modified since generation or not.

Functions

Disconnect implementation - Code C

Disconnects tablespaces and Predict dataspaces by deleting the implementation pointer of the Predict dataspace object.

Display implementation - Code D

Displays documentation data, generation options and the generation log for the specified dataspace.

Purge implementation - Code P

Deletes the tablespace and all dependent tables and views. The dataspace ID must be entered again to confirm deletion. If a table holds the last reference to a distinct type, the distinct type is also deleted.

If dependent tables and views exist, they are listed. The deletion of these dependent objects has to be confirmed with Y.

The function can be applied to one DB2 tablespace at a time.

Warning:
Tablespace and dependent tables and views are physically deleted in DB2. Recovery from this action is not possible.

Select implementation - Code S

This function is used to select a dataspace for further processing with one of the functions above.

The following information is given in a single-line list:

  • dataspace ID

  • name of tablespace generated from the dataspace

  • physical database containing the dataspace

  • DB2 dataspace name implemented in SQL server.

Administrating External Files

Implemented files, Predict file objects and code generated from Predict file objects can be processed with functions of the Administration Implemented File menu. This menu is invoked with code L and object code FI in a Predict main menu or with the command ADMINISTRATE FILE.

 13:00:17             *****  P R E D I C T  *****              2007-05-31
 Plan   0            - Administration Implemented File -          Profile SYSTEM
                                                                                
  Function                                Function                              
                                                                                
  C  Disconnect implementation            P  Purge implementation               
  D  Display implementation               R  Refresh file                       
  N  Rename implementation                S  Select implementation              
                                          U  Purge Vista elements               
 Function ...........                                                           
 File ID ............                                  Files of type ....*      
 Contained in DA ....                                  File number .......      
 SQL Server ........*                                  <Default Server>         
 External name ......                                                           
 Member .............                                  Phys Fnr ..........      
 Library ............                                  Phys DBnr .........      
 Only modified ...... N (Y/N)                          External object ..*      
                                                                                
 Restrictions ......*   Profile Default ,used                                   
                                                                                
 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
File ID

ID of Predict file object from which external objects were generated. File ID and external object type must be unique for functions Disconnect, Display and Purge implementation.

If asterisk notation is used for function Select, the scope can be limited by the parameters in database, External name, Files of type, and File number.

Contained in DA Database containing the Predict file object via association "Contains FI".
SQL Server Restricts the selection to the specified server. For Select implementation function: Enter ## to display implementations on all available servers. Leave this parameter blank to display only implementations on <Default Server>.
External name Up to 50 characters can be entered here. Asterisk notation is possible and must be used if external name is longer than 50 characters. This field can be used to denote the full search path of a UNIX file, for example, or to identify an external object without its creator.
Member, Library For the functions Rename and Purge implementation: if File ID is not sufficient to identify an external object uniquely, Member and Library must be specified. For the functions Disconnect and Display implementation, Member and Library can be specified. For Select implementation, Member and Library can be used to restrict the result list of implementations.
Only modified
Only for function Select.
Y Restricts the function to external objects where the corresponding file object has been modified since generation.
N All external objects are to be included, whether the corresponding file object has been modified since generation/incorporation or not.
Files of type Not all file types are valid for all functions. Enter an asterisk in this field to display the valid values for the selected function.
File number Logical file number.

Phys Fnr
Phys DBnr

Physical file number/database number of Adabas file. If these parameters are used, Member and Library are ignored.
External object Type of external object (language). Must be entered for all functions except Select implementation to identify the object uniquely. With the function Select, this field may be left blank to select files of all external object types.
Restrictions See Restrictions in the section Predict User Interface in the Introduction to Predict documentation.

Functions

Disconnect implementation - Code C

Disconnects implemented external object(s) from the Predict file object by deleting the implementation pointer of the file object.

Member and library must be specified (for Adabas files the physical database/file number).

With files of type AT, all files used for generation are disconnected in a single operation.

Display implementation - Code D

Displays documentation data, generation options and generated code of specified file ID and external object type.

Member and library or physical database number and file number may be specified to identify an external object uniquely. If this information is not entered and more than one external object is found, each object is displayed in sequence.

Rename implementation - Code N

Moves generated code to another member and/or to another library. Specify File ID, External object type Library and Member of the code to be moved. The new member and/or the new library are entered in a second screen.

DDMs, Super Natural files and processing rules cannot be renamed with this function. To rename objects of these types, they have to be generated again.

Purge implementation - Code P

Deletes generated code. File ID must be identified uniquely, either by library and member or, for Adabas files, by physical file number/database number. If a DB2 table holds the last reference to a distinct type, the distinct type is also deleted.

Warning:
File is physically deleted in Adabas, DB2 or Adabas SQL Server directory. All dependent objects are deleted, too.

File ID and External object must be specified when deleting all types of external objects. In addition, Library and Member must be specified when deleting generated code.

Special rules apply when deleting Adabas files or DDMs:

Adabas files

The following rules apply:

  • Parameters DB-Nr and File-Nr must be specified.

  • If the file to be deleted is in use, the Adabas option Stop user using file can be used.

  • If Predict/AOS Security is active, access rights are required to delete an Adabas file or to stop users using the file. See Protecting Adabas Databases and Files in the section Protecting External Objects in Predict with Natural Security in the Predict Security documentation.

DDMs
  • For DDMs defined in Natural Security, access rights to maintain the security definition of the file in Natural Security are required. See Protecting DDMs in the section Protecting External Objects in Predict with Natural Security in the Predict Security documentation.

Refresh file - Code R

Deletes all records stored in Adabas files or DB2 tables. Data structure remains intact. Refresh operation must be confirmed.

Special rules apply when refreshing Adabas files:

  • DB-Nr and File-Nr must be specified.

  • If the file to be refreshed is in use, the Adabas option Stop user using file can be used.

Note:
If Predict/AOS Security is active, access rights are required to delete an Adabas file or to stop users using the file. See Protecting Adabas Databases and Files in the section Protecting External Objects in Predict with Natural Security in the Predict Security documentation.

Warning:
This function deletes the entire contents of an Adabas file or DB2 table/view. Recovery from this action is not possible.

Select implementation - Code S

Displays a list of existing generated code sorted by file ID of the Predict file objects that were used to generate the code. Asterisk notation is possible for File ID. Scope can be limited by parameters described above and by additional Restrictions. The following information is given in a single-line list:

  • ID of Predict file object from which the code or object was generated

  • external object type

  • whether the file object has been modified after generation

  • for implemented Adabas files: database ID and file number

  • for 3GL preprocessor data: library containing XRef data, for example *SYSCOB* for COBOL copy code

  • for other objects: name of the server where the implemented code is stored.

Notes:

  1. If this function is used for external object type AT, all Vista elements are listed, without checking whether they can be accessed by the user or not.
  2. If no external object type is specified, and for the same file both Adabas files and Vista elements exist, only the Vista tables are listed with this function. If Vista elements exist, an Adabas file must exist for the specified file. The parameter Only modified refers to the Adabas file.
  3. When you specify a database, all the implementations pointing to that database are listed, but if objects which have further implementations (for example in other databases) are found, all these links are displayed as well.

Purge Vista elements - Code U

Deletes entries in the Vista translation table.

Enter unique file ID and external object code AT. Other parameters are ignored. A screen appears with all the Vista elements for the specified file. Delete one or more elements by entering P or X in the Cmd column.

If several elements are purged in one transaction, each purge must be confirmed individually.

Administrating External Programs

DB2 procedures, DB2 database functions and generation logs can be processed with functions of the Administration Implemented Program menu. This menu is invoked with code L and object code PR in a Predict main menu or with the command ADMINISTRATE PROGRAM.

 13:02:07             *****  P R E D I C T  *****              2007-05-31
 Plan   0           - Administration Implemented Program -        Profile SYSTEM
                                                                                
                         Function                                               
                                                                                
                         C  Disconnect implementation                           
                         D  Display implementation                              
                         P  Purge implementation                                
                         S  Select implementation                               
                                                                                
 Function ..............                                                        
 Program ID ............                                  Program of type ..*   
 Belongs to SY .........                                  Language .........*   
 SQL Server ...........*                                  <Default Server>      
 Member ................                                                        
 Library ...............                                                        
 Only modified ......... N (N/Y)                                                
                                                                                
 Restrictions .........*   Profile Default ,used                                
                                                                                
 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
Program ID ID of Predict program object from which external objects were generated. ID must be unique for functions Disconnect, Display and Purge implementation. If asterisk notation is used for function Select, the scope can be limited by the parameters below.
Program of type
R Only programs of type SQL procedure.
U Only programs of type Database function.
blank All programs.
Language
Only available for programs of type R. Valid values:
B BAL/Assembler
C COBOL
H Language C
N Natural
P PL/I
R REXX
S SQL procedure lang.
V Java
SQL Server Restricts the selection to the specified server. For Select implementation function: Enter ## to display implementations on all available servers. Leave this parameter blank to display only implementations on <Default Server>.
Member, Library If Select function has been executed, these values are displayed, but are not evaluated by any other function.
Only modified
Y Restricts the selection to programs that have been modified since generation.
N All programs are to be selected, whether they have been modified since generation or not.
Restrictions See Restrictions in the section Predict User Interface in the Introduction to Predict documentation.

Functions

Disconnect implementation - Code C

Disconnects implemented external object(s) from the Predict program. The implementation pointer from the documentation object to the external object(s) is deleted, but the objects themselves remain intact.

Display implementation - Code D

Displays documentation data, generation options and generated code of the specified program.

Purge implementation - Code P

Deletes the procedure/function in DB2.

Select implementation - Code S

Displays a list of existing generated code sorted by program ID of the Predict entries that were used to generate the code. Asterisk notation is possible for program ID. Scope can also be limited by parameters Member and Library and by additional Restrictions. The following information is given in a single-line list:

  • Program ID

  • name of the procedure/function generated from the Predict program object

  • DB2 procedure/function name implemented in SQL server.

Administrating External Storagespaces

DB2 storagegroups, Predict storagespace objects and generation logs can be processed with functions of the Administration Implemented Storagespace menu. This menu is invoked with code L and object code ST in a Predict main menu or with the command ADMINISTRATE STORAGESPACE.

 11:59:02             *****  P R E D I C T  *****              2007-05-31
 Plan   0          Administration Implemented Storagespace        Profile SYSTEM
                                                                                
                         Function                                               
                                                                                
                         C  Disconnect implementation                           
                         D  Display implementation                              
                         P  Purge implementation                                
                         S  Select implementation                               
                                                                                
 Function ..............                                                        
                                                                                
 Storagespace ID .......                                                        
 SQL Server ...........*                                  <Default Server>      
 Member ................                                                        
 Library ...............                                                        
 Only modified ......... N (N/Y)                                                
                                                                                
 Restrictions .........*   Profile Default ,used                                
                                                                                
 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
Storagespace ID ID of Predict storagespace object from which external objects were generated. ID must be unique for functions Disconnect, Display and Purge implementation. If asterisk notation is used for function Select, the scope can be limited by the parameters below.
SQL Server Restricts the selection to the specified server. For Select implementation function: Enter ## to diplay implementations on all available servers. Leave this parameter blank to display only implementations on <Default Server>.
Member, Library If Select function has been executed, these values are displayed, but are not evaluated by any other function.
Only modified
Y Restricts the selection to storagespaces that have been modified since generation.
N All storagespaces are to be selected, whether they have been modified since generation or not.
Restrictions See Restrictions in the section Predict User Interface in the Introduction to Predict documentation.

Functions

Disconnect implementation - Code C

Disconnects implemented external object(s) from the Predict storagespace by deleting the implementation pointer of the documentation object.

Display implementation - Code D

Displays documentation data, generation options and generated code of specified storagespace.

Purge implementation - Code P

Deletes generated code.

A storagespace which is used by any tablespace or index space cannot be deleted. In this case, a list of all the tablespaces, tables and views used by the storagespace is displayed.

Warning:
Storagegroup is physically deleted in DB2.

Select implementation - Code S

Displays a list of existing generated code sorted by storagespace ID of the Predict file objects that were used to generate the code. Asterisk notation is possible for storagespace ID. Scope can also be limited by parameters Member and Library and by additional Restrictions. The following information is given in a single-line list:

  • Storagespace ID

  • name of storagegroup generated from the Predict storagespace object

  • DB2 storagegroup name implemented in SQL server.