Technical Reference

Process Module

This chapter gives an overview of the Process Module generated by DataPaint.  This chapter assumes that you are familiar with ACCENT R Process Modules.  See Volume II of the ACCENT R Reference Manual for more information on Process Modules.

The Process Module can be modified to suit a particular need.  However, most changes can be done through DataPaint.  Any change that is made to the Process Module may be overwritten by another version of the Process Module if it is recreated using its associated form definition (.FD) file.

Records in the MAIN Data Set can be entered or retrieved.  Fields from the joined Data Sets can be displayed but not updated.

If you related a Data Set or Data Index that has an associated Control File (CF), or if the Data Index is an RMS file, then DataPaint will create the Process Module with the necessary logic to handle Simultaneous Update conditions.

The Process Module provides a menu bar so that the user can select a function.  The definition of this menu is in LAYOUT SCREEN MENU.MAIN.

The following  section’s describe each of the menu selections in MENU MENU.MAIN.  The ROUTINEs are arranged in alphabetical order in the process section.

Enter - ROUTINE MAIN.ENTER

This function adds new records to the MAIN Data Set.  Records in the joined Data Sets are not affected.

You may want to write a routine that validates the value of fields in the MAIN Data Set.  The routine name is specified on the Field Definition Attributes window.  See the explanation for the Modify function.

Modify - ROUTINE MAIN.MODIFY

This function modifies (changes) records in the MAIN Data Set.  Records in the joined Data Sets are not affected.  The record to be modified must first be retrieved using the Get function on the main menu.

Delete - ROUTINE MAIN.DELETE

This function deletes records in the MAIN Data Set.  Records in the joined DSs are not affected.  The record to be deleted must first be retrieved using the Get function on the main menu.  Once a record is retrieved and chosen for deletion, the Process Module prompts for verification.

Get - ROUTINE MAIN.GET

This function displays the Get menu so the user can retrieve records from the MAIN Data Set.  See LAYOUT SCREEN MENU.GET for a complete description of the function performed by each of the menu selections.

The retrieval method is determined by the syntax of the GET statements generated by DataPaint based upon the type of Data Set (DI, ID, DS, SD), the access mode (U, I), and the number of domains (if used) to access the Data Set.

Select Page - ROUTINE MAIN.PAGE and ROUTINE PAGE.NEW

This function changes the current page by pasting another page on top of any pages currently pasted upon the screen.

About - ROUTINE MAIN.ABOUT

This function displays the current page number and the current domain being used to access the MAIN Data Set.  You may want to add other information to display to the user.

Pages

A particular page can be changed by making modifications to the appropriate LAYOUT.  Pages are numbered from 1 to 99.  Portions of LAYOUT syntax not specified through DataPaint are left commented out to make it easy to modify.

To make changes associated with the closing of a page, modify the ROUTINE specified in the PERFORM statement of the LAYOUT.

In order to make changes for a specific field, you may modify the FIELD statement in the LAYOUT, or any associated sub-statement.  The PERFORM sub-statement and the ROUTINE are always written in the Process Module, but are left commented out.

Files Used By Datapaint

form-name.FD

Form Description This System File is the main "driver" for all DataPaint forms.  It contains a description of your form that DataPaint can understand.  Anytime you change an existing form, DataPaint uses this file, so do not delete it.

###ACCPNT2_FDF.TMP

Form Definition This System File contains commands and Process Module statements.  This System File is USEd by DataPaint to compile the Process Module.

###ACCPNT2_LOG.TMP

Log File This System File contains compiler error messages that occurred when DataPaint tried to save the Process Module (Create function).

form-name.LYT

Layout This System File contains the SMF statements for your form.  This System File can be USEd to create a System Information (SI).  It is created when you execute the Layout function.  You can copy this file into a Process Module, a Code Segment, or a Global Storage.

Process Module

The text of the Process Module is held even if it does not compile.

Temporary Files

DataPaint creates several temporary files during its execution that are deleted before normal termination.  If there is an abnormal termination (such as a system crash), you may see the files below in your directory.  All of these files may be deleted without affecting your form.

###ACCPNT2_FLD.DI             ###ACCPNT2_TXT.DI

###ACCPNT2_FLD.DS             ###ACCPNT2_TXT.DS

###ACCPNT2_FMI.DS             ###ACCPNT2_RTN.DI

###ACCPNT2_FMO.DS             ###ACCPNT2_RTN.DS

###ACCPNT2_SD.DI

###ACCPNT2