TIPS FOR A PRO DATASET DEVELOPER

There have been a number of major milestones in Progress releases. The first that comes to mind in more recent times was the introduction of the appserver. Since then there have been other significant introductions such as super procedures, processing handles, and object orientated code. Another recent significant feature, which is the text of this paper, is the prodataset.

The dataset’s main advantage is the ability to encapsulate data, both related and unrelated, and share that data between procedures, internal procedures, and environments as a single parameter. Between environments the dataset is copied from one dataset object to another, but within the one environment a dataset can be shared between procedures. A procedure can access that data dynamically, or procedurally using standard 4GL coding and as no physical data passes there is virtually no overhead.

Another significant feature of the prodataset is the captured changes log that is used to track changes and ensure a user doesn’t update another’s changes.

Some Principles of Prodataset Design

1. Define Temp Tables (TT’s) as an include and do not use LIKE
2. Allow for name variations
3. Include a {&referenceOnly} argument in each TT and PDS definition
4. Consider the indices you need on the TT’s
5. Add a standard include to each TT including database rowid

Prodataset coding tips

1. Consider the fill mode to use
2. Stoping a fill
3. Refresh a TT row
4. Let the data-source resolve the query and use fill-where-string
5. Add an inactive relation to fill up from child
6. Add indexed-reposition when restart-rowid is used
7. Use an include field list rather than an exclude list
8. Empty a dataset when filling from a persistent procedure
9. Fill associated tables
10. Use SELF to identify the TT buffer in a fill row callback
11. Try and keep your dataset code non-dataset specific
12. INPUT/OUTPUT has little meaning when passed by reference
13. Remember to set and unset tracking-changes even on the server
14. Don’t forget to accept or reject changes
15. Create an anyChange function to check if get-changes had changes
16. Use NO-UNDO TT’s when saving row changes
17. Saving LOBS
18. After SAVE-ROW-CHANGES ensure usual after-row-fill completed
19. Capture user changes after a save conflict
20. Consider you save methodology and your transaction scope
21. Develop a method to copy between datasets


AttachmentSize
TIPS FOR A PRO DATASET DEVELOPER.pdf415.64 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Updated Attachment

Updated procedure refreshDataset at the end of the attachment to ensure deleted rows are not refreshed.