February 8, 2008 What you want... When you want it Volume 08.2
UpdatePlus and Data Integrity

Evolution Made Simple

February 2008: Evolution is the natural course of events. It has been with us since the beginning of recorded time and has made us what we are today. It has allowed life to flourish and adapt to the ever-changing environment from the ice age to the atomic age.

The rules of evolution also apply to computer applications. Applications, good applications, must continue to evolve in order to meet the ever-changing needs of business – those that don't evolve don't survive.

Take simple changes that can occur over the live of an application such as the need to maintain additional information. Ten years ago, few applications would have maintained information such as email addresses or web site addresses for clients. Five years ago, no one might have considered maintaining a Skype contact name and only a few years ago no one had heard of LinkedIn or Facebook. As the business environment changes, so too must business applications and one of the greatest challenges is how to introduce new data into existing applications.

While the application code to actually record and maintain new information itself is generally not difficult, retrofitting these changes into existing Business Basic style applications can be.

This is where our latest innovation UpdatePlus™ can help.

What is UpdatePlus™?

Conceptually, UpdatePlus™ is a simple concept. When a file is updated by your application and UpdatePlus™ is enabled, the system will merge the changes with the existing record contents.

For instance, say you update an existing client record throughout your application using hard coded IO lists (either an IOLIST directive or variable list on the WRITE). Without UpdatePlus™ if you wanted to add a new field to this file you would have to change all the IO lists in all existing programs so that during an update, all fields would be read and written back. This would be necessary to preserve the new data field contents.

Using UpdatePlus™ whenever a record is updated, only the fields specifically declared in the IO list will be modified. Existing fields not included in the IO list are preserved meaning that programs that do not need to reference new fields will not need to be modified. This allows new fields to be added to you files without having to go back and change all programs that update the file.

For example, consider a simple customer file containing four fields, ID, Name, Address and Amount Owing. Existing logic to update the amount owing might look something like this:

READ (fileno) Cst_id$, Cst_name$, Cst_addr$, Cst_amt
Cst_amt = Cst_amt + Inv_amt ! Add new invoice amount
WRITE (fileno) Cst_id$, Cst_name$, Cst_addr$, Cst_amt

Without UpdatePlus™ if you added a new field to the client file such as Cst_email$, the above logic would have to be changed to include this new field otherwise during the WRITE, the contents of Cst_email$ would be lost. To resolve this, you would need to examine all file IO statements within the system to assure that all fields are read and written appropriately.

Using UpdatePlus™, the field Cst_email$ could be added to the end of the record and just the programs that referenced the field would need to be changed. The above logic would not have to be change since the WRITE would only effect the fields specified leaving any value in Cst_email$ untouched.

UpdatePlus™ Advantages

While there are many ways to address the need to add additional information to your data files, UpdatePlus™ offers a unique set advantages with one of the biggest advantages being the fact that existing code does not have to change.

Using a data dictionary within your application would address this problem, however the migration to a data dictionary based system itself takes time and money. UpdatePlus™ can be used with existing programs and data files without having to change the code to use a data dictionary. This allows many 'legacy' applications to continue to use existing code without having to make costly changes.

Placing the data fields in another related file also would allow you to address this issue. This approach would not necessarily involve having to change existing programs that did not need to reference the data; however, it would mean file maintenance functions would need to assure the files remained in sync and as more and more changes occurred more and more files would need to be created. In addition, end-user queries get more complicated as the users have to know where specific pieces of related information are stored. Using UpdatePlus™ keeps the data together so when a record is removed, all information is removed. When the records are copied, all the data is copied. Performance is better as only one file is reference and end-user queries are simplified.

How do I get UpdatePlus™?

UpdatePlus™ is included in PxPlus version 7.65, which is now available for download from www.pvxplus.com

For more information on this exciting new feature, click here.

Start Evolving today --- Switch to PxPlus

Handling Disconnects Gracefully

One of the problems facing many applications is how to handle terminal disconnects. When the system receives a disconnect, the process terminates. Normally, for an interactive session there is little harm done to an application. However, during an update process, the premature termination of the process can be difficult to recover from. Files are often partially updated and trying to determine were to restart could be difficult.

For a number of releases now, ProvideX and PxPlus, have provided an 'XC' system parameter that allows an application to gracefully handle the disconnect when connected using WindX. Release 7.65 of PxPlus includes support of this parameter on all terminals not just those connected using WindX.

How does XC work?

When the 'XC" system parameter is enabled, terminal disconnects (channel 0) are not immediately reported to the application program by the system nor is the process shutdown. Instead, the application is allowed to continue so it may handle the terminal disconnect and shutdown properly. After the terminal disconnects all output requests to the terminal will be ignored. No errors will be reported to the application when attempting to output to the disconnected terminal. This will allow an update process to continue displaying information to the screen even though it is no longer there.

All input requests will return an error 86 allowing the application to detect the terminal disconnect and take corrective action such as shutting down normally.

The XC Advantage:

Enabling the 'XC' system parameter in PxPlus gives your application a chance to handle the situation properly regardless of the terminal type. Updates can continue running and go to completion and interactive sessions can undo or free system resources, as required. This allows the application to preserve system data integrity and thus reliability.

If data integrity and reliability are important to you,

PxPlus has the answer.

 
Included v7.65 of PxPlus

  • UpdatePlus™ capabilities for VLR and FLR keyed files.
  • New 'XC' disconnect support for non-WindX connections
  • Logical disc drives on file creation directives
  • Process query command TASKS to show file/record usage and locks
 
... V8.00 coming soon

Join the PLUS Evolution today

 
 
 
PVX Plus Technologies
Leaders in innovative solutions for the Business Basic community
 
 

PVX Plus Technologies, Ltd.
4261 Hwy #7 East, Unit A14
Suite 364
Unionville, Ontario L3R 9W6
Canada

1-888-975-PLUS

www.pvxplus.com
    2008 PVX Plus Technologies Ltd. All rights reserved.
  ProvideX is a registered trademark of Sage Software Canada Ltd.
The Plus is published by PVX Plus Technologies on a regular basis.
To change your subscription to this newsletter visit us at
http://theplus.pvxplus.com/subscriptions