Defining Additional Attributes of Programs

#### Search Results

Search

# Defining Additional Attributes of Programs

If Additional Attributes is set to Y, a window is displayed which contains the following additional attributes for selection:

- Description
  A description of the program can be entered.

- Owner
  The owner of the program can be entered.

- Class definition
  See Programs of Type Class.

- Resource definition
  See Programs of Type Resource.

- Database function options
  See Programs of Type Database function.

- Procedure options
  See Programs of Type SQL Procedure.

- Entry points
  Entry points are to be modified. This is valid only for programs written in certain languages. See Overview of Language-Specific Program Types.

- SQL procedure code
  Only for programs of type R and language S. The SQL Procedure Editor is called.

The following rules apply:

- Only those types of additional attributes appear in the window that apply to the type of program. For example: the option Class definition is not contained in the list when a program of type Resource is processed.

- More than one choice can be made at a time. The respective input maps are then displayed one after the other.

This document covers the following topics:

- Programs of Type Class

- Programs of Type Resource

- Programs of Type SQL Procedure

- Programs of Type Database function

- System Programs

- Programs of Type dynamic

## Programs of Type Class

    13:33:43             *****  P R E D I C T  *****              2007-05-31
                                 - Modify Program -
    Program ID ...... HNO-CLASS                        Modified 2007-05-31 at 13:31
                                                             by HEB

    Class definition
      Name .............
      GUID .............
      Version ..........

    * Additional attributes ..* N        * Associations ..* N

Parameters
Class definition
Name | The name of the class.
GUID | The globally unique ID of the class.
Version | The version number of the class.

## Programs of Type Resource

     17:45:19             *****  P R E D I C T  *****              2007-05-31
                                  - Modify Program -
     Program ID ...... HNO-PR                              Added 2007-05-31 at 17:39
                                                              by HNO

     Resource definition
       File name ........

       Library ..........
       User system Fnr ..
       User system DBnr .

       Additional attributes ..* S          Associations ..* N

Parameters
Resource definition
File name | File name documented by the Predict program.
Library | The name of the library in which the file name is stored.
User System Fnr | The number of the user system file.
User System DBnr | The number of the database in which the user system file is located.

The type of Resource can be documented in the language field of a Predict program object. There is a user exit program U-PGMLAN that allows dynamic extension of possible languages in each installation.

