[Access to Wang masthead]

This Year's Model

Improved features add more usability for DATENTRY

From "VS Workshop",  Access to Wang, February 1990
  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  

This month I'll continue my discussion of the revised Wang File Management utilities with a review of DATENTRY. As with the CONTROL utility, this tool has received some attention from the folks at Wang and the enhanced capabilities show it.

CONTROL enhancements to DATENTRY

One of the primary purposes of the CONTROL utility is to specify the manner that DATENTRY, INQUIRY, and REPORT use files. Several of the enhancements in the latest version of CONTROL result in better features in DATENTRY. These changes are:

New DATENTRY options, operation

The new DATENTRY is somewhat different in appearance and operation to prior versions - enough different that casual users should be warned of the change.

The INPUT screen has a new PFkey option to create a data file - moved from the OPTIONS menu. In prior versions of DATENTRY, there was no warning that a file did not exist until the user attempted to modify it. You may search for a control file from INPUT by leaving the file name blank, just as with the new version of CONTROL.

The OPTIONS menu is noticeably different, with two additional PFkey options, the absence of the CREATE option, and display of the control and data file names and record count. The CREATE option was rightfully moved to the INPUT screen, since many users have inadvertently created a data file without intending to. Procedure writers can now suppress the INPUT screen to avoid this problem. All other options (add, modify, delete, display, and modify Field Attribute Characters) are still in their respective places on the menu, so procedures should not be affected. PF32 (shifted PF16) has been added to provide direct exit from DATENTRY, bypassing the INPUT screen.

The additional selections on the OPTIONS menu are to create EZFORMAT source and call the INQUIRY utility. The EZFORMAT option creates a screen image (the SAVE file) and the associated field descriptions (the FLDS file) so the Data Entry option of EZFORMAT can be used to generate COBOL or RPGII source. This feature allowed me to generate a flawless COBOL data entry program in less than ten minutes.

The call to INQUIRY seems redundant, since INQUIRY can be run alone or from the OPTIONS menu of CONTROL. It is present as an alternative to viewing data within DISPLAY, allowing quick, understandable review of the contents of a data file.

The internal operation of DATENTRY has been smoothed and polished. Standard PFkeys used in other Wang utilities have been employed for selection of the next record and first record in the file. Alternate key paths can be selected by PFkey rather than by typing in the field name; the primary key path can be re-selected by pressing PF17 (shifted PF1).

A new option (PF12) allows display of table and range validation for all affected fields. Range limits are displayed on the screen for all variables that use them, and the name of table files are also shown. To pick a value from a table, tab to the name of the table file and press RETURN, then select the value from the list and press RETURN again; the value will be returned to the field on the data entry screen.

Users of indexed files will appreciate the new option within Modify mode to display prior records. No, Wang's operating system still does not routinely allow backwards travel along index paths; this trick is accomplished by saving the last key accessed and reading the associated record directly. This feature is particularly handy if (like me) you use the type-ahead feature and tend to type too fast.

All of the stamp fields - including the old MMDDYY date option - now display current values in Add mode. The stamp for Date and Time Last Modified (option 6) will also update the field every time it is modified - even if you have set the field's Display Code to 2 (Display only after entry). (The other stamp field types retain their information until manually modified.)

A little-used feature of CONTROL and DATENTRY is the Cumulative field type. Using this feature, any number of numeric fields in a CONTROL file may be accumulated into another field in the same file, with subsequent modifications to any of these fields triggering a revised value in the accumulator. DATENTRY will accept modification to the Cumulative Field's value in Add or Modify modes but will substitute correct values before storing the record.

The EZFORMAT and INQUIRY options

If your needs run to more elaborate data entry functions than DATENTRY can provide, the EZFORMAT screen option should be of interest. When selected, DATENTRY will create a screen file suitable for the Data Entry option of EZFORMAT and also the related field definitions. This makes it very easy to use EZFORMAT to create a COBOL or RPGII data entry program, then modify it to suit special needs. This might be of particular interest in secured environments, where access to DISPLAY, DATENTRY, and other file-management utilities are used with strict controls.

When the INQUIRY option is selected, the data and CONTROL file names are passed directly, removing user control over the INPUT options and other features. At the conclusion of each query, control returns to DATENTRY, removing any chance to formulate another query, save the prior query, or create a REPORT definition based on the query. In this case, INQUIRY is intended primarily to allow fast, understandable display of data contained in a file and does not replace other use of INQUIRY.

Using DATENTRY in production systems

All of the File Management Utilities are intended for specific technical uses and not as production systems; all allow too much access for proper systems administration and are too tolerant of user errors. Anyone in the VS world will tell you, though, that there are production systems built around them! Here are a few suggestions if you wish to use DATENTRY with live data:

That's the rundown on the new versions of CONTROL and DATENTRY. I have also created a table (Figure 1) of the changes to the CONTROL file format, which you can add to Appendix B of the Wang VS File Management Utilities Reference (pub. 800-1308-01). If there is sufficient from readers, I will write a small system using all of these tools and a few Useraids as well.


Figure 1: CONTROL File Format Changes

Byte Position Field Name Permissible Values
27-29 Timeout 000 through 255
49 File type (I)ndexed, (C)onsecutive, or (R)elative
50 Open mode (Y)es (open SHARED) or (N)o (open I/O)
51-58
59-66
67-72
Data file
Data library
Data volume
Default data file; used by DATENTRY

  [ Prior Article ]     [ Return to the Catalog of articles ]     [ Next Article ]  


Copyright © 1990 Dennis S. Barnes
Reprints of this article are permitted without notification if the source of the information is clearly identified