This section describes how to use the Natural Construct client generation wizards to generate Natural modules, as well as how to define user exits for additional processing that is preserved during regeneration. The following topics are covered:
Note:
The Natural Construct client generation
wizards must be initiated from an existing NaturalONE project in the NaturalONE
perspective. In addition, at least one library must be defined in your local
project. For information, see the NaturalONE
documentation.
To access the client generation wizards:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view for
the library in which you want to generate the modules.
Note:
You can also access the wizards using standard NaturalONE
functionality (i.e., through the File menu or using the
toolbar option.
Select
.A list of the supplied client generation wizards is displayed. For example:
Select the wizard you want to use.
The Progress Information window is displayed, indicating progress as the model specification PDA is initialized by the model's clear subprogram on the server to set the model defaults (the same process initiated when you enter "NCSTG" from a character-based Natural connection). For example:
The clear subprogram will only be called if all the following conditions are true:
The selected target project is valid and connected to a remote Natural environment.
The generation mode is set to "New" (not regeneration).
The clear subprogram has never been called or the last successful call to the clear subprogram targeted a different project.
When initialization is complete, the first specification panel for the selected client generation wizard is displayed. For example:
The module parameters are grouped by topic and
buttons are available when selecting existing resources. After specifying the first parameter on a panel, messages are displayed indicating the next required parameter. The button will only be enabled when all required parameters have been specified on the current panel have been specified; the button will only be enabled when all required parameters have been specified for the current wizard.To generate a module:
Specify all required parameters and any optional parameters on the first panel for the selected wizard.
Select
.Or:
Select .
The generation process begins. By default, progress is detailed in messages displayed near the bottom of the panel. Once generation is complete, the code is downloaded to the client. The generated source is displayed in the editor and the available user exits are displayed in the Outline view.
Save the generated module(s).
Use standard NaturalONE functionality to upload the generated module(s) to the server.
The following table lists the supplied wizards and where you can find information on the specification parameters for each wizard:
Wizard | Information |
---|---|
BROWSE | Browse/Browse-Select Wizards. |
BROWSE-SELECT | Browse/Browse-Select Wizards. |
BROWSE-SELECT-HELPR | Browse/Browse-Select Wizards. |
BROWSE-SELECT-SUBP | Browse/Browse-Select Wizards. |
BROWSE-SUBP | Browse/Browse-Select Wizards. |
DRIVER | Driver Model, Natural Construct Generation. |
MAINT | Maint Model, Natural Construct Generation. |
MENU | Menu Model, Natural Construct Generation. |
OBJECT-BROWSE-DIALOG | Object-Browse-Dialog Wizard. |
OBJECT-BROWSE-SELECT-SUBP | Object-Browse-Select-Subp Wizard |
OBJECT-BROWSE-SUBP | Object-Browse-Subp Wizard. |
OBJECT-MAINT-DIALOG | Object-Maint-Dialog Wizard. |
OBJECT-MAINT-SUBP | Object-Maint-Subp Wizard. |
QUIT | Quit Model, Natural Construct Generation. |
STARTUP | Startup Model, Natural Construct Generation. |
Notes:
In addition to the standard navigation buttons available at the bottom of the wizard panels, an Options button is available to define generation options.
To define generation options:
Select
on the wizard specification panel.The Generation Options window is displayed. For example:
Using this window, you can:
Task | Procedure |
---|---|
Disable the display of generation status messages. | Deselect Display generation status messages. The generation status messages indicate which module is being invoked at each stage of the generation process. |
Display the generation status messages as text (for example, "starting" and "ending"). | Select Display generation status messages as text. By default, the messages are displayed with arrows "-->" (starting) and "<--" (ending). |
Write embedded statements to the source buffer as part of the generated module. | Select Include embedded statements in generated code. Embedded statements indicate where the lines of code being written originated and the name of the code frame, generation subprogram, or sample subprogram that produced the code. |
Select
to save the generation options.The specification parameters listed on the wizard panels correspond with those on panels for the Natural Construct models on the server. This section describes the common specifications for the Natural Construct wizards and how to perform common development tasks.
Notes:
This section covers the following topics:
This section describes the specification parameters for the Browse and Browse-Select series of wizards. The following topics are covered:
Note:
The Browse-Select series of wizards are used for screen examples
throughout this section.
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Browse and Browse-Select wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel for the selected wizard is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the module to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Global data area | Name of the global data area (GDA) used by the module to be generated. To allow inter-program communication, generated modules require a small number of global variables. The supplied CDGDA global data area contains the global variables required to test a generated module. Before creating a new application, copy this GDA from the SYSTEM library and rename it to match your naming conventions. Then add any additional global variables your application may require. |
Title | Title for the module to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated module will do. This field is used internally for documentation purposes. |
First heading | First heading displayed on the generated panel. This heading is centered at the top of the generated panel and intensified. |
Optionally, you can define:
Task | Procedure |
---|---|
A different NaturalONE project into which to generate the module(s). | Type the name of the project in Project or select to display a window listing the existing projects for selection. The project must currently exist. |
A folder into which to generate the module(s). | Type the name of the folder in
Folder or select to display
a window listing the existing folders for selection. The folder must currently
exist within the selected NaturalONE project.
Note: |
A GDA block for use with the specified GDA. | Type the name of the GDA block in With block. You need only specify the lowest level block name; the corresponding path name is determined automatically. For more information about GDA blocks, see the Natural documentation. |
A second heading for display on the generated panel(s). | Type the heading in Second heading. This heading is centered under the first heading and intensified. |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
To specify additional parameters:
Define the following parameters:
Parameter | Description |
---|---|
Predict view | Name of the Predict view used by the generated browse module. Either type the name or select | to display the available views for selection. The view must be defined in Predict.
Primary key | Name of the primary key by which scrolling
takes place. Either type the name or select Note: |
to
display the available primary keys for selection. This key must be defined as a
descriptor, superdescriptor, or subdescriptor in the
Predict file definition. Keys containing MUs
(multiple-valued fields) and PEs (periodic groups) are supported. If this key
does not exist in the corresponding Predict file, a
message is displayed.
Optionally, you can define:
Task | Procedure |
---|---|
The name of the data definition module (DDM) corresponding to the primary file. | Type the DDM name in Natural
DDM. If this field is not specified, the DDM name defaults to the
primary file name. The Predict definition of the
primary file determines which fields are included in the DEFINE DATA section of
your generated code. The format of the generated code in the DEFINE DATA
section has the following structure:
1 Primary-file-name VIEW OF Data-definition-module 2 fields pulled from Predict of Primary-file-name |
The name of the view for the primary file for the generated module. | Type the primary file view name in
Program view. This view must be defined in the LOCAL-DATA
user exit or a local data area (LDA).
If this field is not specified, a view is generated containing all fields in the Predict view. The MAX.OCCURS value in Predict determines how many occurrences of MU/PE fields are included on the panel. |
The number of panels used for the generated module. | Type the number of panels in Horizontal panels. The default is 1 panel. |
The maximum number of pages the generated module can scroll. | Type the maximum number of pages in
Backward scroll pages. The default is 10, which indicates
that users can scroll forward and backward within a 10-page range. If they
scroll forward 11 pages, page 1 is forced out of the range and they cannot
scroll back to it.
Note: |
An option to enable wildcard processing in the generated module. | Select Wildcard support. Numeric key values are input into an alphanumeric field, which allows the user to enter "*", ">", or "<" |
An option to enable records to be exported to a work file in addition to, or instead of, the screen. | Select Export data
support. The work file can then be used in other environments and on
other platforms (for example, in a PC spreadsheet application). To write data
from the generated report to a work file, select the EXPORT-DATA user exit and
define the parameters to export to the work file. The work file number and
delimiter character (used to delimit fields on the report) can be customized
for your site.
Note: |
An option to enable the hardcopy facility in the generated module. | Select Hardcopy support. |
An option to enable the module output to be displayed in a window, rather than a panel. | Select Window support. By default, the window size is adjusted to its content. The window is placed on the screen so that the field from which the user invoked it remains visible. |
A starting value for the browse. | Type the starting value in
Minimum key value. The combination of the minimum and
maximum key values creates a logical window within the file. The program will
not browse before or after these values.
The minimum key value must be a constant. The specified constant is placed into a variable called #MIN-KEY-VALUE, which can be overridden in the START-OF-PROGRAM user exit. |
An ending value for the browse. | Type the ending value in Maximum
key value. The maximum key value must be a constant and greater than
or equal to the minimum key value. The specified constant is placed into a
variable called #MAX-KEY-VALUE, which you can override in the START-OF-PROGRAM
exit.
Note: |
Common parameters for the generated module, such as support for direct command processing, message numbers, and password checking. | Select Specify Common Parameters. | . For information, see
Window parameters for the generated module. | Select Change the Window Settings. | . For information, see
Generation options for the module(s). | See Generation Options. |
Select
.The module is generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Or:
Select .
The Specify Map Details panel is displayed. For example:
Optionally, you can define details for either an external or internal map.
To specify map details:
Define the following optional parameters:
Parameter | Description |
---|---|
Input using map | Name of the layout map used for the
generated module. Either type the name or select The map is included as part of the END OF PAGE processing to input values that control scrolling. The map must adhere to the following conventions:
When more than one horizontal panel is required, use a different map for each panel. Include an asterisk (*) in the map name (for example, MYMAP*) and the asterisk will be replaced by the panel number during generation (for example, MYMAP1, MYMAP2, MYMAP3). If more than nine horizontal panels are used, the map name cannot exceed six bytes. To support an action/selection column for browse-select modules, include the column on the map as an array called #ACTIONS. Attach the #ACTION-CV control variable to #ACTIONS. To display a list of available actions on the generated panel, include the CDDIALDA.#KD-LINE1 and CDDIALDA.#KD-LINE2 variables on the map. |
to display the available maps for selection. If a map is specified, it should
be a short map that is displayed at the bottom of the panel. The CDLAYSC1
layout map is supplied for Browse models. If you do not specify a layout map,
Natural Construct places the input fields
sequentially at the bottom of the panel.
Reserved input lines | Number of lines reserved for input prompts (typically 1, 2, or 3). |
Single prompt | Enables/disables a single prompt to be displayed for all fields (for example, Date:____ __ __). This option applies when the key is a superdescriptor or redefined in Predict. |
Multiple prompts | Enables/disables one prompt to be displayed for each field (for example, Year:____ Month:__ Day:__). This option applies when the key is a superdescriptor or redefined in Predict. |
Internal map non-key fields | Up to eight additional input fields for the browse module. For information, see Specify Field Details. |
Select
.The module is generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Or:
Select .
The following panel is displayed:
Wizard | Panel Displayed |
---|---|
Browse | Specify Restriction Parameters |
Browse-Helpr and Browse-Subp | Specify Additional Subprogram Parameters |
Browse-Select, Browse-Select-Helpr, and Browse-Select-Subp | Specify #ACTION Parameters |
Optionally, you can specify up to eight additional input fields for a browse module. These fields are displayed at the bottom of the generated panel and allow the user to display more information. For example, you can create an additional input field called Detail (format L) to display additional record details. Users can select the Detail field to display the information.
Note:
The additional input fields do not have to be in the
Predict file definition.
This section covers the following topics:
To add a non-key field:
Select Specify Map Details panel.
on theThe Specify Field Details window is displayed. For example:
Define the following parameters for the additional field:
Parameter | Description |
---|---|
Field name | Name of the additional input field. |
Natural format/length | Natural format and length for the field. |
Starting occurrence | Starting occurrence of an array variable to
place on the generated panel.
Note: |
Ending occurrence | Ending occurrence of an array variable to place on the generated panel. |
Prompt text | Text displayed for the field on the generated browse panel. Intensified text must be enclosed within angle (<>) brackets (or whatever attribute character is set for intensify).If you do not specify a field prompt, Natural Construct creates a prompt using the internal name of the input field. |
Prompt off | Enables/disables the display of the prompt text. |
Dynamic Attributes | Change the default dynamic attribute characters. For information, see Change the Dynamic Attribute Characters. |
Panel number | Panel number for the field for the first dimension. If a panel number is not specified, the prompt is displayed on all panels. |
New line | Enables/disables the display of the input field on a new line. |
Session parameters | One or more session parameters for the
additional input field, such as Attribute Definition (AD) or Edit Mask (EM).
For example:
AD=I SG=ON EM='>'X HE='HELPR' |
Select
to add the field.To delete a non-key field:
Select the field you want to delete on the Specify Map Details panel.
Select
.The field is removed from the Internal map non-key fields table.
To edit a non-key field:
Select the field you want to edit on the Specify Map Details panel.
Select
.Or:
Double-click on the row in the Internal map non-key
fields section.
The Specify Field Details window is displayed, showing the current settings for the field.
Edit the field settings.
Select
to save the changes.For a browse program, you can optionally limit the generated module to only browse records prefixed by a global variable. If the prefix is a department code, for example, you can restrict the browse to only those orders prefixed by a particular department code by setting the value of the code as a function of a user ID and storing the value in the global data area.
For a browse helproutine or subprogram, you can limit the browse by passing the prefix portion of the key. To display only the lines for a particular order, for example, you can pass the order number (N6) to the subprogram and enter "N6" in the Natural format field on the Specify Additional Subprogram Parameters panel. On the Specify Restriction Parameters panel, mark the Restrict browse with prefix field and enter "6" in the Number of characters (bytes) field.
The following example displays the Specify Restriction Parameters panel for the Browse-Select wizard:
To specify restriction parameters:
Define the following optional parameters:
Parameter | Description |
---|---|
Restrict browse with prefix | Enables/disables the restriction of the
browse by prefix. When this option is selected, the browse is limited to values
for which the primary key is prefixed by or equal to the specified value.
Note: |
Number of characters (bytes) | Number of bytes of the primary key to use
as the prefix..
Note: |
Number of components | Number of compound key components to use as
the prefix. You can then use the Prefix helproutine
parameters options to assign the helproutine parameters.
Note: |
Field name | Name of the field containing the prefix
value. The value must be a valid Natural field name.
When generating a browse helproutine or subprogram, the prefix portion of the key is assumed to be equal to #PDA-KEY (i.e., the value of the key passed to the helproutine or subprogram). To override this default:
The assigned value (instead of #PDA-KEY) will then be used as the value for the prefix portion of the key. |
Protect prefix | Enables/disables the protection of the
prefix portion of the primary key for the input field. When this option is
selected, the prefix is displayed but cannot be changed.
Note: |
Suppress prefix | Enables/disables the display of the prefix
portion of the primary key. When this option is selected, the prefix portion of
the primary key is not displayed.
Note: |
Helproutine parameters | Up to two restriction helproutine
parameters. For information, see
Specify
Prefix Helproutine Parameters.
Note: |
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Use the NaturalONE Testing option to test a subprogram. For information, see Test a Subprogram Directly in Application Testing.
Define user exits for the subprogram. For information, see Defining User Exits.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
When Number of components is specified on the Specify Restriction Parameters panel, you can optionally attach a helproutine to the prefix of the primary key. This section covers the following topics:
To add a prefix helproutine parameter:
Select Specify Restriction Parameters panel.
on theThe Add Prefix Helproutine Parameters window is displayed. For example:
Define the following parameters for the additional field:
Parameter | Description |
---|---|
Helproutine | Name of the helproutine for the prefix. To attach a helproutine to the prefix of the primary key, enter the name of the helproutine in this field. You can specify a helproutine for each component. |
Parameter name | Parameter for the helproutine for each component. Define the help parameters in the LOCAL-DATA user exit. |
Select
to add the helproutine.To delete a prefix helproutine parameter:
Select the helproutine you want to delete on the Specify Restriction Parameters panel.
Select
.The helproutine is removed from the Prefix helproutine parameters table.
To edit a prefix helproutine parameter:
Select the helproutine you want to delete on the Specify Restriction Parameters panel.
Select
.The Edit Prefix Helproutine window is displayed, showing the current settings for the helproutine.
Or:
Double-click on the row in the Prefix helproutine
parameters section.
Edit the helproutine settings.
Select
to save the changes.For Browse-Select, Browse-Select-Helpr, and Browse-Select-Subp wizards, theSpecify #ACTION Parameters panel is displayed after the Specify Map Details panel. This panel defines the characteristics of the action/selection field. For example:
To specify #ACTION parameters:
Define the following optional parameters:
Parameter | Description |
---|---|
Action format/length | Natural format and length of the action/selection field. The default is A1. |
Total action lines | Total number of action lines displayed on the generated panel. This number corresponds to the maximum number of database records. The default is 14 lines. |
Starting line | Line number on which the action column begins. This number corresponds to the first line containing database information (after the panel and field heading lines). The default is 7. |
Multiple screen lines | Determines whether each record requires
more than one line. For example:
Address: Number-Street City, Province Country, Postal Code |
Starting column | Number of the column in which the action/selection fields are displayed (when not using an external map). This number determines the placement of the action/selection entries. The default is 3. |
Add action as PF-key | Enables a PF-key for the Add action (by
default, PF4).
When generating a browse-select panel, you must decide how users will add records to a file: by entering "A" in the Action field or by pressing an Add PF-key. The first method is effective when adding records to existing files containing one or more records; the second method allows the user to select the Add PF-key while the cursor is positioned anywhere on the screen and add a record to an empty file. |
Actions supported | Actions enabled for the generated browse-select panel. By default, no actions are supported. |
Screen layout | The parameters in this section are used to build the screen layout when not using a predefined map. |
Field heading lines | Number of field heading lines. The default is one line. |
Underline headings | Determines whether field headings are displayed with a line under them. By default, field headings are underlined. |
Blank lines after headings | Number of blank lines between the field headings and the data region. The default is one line. |
Input key lines | Number of lines reserved at the bottom of
the panel for input keys and additional fields. The default is one for input
keys, plus the number of lines for additional input fields that begin on new
lines.
Note: |
Select
.The module is generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Or:
Select
.The following panel is displayed:
Wizard | Panel Displayed |
---|---|
Browse-Select | Specify Restriction Parameters |
Browse-Select-Helpr or Browse-Select-Subp | Specify Additional Subprogram Parameters |
The Specify Additional Subprogram Parameters panel is displayed after the Specify Map Details panel for Browse-Helpr and Browse-Subp wizards and after the Specify #ACTION Parameters panel for Browse-Select-Helpr and Browse-Select-Subp wizards.
When generating a helproutine, the following information is displayed on the Specify Additional Subprogram Parameters panel:
When generating a subprogram, the following information is displayed on the Specify Additional Subprogram Parameters panel:
Use this panel to override the format and/or length of the passed parameter or pass an additional parameter to the helproutine. The key for the browse-select may differ from the key for the calling program. If the key differs, indicate the format and length of the passed key on this panel. Also indicate the name of any additional helproutine parameter, as well as its format and length.
Use the top portion of this panel to specify the format and length of the help field (if it is different from that of the primary browse key).
When generating a helproutine, use the bottom portion of this panel to specify additional parameters. If no additional parameters are specified, the generated helproutine only has one parameter (#PDA-KEY), which contains the contents of the input field to which the helproutine is attached. If the helproutine changes the value of #PDA-KEY, the altered value is displayed in the input field when the helproutine returns control to the INPUT statement.
To specify additional subprogram parameters:
Define the following parameters:
Parameter | Description |
---|---|
Field name | Name of the primary key. By default, #PDA-KEY is displayed. |
Natural format and length | Natural format and length of the passed field (if it is different from that of the key being browsed). This format becomes the format for the #PDA-KEY field. |
Component parameters | |
Field name | Name of the additional parameter. |
Natural format and length | Natural format and length of the additional parameter. Any valid combination of format, length, and decimal positions under Natural is allowed. |
Array index 1, 2, and 3 | Array dimensions. To declare the additional parameter as an array, enter the array dimensions in the 1, 2, and 3 fields. |
Select
.The module is generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Or:
Select .
The Specify Restriction Parameters panel is displayed. For information, see Specify Restriction Parameters.
This section describes the specification parameters for the Object-Browse-Dialog wizard. This wizard generates a character-based user interface to use with object-browse subprograms.
Because a browse module can be transformed into an object-browse subprogram and object-browse dialog program, and because the browse module has different PF-keys and actions and contains both UI and data access, you must consider how the Object-Browse-Dialog wizard works with a transformed object-browse subprogram versus one that was not transformed. If a browse module was transformed, the object-browse dialog program was generated automatically and there is no need to create one (but you can regenerate the dialog program). To differentiate between the two types in this section, these modules are referred to as a transformed object-browse dialog program versus an object-browse dialog program.
This section covers the following topics:
Note:
For more information, refer to Object-Browse-Dialog
Model, Natural Construct Object
Models.
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Object-Browse wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the dialog program to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Title | Title for the dialog program to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated module will do. This field is used internally for documentation purposes. |
Optionally, you can define:
Task | Procedure |
---|---|
A different NaturalONE project into which to generate the module(s). | Type the name of the project in Project or select to display a window listing the existing projects for selection. The project must currently exist. |
A folder into which to generate the module(s). | Type the name of the folder in
Folder or select to display
a window listing the existing folders for selection. The folder must currently
exist within the selected NaturalONE project.
Note: |
A first heading for display on the generated panel(s). | Type the heading in First heading. This heading is centered at the top of the generated panel and intensified. |
A second heading for display on the generated panel(s). | Type the heading in Second heading. This heading is centered under the first heading and intensified. |
An option to suppress the population of fields with default data on the first input screen. | Select Do not populate first input screen. This option indicates whether default data is automatically entered into fields on the first input screen. It can be used to provide consistency between Natural Construct-generated browse and object-browse modules. By default, the first input screen is not populated for a transformed object-browse dialog program and is populated for a generated object-browse dialog program. |
An option to generate a page title when not on input map. | Select Generate a page title (when not on input map). This option indicates whether to automatically code the page title when a map is not being used. By default, the page title is coded for a transformed object-browse dialog program and is not coded for a generated object-browse dialog program. |
The language in which to display text on the generated panel(s). | See Specify International Parameters. |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
Use this panel to define parameters for the related object-browse subprogram and, optionally, to define screen parameters. The generated object-browse dialog uses this subprogram to retrieve records for display.
To specify additional parameters:
Type the name of the subprogram used to retrieve records for display in Object-browse subp or select to display the available subprograms for selection.
Type the name of the logical key by which scrolling takes place in Input key or select to display the available logical keys for selection.
The specified key must be defined in the key PDA. For a transformed object-browse dialog program, the input key begins with A- (Ascending). To preserve the browse ascending and descending functionality, two keys are generated for the primary browse key: one that begins with A- and another that begins with D- (Descending). To expose this functionality to the end user, variables must be set in the START-OF-PROGRAM user exit.
Optionally, you can define the following parameters:
Parameter | Description |
---|---|
Object PDA | Object parameter data area (PDA) used by the specified object-browse subprogram. By default, the wizard will determine the name of the PDA based on the subprogram name. Alternatively, you can type the name or select | to display the available data areas for selection (.NSA file extension).
Key PDA | Name of the key PDA used by the specified object-browse subprogram. The key PDA is comprised of all fields that are components of the logical keys supported by the subprogram. By default, the wizard will determine the name of the PDA based on the subprogram name. Alternatively, you can type the name or select | to display the available data areas for selection (.NSA file extension).
Object LDA | Name of the object local data area (LDA) used by the generated dialog program. The object LDA contains the default field headings used when generating user exits. Either type the name or select | to display the available data areas for selection (.NSL file extension).
Prompt | Field name displayed for the input key on the generated panel. If a field name is not provided, the default name will be used. Either type the name or select Select a Message Number. | to display the available SYSERR numbers for selection. For information, see
Screen Parameters | Specify the language used to display text on the generated panels. See Specify Screen Parameters. |
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Or:
Select .
The Specify Specific Parameters panel is displayed. For example:
Use this panel to define the screen layout, map name, and support for exporting records to a work file or printer. You can also use this panel to change the style of actions used and the window settings.
To specify specific parameters:
Define the following optional parameters:
Parameter | Description |
---|---|
Records displayed | Number of records displayed on the screen at one time (by default, the generated dialog program displays 10 records at one time). |
Natural format/length | Natural format and length for the selection column (for example, A1). |
Horizontal panels | Number of horizontal panels used for the generated dialog program (by default, one panel is used). |
Backward scroll pages | Maximum number of scroll pages within which users can scroll forward and backward (by default, 10 scroll pages). |
Input using map | Name of the layout map used by the generated dialog program. Either type the name or select | to display the available maps for selection (.NSM file extension).
Export data support | If this option is selected, records are exported to a work file (instead of the screen). |
Report data support | If this option is selected, records are exported to a local printer (instead of the screen). |
Use BROWSE-SELECT actions | If this option is selected, the generated
dialog program uses the same actions as those used by a BROWSE-SELECT-generated
module.
Note: |
Window Parameters | Specify window parameters. For information, see Change the Window Settings. |
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Define user exits for the dialog program. For information, see Defining User Exits.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
This section describes the specification parameters for the Object-Browse-Select-Subp wizard. This wizard generates a subprogram similar in functionality to a subprogram generated by the Browse-Select-Subp model. Both subprograms allow users to update multiple rows at one time. The primary difference between the two is that an object-browse-select subprogram can accommodate a client/server environment and you can use a subprogram proxy to access the generated code as a business service.
This section covers the following topics:
Note:
For more information, refer to Object-Browse-Select-Subp
Model, Natural Construct Object
Models.
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Object-Browse wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the subprogram to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Title | Title for the subprogram to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated module does. This field is used internally for documentation purposes. |
Object-browse | Name of the subprogram used to browse this
object. Either type the name of the subprogram or select
Note: |
to display the available subprograms for
selection.
PDA | Name of the parameter data area associated
with the static occurrences value for scrolling parameters. By default, the PDA
name contains the first five characters of the module name and the number of
static occurrences (for example, BCUSTS20). Either type the name or select
Note: |
to display the available data areas for
selection.
Optionally, you can define:
Task | Procedure |
---|---|
A different NaturalONE project into which to generate the module(s). | Type the name of the project in Project or select to display a window listing the existing projects for selection. The project must currently exist. |
A folder into which to generate the module(s). | Type the name of the folder in
Folder or select to display
a window listing the existing folders for selection. The folder must currently
exist within the selected NaturalONE project.
Note: |
An object-maintenance subprogram that will be used to maintain the object. | Type the name of the object-maint
subprogram in Object-maint or select
to display a window listing the existing
subprograms for selection. The subprogram must currently exist.
The object-maintenance subprogram cannot process intra-object relationships. This allows the data presented to the client to be manageable and all data to be modifiable. Note: |
An option to restrict the generation of code to time how long a business service takes to execute. | De-select Time.
By default, this option is selected and code is generated to time how long a business service takes to execute. The result is returned in the business service message. |
Change the number of rows processed and sent across the network at one time (by default, 20, unless the rows are extremely large). | Type the new number in Static
occurrences. The PDA (parameter data area) associated with the
static occurrences hard codes this value (which is used to identify the
V value in the object-browse subprogram) in the
object-browse-select subprogram.
To identify the number of occurrences in this PDA, the default PDA name contains the first five characters of the module name and the number of static occurrences (for example, "BCUSTS20" when the static occurrences value is "20"). Note: |
An option to use message numbers for all REINPUT and INPUT messages. | Select Use message
numbers. When this option is selected, message numbers rather than
message text will be used for all REINPUT and INPUT messages.
Note: |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
This panel displays the names of the methods and browse keys used to determine the sort order for records returned by the object-browse subprogram (specified on the first wizard panel).
Use this panel to rename the default methods, if desired.
To rename the default methods:
Select the method you want to rename in the Method parameters section.
Select
.The Edit Method Name window is displayed. For example:
Change the name of the method in Method name.
Select
.The new name is displayed in the Method parameters section.
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Use the NaturalONE Testing option to test a subprogram. For information, see Test a Subprogram Directly in Application Testing.
Define user exits for the subprogram. For information, see Defining User Exits.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
This section describes the specification parameters for the Object-Browse-Subp wizard. This wizard generates the browse subprogram for an object, as well as three parameter data areas:
Object PDA (defines the returned row data)
Key PDA (defines the search key values)
Restricted PDA ( defines private data used internally by the browse object to maintain context)
This section covers the following topics:
Note:
For more information, refer to Object-Browse-Subp
Model, Natural Construct Object
Models.
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Object-Browse wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the subprogram to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Title | Title for the subprogram to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated module does. This field is used internally for documentation purposes. |
Optionally, you can define:
Task | Procedure |
---|---|
A different NaturalONE project into which to generate the module(s). | Type the name of the project in Project or select to display a window listing the existing projects for selection. The project must currently exist. |
A folder into which to generate the module(s). | Type the name of the folder in
Folder or select to display
a window listing the existing folders for selection. The folder must currently
exist within the selected NaturalONE project.
Note: |
An option to use message numbers for all REINPUT and INPUT messages. | Select Use message
numbers. When this option is selected, message numbers rather than
message text will be used for all REINPUT and INPUT messages.
Note: |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
Use this panel to define additional parameters for your object-browse subprogram.
To specify additional parameters:
Define the following parameters:
Parameter | Description | Required/Optional/Conditional |
---|---|---|
Predict view | Name of the Predict view used by the generated subprogram. The view must be defined in Predict. Either type the name or select | to display the available views for selection.Required |
Natural DDM | Name of the data definition module (DDM)
corresponding to the primary file. If this field is not specified, the DDM name
defaults to the primary file name. The Predict
definition of the primary file determines which fields are included in the
DEFINE DATA section of the generated code. The format of the generated code in
the DEFINE DATA section has the following structure:
1 primary-file-name VIEW OF data-definition-module 2 fields pulled from Predict of primary-file-name |
Optional |
Program view | View name of the primary file for the
generated subprogram. This view must be defined in the LOCAL-DATA user exit or
a local data area (LDA).
If this field is not specified, a view is generated containing all fields in the Predict view. The MAX.OCCURS value in Predict determines how many occurrences of MU/PE fields are included on the panel. |
Optional |
Logical keys | Up to six logical keys to determine the sort order for records returned by the object-browse subprogram. For information, see Specify Key Details. | Optional |
Refresh Default Keys | Retrieves the default key parameters for the specified Predict view and lists them in the Logical keys table. | Optional |
Object PDA | Object parameter data area (PDA) that
defines the rows returned to the object-browse subprogram and the columns
within each row. Either type the name or select Generate to have the data area generated by the wizard.
The generated object PDA contains one column for each field defined in the specified Predict view (as well as additional columns). You can remove any fields that are not components of the primary key. Note: |
to display the available PDAs for selection. Alternatively, you can select
Required |
Key PDA | Key PDA that contains all of the components
contained in the logical keys, as well as a unique ID field. Either type the
name or select Generate to have
the data area generated by the wizard.
Note: |
to display the available PDAs for
selection. Alternatively, you can select Required |
Restricted PDA | Restricted PDA that stores data, such as
the last sort key, the last starting value, the last row returned, etc. so that
the next set of consecutive records is returned to the caller. Either type the
name or select Generate to have
the data area generated by the wizard.
Notes:
|
to display the available PDAs for
selection. Alternatively, you can select Required |
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Use the NaturalONE Testing option to test a subprogram. For information, see Test a Subprogram Directly in Application Testing.
Define user exits for the subprogram. For information, see Defining User Exits.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
Optionally, you can specify up to six logical keys to determine the sort order for records returned by the object-browse subprogram. The calling program indicates the sort order by assigning CDBRPDA.SORT-KEY. If a sort key value is not assigned, the first logical key is used as the default.
The logical key names can map to as many as five components. If a logical key contains only one component, the logical key name is optional. If you do not specify a logical key name, this field defaults to the name of the key component.
If the key field contains MU or PE fields, the rows returned also contain an index value that identifies which occurrence of the MU/PE field satisfies the Read condition.
This section covers the following topics:
To add a logical key:
Select Specify Additional Parameters panel.
on theThe Specify Key Details window is displayed. For example:
Define the following parameters for the additional key field:
Parameter | Description |
---|---|
Logical name | Name of the logical key for which you are defining details. |
Limit components | Number of components of a superdescriptor
(compound key) to use in the logical key. Use this option when the relational
database table contains a superdescriptor with many components.
To restrict the number of components, specify the limit in this field. For example, to use the first two components of the superdescriptor, enter "2". Tip: |
Prefix components | Prefix to use for components of a
superdescriptor (compound key), which optimizes the generated SELECT statements
when browsing by compound keys that have many components. You can use this
option to define a browse object that requires specific values as the leading
components.
Note: |
Histogram support | If this parameter is selected, the
object-browse subprogram contains an additional histogram version of one or
more logical key values. This allows the calling program to request a histogram
be returned. Rather than returning all of the predefined columns for the
object-browse subprogram, only the specific key column is returned along with a
count of the number of records containing the key value.
Note: |
Key Component | Up to five components for a logical key that maps to more than one component. For information, see Specify Logical Key Components. |
Select
to add the field.To delete a logical key:
Select the field you want to delete on the Specify Additional Parameters panel.
Select
.The key is removed from the Logical keys table.
To edit a logical key:
Select the field you want to edit on the Specify Additional Parameters panel.
Select
.Or:
Double-click on the row in the Key Component
section.
The Specify Field Details window is displayed, showing the current settings for the field.
Edit the field settings.
Select
to save the changes.Optionally, you can add up to five components for a logical key that maps to more than one component.
To add a logical key component:
Select Specify Additional Parameters panel.
on theThe Specify Logical Key Components window is displayed. For example:
Define the following parameters for the key component:
Parameter | Description |
---|---|
Key component | Type the name of the key component in
Key component or select to
display a list of components for selection. For example:
You can specify either one superdescriptor or multiple individual descriptors. Note: |
Descending | Indicates whether key component values are
listed in ascending or descending sequence in the generated subprogram. To have
the key component values listed in descending sequence, select this parameter.
Otherwise, values are sorted in ascending sequence.
Note: |
Select
to save the settings.This section describes the specification parameters for the Object-Maint-Dialog wizard. This wizard generates a character-based user interface (Natural program) for an object-maintenance process. The dialog component communicates with the user and invokes methods (data actions) implemented by the object-maintenance subprogram. To generate a complete maintenance process using Natural Construct’s object-oriented approach, use this wizard in conjunction with the Object-Maint-Subp wizard (which also generates the object PDA and restricted PDA).
This section covers the following topics:
Note:
For more information, refer to Object-Maint-Dialog
Model, Natural Construct Object
Models.
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Object-Maint wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel is displayed. For example:
Notes:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the dialog program to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Global data area | Name of the global data area (GDA) used by
the dialog program to be generated. To allow inter-program communication,
generated modules require a small number of global variables. The supplied
CDGDA global data area contains the global variables required to test a
generated module. Before creating a new application, copy this GDA from the
SYSTEM library and rename it to match your naming conventions. Then add any
additional global variables your application may require.
Note: |
Title | Title for the dialog program to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated module will do. This field is used internally for documentation purposes. |
First heading | First heading displayed on the generated panel. This heading is centered at the top of the generated panel and intensified. |
Optionally, you can define:
Task | Procedure |
---|---|
A different NaturalONE project into which to generate the module(s). | Type the name of the project in Project or select to display a window listing the existing projects for selection. The project must currently exist. |
A folder into which to generate the module(s). | Type the name of the folder in
Folder or select to display
a window listing the existing folders for selection. The folder must currently
exist within the selected NaturalONE project.
Note: |
A GDA block for use with the specified GDA. | Type the name of the GDA block in With block. You need only specify the lowest level block name; the corresponding path name is determined automatically. For more information about GDA blocks, see the Natural documentation. |
A second heading for display on the generated panel(s). | Type the heading in Second heading. This heading is centered under the first heading and intensified. |
Common parameters, such as support for direct command processing, message numbers, and password checking. | See Specify Common Parameters. |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
Use this panel to define parameters for the related object-maint subprogram and, optionally, to define screen parameters.
To specify additional parameters:
Define the following parameters:
Field | Description |
---|---|
Object maint subprogram | Name of the subprogram invoked by the generated dialog program. The specified subprogram must exist in the current library. Name of the object-maintenance subprogram used by the generated dialog program. Either type the name or select | to display the available subprograms for selection.
#ACTION field length | Length of the action field. By default,
the length is "1" and all action fields except
Former are marked. If you do not want the generated dialog program to perform a
particular action, deselect the corresponding action field. At least one action
must be selected.
The available actions are:
Notes:
|
Window support | Indicates whether the output from the generated object-maintenance dialog program is displayed in a window instead of on a panel. |
Push button support | Indicates whether actions can be selected by cursor. |
Mark cursor field | Name of the field on the map where the cursor is automatically placed by the generated dialog program. |
Window Parameters | Change the default window parameters. For information, see Change the Window Settings. |
Select
.The Specify Input Map(s) for Horizontal Panel(s) panel is displayed. For example:
Use this panel to define horizontal panels and layout maps and, optionally, add scroll regions for the horizontal panels.
By default, the generated dialog program uses one panel and you must specify a layout map for that panel.
To specify the layout map for panel 1:
Select the "1" row in Add Horizontal ....
The
and buttons are enabled.Select
.The Define Horizontal Panel Details window is displayed. For information, see Define Horizontal Panel Details.
Note:
You can also use the Define Horizontal Panel
Details window to add additional horizontal panels. For information,
see Add a Horizontal
Panel.
Either type the name of the layout map in Map or select to display a list of available maps for selection.
The Specify Input Maps for Horizontal Panels panel is redisplayed, showing the name of the layout map in Input Map for panel 1.
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Define user exits for the dialog program. For information, see Defining User Exits.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
Optionally, you specify up to nine horizontal panels for the generated dialog (you must specify a minimum of one panel). If more than one panel is specified, the left and right PF-keys are activated in the generated program to allow left and right scrolling between panels.
This section covers the following topics:
To add a horizontal panel:
Select Specify Input Maps for Horizontal Panels panel.
on theDefine Horizontal Panel Details window is displayed. For example:
Define the following parameters for the horizontal panel:
Field | Description |
---|---|
Map | Name of the layout map used for the corresponding panel. Either type the name of the layout map or select | to display a list of available maps for selection.
Depth occurrences | To create a scroll region with a third
dimension, specify the maximum depth occurrences value. For example, for a
calendar with the months and days forming the first two dimensions (horizontal
and vertical) and the year forming the third dimension (depth), you can specify
"3" to scroll up to three yearly tables of calendar
months and days, and within each yearly table, scroll vertically through the
days.
The Depth occurrences value applies to the 3rd dimension on a panel, which means that it applies to all 3-dimension arrays on the map when using the #DEPTH index variable. To allow the value of the #DEPTH variable to be changed, you can either place the #NEXT-DEPTH (P3) variable on the specified map or use PF-keys that you process in the AFTER-INPUT user exit. |
Scroll region details | Information for up to four vertical scroll regions for each horizontal panel. To define a scroll region, select Define Scroll Region Details. | . For information, see
Select
to add the panel.To delete a horizontal panel:
Select the panel you want to delete on the Specify Input Maps for Horizontal Panels panel.
Select
.The panel is removed from the Scroll region details table.
To edit a horizontal panel:
Select the panel you want to edit on the Specify Input Maps for Horizontal Panels panel.
Select
.Or:
Double-click on the row in the Scroll region
details table.
The Define Horizontal Panel Details window is displayed, showing the current settings for the panel.
Edit the panel settings.
Select
to save the changes.Optionally, you can define up to four vertical scroll regions (consisting of vertical arrays) for each horizontal panel. Scroll regions are only required for array fields. For example, assume you have an array field called #YEAR and each occurrence contains one month, but there is only enough space on the screen to display three months. In this case, a scroll region with a screen occurrences value of "3" is required.
In addition to scrolling through the months, you may also want to display the revenue for each month and have the revenue data change when the month changes. To do this, the starting index for #YEAR and #REVENUE must be the same. For example, assume the following:
#YEAR (A4/12) #REVENUE (N5.1/12)
On the specified layout map, there should be three occurrences of both #YEAR and #REVENUE. For example, if these fields are in the first scroll region, use #ARRAY1 as the starting index for both fields. The object-maint dialog program will generate the appropriate code based on the values defined for the scroll region (for example, top left and bottom right). If the cursor is in the area defined by the upper left and bottom right coordinates, then #ARRAY1 will be incremented appropriately when the forward or backward PF-keys are selected.
Tip:
You can think of a two-dimensional (2D) array as a collection of
many one-dimensional (1D) arrays. And you can think of a fixed instance of a
third dimension of a three-dimensional (3D) array as a 2D array. Therefore, a
vertical scroll region on a generated panel can consist of 1D, 2D, or 3D
arrays.
This section covers the following topics:
Note:
If you add scroll regions, the specified map should contain array
fields that match the specified values.
To add a scroll region:
Select Define Horizontal Panel Details panel.
on theDefine Scroll Region Details window is displayed. For example:
Define the following parameters for the scroll region:
Field | Description |
---|---|
Total occurrences | Total number of scrollable lines required
for the scroll region. This value applies when the generated dialog program
includes a line scroll feature to scroll:
The generated program ensures that the values assigned to the array index values (#ARRAY1 through #ARRAY4) do not exceed the total occurrences value for each array. |
Screen occurrences | Total number of lines displayed on the panel at one time (used when the Total occurrences value is specified). |
Scroll with panel | Panel number to force a particular starting from value for a scroll region on a panel (so it has the same value as another panel). Each panel maintains its own current values for #ARRAYn, where n is 1, 2, 3, or 4. |
Scroll region location
Top left |
Location of the top left corner of the
scroll region. A scroll region is always rectangular and is defined by
specifying the panel coordinates of the top left and bottom right corners.
Users can press the bkwrd and frwrd PF-keys to position the scroll regions
backward and forward.
The values for the top left corner are:
|
Scroll region location
Bottom right |
Location of the bottom right corner of the
scroll region. These values are:
|
Select
to add the scroll region.To delete a scroll region:
Select the scroll region you want to delete on the Define Horizontal Panel Details panel.
Select
.The scroll region is removed from the Scroll region details table.
To edit a scroll region:
Select the scroll region you want to edit on the Define Horizontal Panel Details panel.
Select
.Or:
Double-click on the row in the Scroll region
details table.
The Define Scroll Region Details window is displayed, showing the current settings for the panel.
Edit the scroll region settings.
Select
to save the changes.This section describes the Object-Maint-Subp wizard, which generates a subprogram that maintains complex data objects. The subprogram updates all entities within an object and contains a full range of integrity checks (as defined by Predict relationships) and object semantics (in the form of Predict automatic rules or object manipulation within user exits).
This section covers the following topics:
Notes:
The Specify Standard Parameters panel is displayed when the wizard is invoked; it is similar for all Object-Maint wizards.
To specify standard parameters:
Open the context menu in the Navigator view for the NaturalONE project in which you want to generate the modules.
Or:
Open the context menu in the Navigator view
for the library in which you want to generate the modules.
Select
.The Specify Standard Parameters panel is displayed. For example:
Notes:
Define the following parameters:
Parameter | Description |
---|---|
Library | Name of the library in which to store the generated modules. Either type the name or select | to display the available libraries for selection.
Module | Name of the subprogram to be generated. This name must be alphanumeric, a maximum of eight characters in length, and cannot contain blanks. |
Title | Title for the subprogram to be generated. The title is used internally to identify modules for the List Generated Modules function on the Generation main menu. You can customize the title for your application. |
Description | Brief description of what the generated subprogram does. This field is used internally for documentation purposes. |
Optionally, you can define:
Task | Procedure |
---|---|
The hash-locking method of optimistic record locking (instead of the timestamp method). | Select Use hash-locking method. When this method is selected, the Hold field parameter is disabled on the second specification panel and the Object LDA parameter is enabled. To enable the Hold field, deselect Use hash-locking method. |
Message numbers for all REINPUT and INPUT messages (instead of message text). | Select Use message
numbers. When this option is selected, message numbers rather than
message text will be used for all REINPUT and INPUT messages.
Note: |
Generation options for the module(s). | See Generation Options. |
Select
.The Specify Additional Parameters panel is displayed. For example:
Use this panel to define additional parameters for your object-maintenance subprogram.
To specify additional parameters:
Define the following parameters:
Parameter | Description |
---|---|
Predict view | Name of the Predict view used by the generated subprogram. The view must be defined in Predict. Either type the name or select | to display the available views for selection.
Primary key | Name of the key in
Predict for the primary file. This key becomes the
primary key to access the view for maintenance. The key can be a descriptor,
superdescriptor, or subdescriptor. If the key does not exist in the specified
Predict file, an error message is displayed.
Note: |
Hold field | Name of the field used to logically protect
the record against intervening update or delete actions. Because an
object-maintenance subprogram does not use the record-holding facilities of the
DBMS to lock records during a GET operation, a hold field must exist
in the primary file for the object. Valid data types are:
Note: |
Object PDA | Name of the object parameter data area
(PDA) that defines the rows returned to the object-maint subprogram and the
columns within each row. Either type the name or select
Generate to have the data
area generated by the wizard.
The generated object PDA contains one column for each field defined in the specified Predict view (as well as additional columns). You can remove any fields that are not components of the primary key. Note: |
to display the available PDAs for selection.
Alternatively, you can select
Restricted PDA | Name of the restricted PDA that stores
data, such as the last sort key, the last starting value, the last row
returned, etc. so that the next set of consecutive records is returned to the
caller. Either type the name or select Generate to have the data area generated by the wizard.
Notes:
|
to display
the available PDAs for selection. Alternatively, you can select
Generate | Indicates whether an existing object PDA or restricted PDA is regenerated. Regeneration is required when fields have changed in the file. If the PDAs do not exist, they will be automatically generated by the wizard. |
Object LDA | Name of the object local data area
generated for the object-maintenance subprogram.
Note: |
Select
.The Specify Input Parameters panel is displayed. For example:
Use this panel to define additional input parameters for your object-maintenance subprogram.
To specify input parameters:
Define the following parameters:
Parameter | Description |
---|---|
Description | Object description used in messages. If you specify "Person", for example, messages are displayed as "Person not found" and "Person displayed". |
Name | Name of the level 1 structure used to
qualify the fields in the object PDA. (It is easier to identify the source of
these attributes when the PDA name is used for this purpose.) The object name
should be kept to a reasonable length.
Note: |
Log file suffix | If you want to log objects, you have to
create a log file corresponding to each entity within the object. The name of
the log file is the name of the object file concatenated with the suffix
specified here. For example, if the object consists of the NCST-ORDER-HEADER
and NCST-ORDER-LINES entities and you specify
"-LOG", the log file names are NCST-ORDER-HEADER-LOG
and NCST-ORDER-LINES-LOG.
The following fields are required in the log file that corresponds to the header entity in the object:
In the log files corresponding to the sub-entities in the object, only the LOG-ACTION field is required. Note: |
Next action prefix | If the primary key is compound or redefined
into various components, supply a value to limit the number of prefixed
components confined on the Next action. This allows the subprogram to maintain
objects with a common prefix value.
For example, if the primary key is made up of Company + Account + Division and you do not want the Next action to span the Division values, specify "2". Specify "1" if the Next action is to be limited to the current Company value. |
Select
.The modules are generated using the current specifications. When generation is complete, the available user exits are displayed in the Outline view.
Save the generated modules.
At this point, you can:
Use the NaturalONE Testing option to test the subprogram. For information, see Test a Subprogram Directly in Application Testing.
Define user exits for the subprogram. For information about the User Exit editor, see User Exit Editor, Natural Construct Generation.
Edit generated source code that is not within user exits. For information about the protected lines in the generated source code, see Using the Source Editor in Using NaturalONE.
Use NaturalONE functionality to upload all generated modules to the server.
This section describes the Specify Common Parameters window, which defines common parameters such as support for direct command processing, message numbers, or password checking.
To define common parameters:
Select
.The Specify Common Parameters window is displayed. For example:
Select one or more of the following options:
Option | Description |
---|---|
Direct command processing | Select this option to enable direct command processing. |
Message numbers | Select this option to use message numbers
rather than message text for all REINPUT and INPUT messages.
Note: |
Password checking | Select this option to enable password checking. To include password checking, you must also set up a password file. For information, see Set Up a Password File. |
Select
to save the settings.You can specify password checking for many of the generated modules. Natural Construct builds the mechanism for password checking into your modules by including the CCPASSW copycode member. Within this copycode, the CDPASSW subprogram is invoked and passed the module and library names.
To include password checking, you must set up a password file. The file is keyed on the module name used to catalog the module and the library name used to generate the module.
The password file can be a view of any file with Natural-Construct-Password as the data definition module (DDM) name. The view must contain the following fields:
Field | Format |
---|---|
PASSWORD-KEY | A40 (32-character library name, plus an 8-character module name) |
PASSWORD | A8 (8-character password) |
When a user attempts to invoke the module, the CDPASSW subprogram reads the password file. If the module/library name combination exists in the file and does not have a password, the user can invoke the module. If the module/library name combination exists and has a password, the user must enter the correct password before the module is invoked. If a user enters five incorrect passwords, execution is aborted.
If you specify password checking, you must modify the CDPASSW subprogram to include a valid password view and any final processing you want to perform and then catalog the modified subprogram. For more specific password checking, you can modify the CCPASSW copycode member (to call a different subprogram) or modify the CDPASSW subprogram (to refine your security standards).
This section describes the Specify Window Parameters window, which defines window parameters such as the height, width and position of the generated window, as well as whether it has a frame or not.
To change the window settings:
Select
.The Specify Window Parameters window is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Height | Number of lines the window will span. |
Width | Number of columns the window will span. |
Line | Number of lines from the top of the panel to the top of the window. |
Column | Number of columns from the left side of the panel to the left side of the window. The line and column values form the top left corner of the window. |
Frame off | Determines whether the window is displayed with or without a border. Select this option to display the window without a border (frame). |
Title | Title used for the window. |
Select
to save the settings.This section describes the Specify the Dynamic Attribute Parameters window, which allows you to define up to four attributes, one of which must be the return to default display attribute (Default return field).
Notes:
To change the dynamic attribute characters:
Select
.The Specify the Dynamic Attribute Parameters window is displayed. For example:
Define up to four dynamic attributes, one of which must be the return to default display attribute (Default return field).
Select
to save the settings.This section describes the Specify International Parameters window, which defines the language used to display text on generated panels. You can define international parameters for modules generated using the Object-Browse-Dialog and user exit models.
To specify international parameters:
Select
.The Specify International Parameters window is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Message numbers | Type of messages used. When this option is selected, the generated code uses message numbers rather than message text. |
Construct prompts | Type of prompts used. When this option is selected, the model generates Natural Construct-style prompts (for example, 1 of 2). |
Language number | Code for the language used when generating message text. The default is 1 (English). |
Model library | Name of the SYSERR message library used to retrieve common message text. The default is CSTAPPL. |
Application library | Name of the SYSERR library used to retrieve message text for user-defined SYSERR references. This parameter is only applicable to modules generated using the Object-Browse-Dialog wizard. If you do not specify an application library, the Model library value is used. |
Cursor translation | When this option is selected, the generated code supports cursor-sensitive translation (users can modify or translate panel text dynamically in translation mode). |
Translation LDAs | Names of the translation local data areas (LDAs) used by generated modules. You can specify up to five translation LDAs. Either type the name or select | to display the available data areas for selection.
Select
to save the settings.This section describes the Specify Screen Parameters window, which defines how information is displayed on the generated screen.
To specify screen parameters:
Select
.The Specify Screen Parameters window is displayed. For example:
Define the following parameters:
Parameter | Description |
---|---|
Screen header lines | Number of screen heading lines displayed on the generated screen (by default, two panels). |
Field heading lines | Number of field heading lines displayed on the generated screen (by default, one line is reserved for each field heading line). |
Blank lines after headings | Number of blank lines inserted after the field heading lines. For example, if you specify "1", one blank line is inserted below each field heading line. |
Underline headings | Indicates whether field headings are underlined. By default, this option is marked and field headings are underlined on the generated screen. |
Number of lines/record | Number of screen lines required to display each record and its attributes (by default, one line is reserved for each record). |
Starting column | Number of the screen column in which the selection column begins. |
Number of input lines | Number of screen lines required to display the input keys (by default, one line is reserved for each input key). |
Position Bottom | Indicates whether the input key lines are displayed at the bottom of the generated screen (by default, this option is selected and the input key lines are displayed at the bottom). |
Position Top | Indicates whether the input key lines are displayed at the top of the generated screen. To have the input key lines displayed at the top of the screen, select this option. |
Select
to save the settings.This section describes the Select Message Number window, which displays the available SYSERR numbers for selection.
To select a SYSERR number:
Select Prompt on the Specify Additional Parameters panel.
forThe Select Message Number window is displayed. For example:
This window displays the available SYSERR numbers for selection.
Define the following parameters:
Parameter | Description |
---|---|
Message number | Number of the SYSERR listing in the specified library (by default, "1"). To display a different SYSERR listing, type a new number and select to display the SYSERR numbers in the specified library, beginning at the new number. |
Library | Name of the library containing the SYSERR numbers (by default, "CSTAPPL"). To change the library, type a new library name and select to display the SYSERR numbers in the specified library. |
Language | Code for the language number (by default, "1" for English). To change the language, type a new language code and select to display the SYSERR numbers in the specified language. |
More | Displays additional SYSERR numbers (when more than 100 numbers are available). To display the next 100 SYSERR numbers, select | . Once all numbers have been displayed, the button is disabled.
Select the SYSERR number you want to use in the table.
Select
.This section provides an example of using the QUIT wizard to generate a quit program.
To generate a quit program:
Open the context menu in the Navigator view for the NaturalONE project into which you want to generate the quit program.
Or:
Open the context menu in the Navigator view for
the library into which you want to generate the quit program.
Select
.First the Progress Information window is displayed, showing progress as the model specifications are initialized, and then the wizard panel is displayed. For example:
The names of the project and library from which this panel was invoked are displayed (you can change these if desired).
Type "MYQUIT" in Module.
Type "CDGDA" in Global data area.
The CDGDA global data area contains the global variables required to test a generated module.
Select Finish.
The generation progress is displayed at the bottom of the panel. For example:
When generation is complete, the quit program is displayed in the Navigator view. For example:
The quit program is also displayed in the editor. For example:
At this point, you can define additional processing within user exits. User exit code is preserved during regeneration. For information, see Defining User Exits.
You can regenerate any module that was generated using a Natural Construct or client generation wizard. You can also select more than one project, folder, or object to regenerate multiple modules. When regenerating multiple modules, a selection window is first displayed to select the resources to be regenerated.
To regenerate Natural Construct-generated modules:
Open the context menu for one or more projects, folders, or modules in the Navigator view.
You can use standard selection techniques.
Select
.The model PDA is uploaded to the mainframe to be populated and then downloaded to the local Eclipse environment to populate the PDA values before displaying the first wizard specification panel. You can then edit the specifications and select
.Or:
Select .
A progress window is displayed as the wizard locates and loads the regeneratable resources. Next, a selection window is displayed to choose the resources you want to regenerate. For example:
Use this panel to:
Task | Procedure |
---|---|
Filter the list of resources for selection. | Type a prefix in Filter. For example, if you type "AP", only the resources beginning with AP are selected. |
Use a different code generator to regenerate the resource. | Type the generator ID in Generator ID. |
Deselect all resources. | Select Deselect All. |
After selecting the resources, select
. The modules are generated without displaying the wizard panels.When regenerating a resource that was generated using a Natural Construct client generation wizard, the following process occurs:
The original generated source code is uploaded to the Natural server.
This allows the **SAG
lines to be parsed into the model
PDA (and user exits to be processed later).
The Read program is executed to populate the model PDA.
The generation process begins, using the downloaded model PDA data.
User exits are merged on the server.
All generated modules are downloaded from the server to the client.