## Programs of Type SQL Procedure

    14:51:00             *****  P R E D I C T  *****                     2009-07-31
                                 - Add a Program -
    Program ID ...... SQL-PROC                            Added 2009-06-10 at 14:50
                                                       Modified
    Procedure option
      Procedure name ..
    Physical attributes in DADB29                           (new)
      Schema name .....
      Specific name ...
      Collection .....*   (none)             Parameter style *   (none)
      WLM environment *   (none)             Parameter CCSID * E EBCDIC
      Dyn. result set . 2                    Spec. register .*   (none)
      Deterministic ... N (Y,N)              Fenced .........* Y Fenced
      Null input ...... Y (Y,N)              SQL data .......* R Reads SQL data
      DB info ......... N (Y,N)              Asutime .........
      Stay resident ... N (Y,N)              Program type ...*   (none)
      Security .......* D DB2                Commit ..........   (Y,N)
      After failure ..* D Stop (system defau Debug mode .....* I Disable
      Run options ..... run prcc ccsid E failure D                        * Zoom: N
      Packagepath ....*   (none)                                            Zoom: N

    * Additional attributes ..* S          Associations ..* N

Parameters
Procedure name | This name must comply with SQL naming conventions. See the section Naming Conventions for SQL Objects in the section Adabas D and Other SQL Systems in the Predict and Other Systems documentation.
Schema name | Used as a qualifier for an unqualified procedure name.
Specific name | Specifies a unique name for the procedure.
Collection |
Identifies the package collection.
N | NO COLLID
Y | Use collection-ID. A collection-ID must then be specified.
blank | none
WLM environment | Identifies the MVS workload manager application environment.
Dyn. result set | Specifies the maximum number of query result sets that the stored procedure can run.
Deterministic |
Specifies whether the procedure returns the same results for identical arguments.
Y | Yes
N | No
blank | undefined
Null input |
Specifies whether the procedure is called if any of the input arguments is null at execution time.
Y | Yes
N | No
DB info |
Specifies whether specific information that is included in DB2 is passed to the procedure when it is invoked.
Y | Yes
N | No
Stay resident | Specifies whether the load module for the procedure remains resident in memory when the procedure ends.
Security |
Specifies how the procedure interacts with an external security product.
D | DB2
F | Definer
U | User
blank | none
After failure |
Specifies the action to be taken after a failure has occurred. Valid values:
D | Stop (system default). Stops after number of failures defined in the system defaults.
N | Stop (number). Stops after number of failures defined by the user. A numeric value must be added.
C | Continue.
blank | none
Run options | Specifies the language environment run-time options to be used for the procedure.
Packagepath |
Specifies the package path to use when the procedure is run
N | No packagepath.
Y | Use packagepath. A list of package collections must be specified.
blank | none
Parameter style |
Identifies the linkage convention use to pass parameters to the procedure.
D | DB2SQL
G | General
N | General with nulls
J | Java
blank | none
Parameter CCSID |
Specifies the encoding scheme. Valid values:
blank | none
A | ASCII
E | EBCDIC
U | Unicode
Spec. register |
Valid values:
I | Inherit. The values of special registers are inherited.
D | Default. Special registers are initialized to the default values.
blank | none
Fenced |
Determines that the external procedure runs in an external address space.
Y | Yes
N | No
SQL data |
Indicates whether the procedure can execute any SQL statements.
M | Modifies SQL data
N | No SQL
R | Read SQL data
S | Contains SQL
blank | none
Asutime | Specifies the total amount of processor time.
Program type |
Specifies whether the procedure runs as a main or a subroutine.
S | Sub
M | Main
blank | none
Commit |
Indicates whether DB2 commits the transaction immediately on return from the procedure.
Y | Yes
N | No
Debug Mode |
Specifies whether the procedure can be run in debugging mode. The default is D (Disallow) when no Dynamic rules run behavior is in effect. Valid values:
D | Disallow.
A | Allow.
I | Disable.
blank | None.

- Native SQL Procedure

### Native SQL Procedure

    14:24:06             *****  P R E D I C T  *****                     2009-07-31
                                 - Modify Program -
    Program ID ...... HIB-R-S-GEN-NATIVE                  Added 2009-07-07 at 13:19
                                                       Modified 2009-07-10 at 15:17
    Physical attributes in DADB29
      Native .......... Y (Y,N)
      Version ......... V29                                                 Zoom: N
      Package owner ... Owner                Release at .....*   (none)
      Prepare ........* D Defer              REOPT ..........*   (none)
      Current data ....   (Y,N)              Validate .......*   (none)
      Degree ........ *   (none)             Rounding .......*   (none)
      Dynamic rules ..*   (none)             Date format ....*   (none)
      Appl. encoding .*   (none)             Decimal ........*
      Explain .........   (Y,N)              For update .....*   (none)
      Immediate write .   (Y,N)              Time format ....*   (none)
      Isolation level *   (none)
      Keep dynamic ....   (Y,N)
      Optimiz. hints .. opt 29 ------------------------------------------ * Zoom: N
      SQL path ........ path 29                                           * Zoom: N

    * Additional attributes ..* S          Associations ..* N

Valid values are:

Parameters
Native |
To indicate if the definition is for a native SQL procedure.
Y | Yes.
N | No. This is the default.
blank | none
Version | Specifies the procedure version identifier. The default is V1.
Package owner | Specifies the owner of the package.
Prepare |
Specifies whether to defer preparation of dynamic SQL statements that refer to remote objects, or to prepare them immediately.
D | Defer.
N | Nodefer.
blank | Not specified. This is the default.
Current data |
Specifies whether to require data currency for read-only and ambiguous cursors when the isolation level of cursor stability is in effect.
Y | Yes.
N | No. This is the default.
blank | none
Degree |
Specifies whether to attempt to run a query using parallel processing to maximize performance.
1 | One. This is the default.
A | Any.
blank | Not specified.
Dynamic rules |
Specifies the values that apply, at run time, for the following dynamic SQL attributes:
R | Run. This is the default.
B | Bind.
D | Definebind.
E | Definerun.
I | Invokebind.
N | Invokerun.
blank | Not specified.
Appl. encoding |
Specifies the default encoding scheme for SQL variables in static SQL statements in the routine body.
A | ASCII.
E | EBCDIC.
U | Unicode.
blank | Not specified.
Explain |
Specifies whether information will be provided about how SQL statements in the routine will execute.
Y | Yes.
N | No. This is the default.
blank | Not specified.
Immediate write |
Specifies whether immediate writes are to be done for updates that are made to group buffer pool dependent page sets or partitions.
Y | Yes.
N | No. This is the default.
blank | Not specified.
Isolation level |
Specifies how far to isolate the routine from the effects of other running applications.
C | Cursor stability.
S | Read stability.
R | Repeatable read.
U | Uncommitted read.
blank | Not specified.
Keep dynamic |
Specifies whether DB2 keeps dynamic SQL statements after commit points.
Y | Yes.
N | No. This is the default
blank | Not specified.
Optimiz. hints | Specifies query optimization hints.
SQL path | Specifies the SQL path.
Release at |
Specifies when to release resources that the procedure uses: either at each commit point or when the procedure terminates.
C | Commit. This is the default.
D | Deallocate.
blank | Not specified.
REOPT |
Specifies if DB2 will determine the access path at run time by using the values of SQL variables or SQL parameters, parameter markers, and special registers.
N | None. This is the default.
A | Always.
O | Once.
blank | Not specified.
Validate |
Specifies whether to recheck, at run time, errors of the type `OBJECT NOT FOUND` and `NOT AUTHORIZED` that are found during bind or rebind.
R | Run. This is the default.
B | Bind.
blank | Not specified.
Rounding |
Specifies the desired rounding mode for manipulation of DECFLOAT data.
C | Ceiling.
D | Down.
F | Floor.
1 | Half down.
2 | Half even.
3 | Half up.
U | Up.
blank | Not specified. This is the default.
Date format |
Specifies the date format for result values that are string representations of date or time values.
I | ISO.
E | EUR.
U | USA.
J | JIS.
L | Local.
blank | Not specified. This is the default.
Decimal |
Specifies the maximum precision that is to be used for decimal arithmetic operations.
15
15,n (where n must be a number between 1 and 9)
31
31,n (where n must be a number between 1 and 9)
blank | Not specified. This is the default.
For update |
Specifies whether the `FOR UPDATE` clause is required for a `DECLARE CURSOR` statement if the cursor is to be used to perform positioned updates.
R | Required. This is the default.
O | Optional.
blank | Not specified.
Time format |
Specifies the time format for result values that are string representations of date or time values.
I | ISO.
E | EUR.
U | USA.
J | JIS.
L | Local.
blank | Not specified. This is the default.

## Programs of Type Database function

    14:56:35             *****  P R E D I C T  *****                     2009-07-31
                                 - Add a Program -
    Program ID ...... HNO-FUNC                            Added 2009-06-10 at 14:56
                                                       Modified
    Function option
      Function name ...
    Physical attributes in DADB29                           (new)
      Function type ..* S Scalar
      Schema name .....
      Specific name ...
      Collection .....*                       After failure .*   (none)
      WLM environment .                       Style .........*   (none)
      Spec. register .*   (none)              CCSID .........* A ASCII
      Deterministic ... N (Y,N)               Fenced ........*   (none)
      Null input ......   (Y,N)               SQL data ......* N No SQL
      External action . Y (Y,N)               Scratchpad .....
      Final call ......   (Y,N)               Allow parallel .   (Y,N)
      DB info .........   (Y,N)               Cardinality ....
      Asutime .........                       Stay resident ..   (Y,N)
      Program type ...*   (none)              Security ......*   (none)
      Run options .....                                                     Zoom: N
      Packagepath ....*                                                     Zoom: N
    * Additional attributes ..* S          Associations ..* N

Parameters
Function name | This name must comply with SQL naming conventions. See the section Naming Conventions for SQL Objects in the section Adabas D and Other SQL Systems in the Predict and Other Systems documentation.
Function type |
The type of the function.
S | Scalar
T | Table
Schema name | Used as qualifier for an unqualified function name.
Specific name | Specifies an unique name for the function.
Collection |
Identifies the package collection.
N | NO COLLID
Y | Use collection-ID. A collection-ID must then be specified.
blank | none
WLM environment | Identifies the MVS workload manager application environment.
Spec. register |
Valid values:
I | Inherit. The values of special registers are inherited.
D | Default. Special registers are initialized to the default values.
blank | none
Deterministic |
Specifies whether the function returns the same results for identical arguments.
Y | Yes
N | No
blank | undefined
Null input |
Specifies whether the function is called if any of the input arguments is null at execution time.
Y | Yes
N | No
blank | undefined
External action |
Specifies whether the function takes an action that changes the state of an object that DB2 does not manage.
Y | Yes
N | No
blank | undefined
Final call |
Specifies whether final call is made to the function.
Y | Yes
N | No
blank | undefined
DB info |
Specifies whether specific information that DB2 knows is passed to the function when it is invoked.
Y | Yes
N | No
blank | undefined
Asutime | Specifies the total amount of processor time.
Program type |
Specifies whether the function runs as a main or a subroutine.
S | Sub
M | Main
blank | none
Run options | Specifies the language environment run-time options to be used for the function.
Packagepath |
Specifies the package path to use when the function is run
N | No packagepath.
Y | Use packagepath. A list of package collections must be specified.
blank | none
After failure |
Specifies the action to be taken after a failure has occured. Valid values:
D | Stop (system default). Stops after number of failures defined in the system defaults.
N | Stop (number). Stops after number of failures defined by the user. A numeric value must be added.
C | Continue.
blank | none
Style |
Specifies the conventions used for passing parameters to and returning the value from functions. Valid values:
D | DB2SQL
J | Java
blank | not specified
CCSID |
Specifies the encoding scheme. Valid values:
blank | none
A | ASCII
E | EBCDIC
U | Unicode
Fenced |
Determines that the external function runs in an external address space.
Y | Yes
N | No
blank | undefined
SQL data |
Indicates whether the function can execute any SQL statements.
M | Modifies SQL data
N | No SQL
R | Read SQL data
S | Contains SQL
blank | none
Scratchpad | Specifies whether DB2 provides a scratchpad for the function.
Allow parallel |
Specifies whether parallelism can be used.
Y | Yes
N | No
blank | undefined
Cardinality | Specifies an estimate of the expected number of rows that the function returns.
Stay resident | Specifies whether the load module for the function remains resident in memory when the function ends.
Security |
Specifies how the function interacts with an external security product.
D | DB2
F | Definer
U | User
blank | none

## System Programs

Programs that are only available as object code and hence have no language are documented with programs of type E (external object) and language Z (system program). Predict creates XRef data for these so called system programs because neither the preprocessor nor Natural can create XRef data for object code.

The implementation pointer for a system program has to be specified explicitly. One entry point (with the ID of the program object) is created by Predict, additional entry points have to be specified manually.

## Programs of Type dynamic

Programs of type dynamic are used to document calls of programs of the same name from different steplibs depending on the library structure. The following rules apply:

- Because programs of type dynamic document any number of implemented members, no check is performed as to whether the members documented by the program are actually implemented.

- With the active retrieval function Programs using programs, programs of type dynamic are ignored as current objects.

- Programs of this type can only have children for association "Uses PR concept".

### On this page

- Programs of Type Class
- Programs of Type Resource
- Programs of Type SQL Procedure
- Programs of Type Database function
- System Programs
- Programs of Type dynamic