Database Functions

817 Views


CHGOBJ - Database Function

The Change Object (CHGOBJ) function defines a routine to update a record in a file.

The CHGOBJ function includes the processing to check that the record exists before updating the database record.

There are no device files associated with the CHGOBJ function, however, it does have action diagram user points.

This function must be attached to an update access path.

The default CHGOBJ function is used to update all fields in the database record.

If you want to change only a subset of the fields on the file, you must define a new CHGOBJ function specifying each field to be excluded as a Neither parameter or define a CHGOBJ based on a different access path containing only those fields.

CRTOBJ - Database Function 

The Create Object (CRTOBJ) function defines a routine to add a record to a database file.

The CRTOBJ function includes the processing to check that the record does not already exist prior to being written to the database.

The CRTOBJ function has neither a device design nor function options; however, it does have action diagram user points.

A CRTOBJ function is provided by default for every database file.

All CRTOBJ functions are attached to an Update (UPD) access path.

DLTOBJ - Database Function

The Delete Object (DLTOBJ ) function defines a routine to delete a record from a database file.

The DLTOBJ function includes processing to check that the record is still on the file before deleting it.

You can add processing to a DLTOBJ function such as processing that performs a cascade delete of any associated records.

The DLTOBJ function has neither device files nor function options.

However, it has action diagram user points. A DLTOBJ function is provided for all files.

By default, it is normally inserted into the Delete DBF Record user point in all edit functions.

RTVOBJ - Database Function

The Retrieve Object (RTVOBJ) function specifies a routine to retrieve one or more records from a database file.

Processing can be specified for each record read, by modifying the action diagram for the function.

The RTVOBJ function attaches to a Retrieval (RTV), Resequence (RSQ), or Query (QRY) access path.

The QRY access path lets you specify virtuals as key fields. There are no function options or device designs available for RTVOBJ.

The RTVOBJ function reads one, all, or a selection of the records or array entries according to the specified entry parameters.

If you need data to be returned from the RTVOBJ to the calling function, you must perform moves within the RTVOBJ user points.

The best way to implement this is to use *MOVE ALL from a DB1 context to a PAR context if the record is found. The fields to be passed back to the calling function must be specified as output parameters on the RTVOBJ.

DFNSCRFMT - Device Function

The Define Screen Format (DFNSCRFMT) function defines a standard panel header and footer for use by other functions that have panel designs attached to them.

There are four default Define Screen Format functions shipped as standard header/footer formats for the device function panel design.

· *STD SCREEN HEADINGS (CUA) function follows the SAA CUA Entry Model standards.

· *STD CUA WINDOW function follows CUA standards for window panels.

· *STD CUA ACTION BAR function follows CUA standards for action bar panels.

· *STANDARD SCREEN HEADINGS function follows standards for the System/38.

DFNRPTFMT - Device Function

The Define Report Format (DFNRPTFMT) function defines a standard report header and footer for your Print File report functions.

A default DFNRPTFMT function is shipped with Synon/2E to define standard header/footer formats for device function report designs. 

Post Comments