![]() |
![]() |
ASNA Visual RPG® Classic Programming Considerations
Considerations for Adapting Existing Applications to DSS
Strong consideration should be given to Visual RPG Error Indicators when performing I/O operations as they could be turned on now for reasons not present before. For instance, when the Chain opcode returned an error, the cause was commonly assumed to be that the record was busy. With DSS, error indicators can be turned on for various reasons such as the use of the *NOLOCK option on I/O operations. (See Locking considerations in the DG400 vs. DSS document)
The following situations will cause the error indicator to be set on.
Arrival Random Access.
When a file is opened for *Arrival access, commands such as Chain, Setll, etc, will cause an error condition.
Use of the *NOLOCK option is not supported under DSS.
Any I/O operations that make use of the *NOLOCK option when working with files opened for update will cause an error condition.
To assist in finding areas in code that will potentially cause an error, a new IDE option is added to give warnings for invalid operations for DSS. This option is located in the “Compiler” Tab of the Project >Settings menu option.
New I/O op codes provide better performance when working with large files.
SetRange – Use the SetRange opcode in place of Setll when you’re doing Setll/Reade loops.
ReadRange – Use the ReadRange opcode in place of the Chain opcode when you’re doing Chain/Reade loops.
DeleteRange
– Use the DeleteRange when performing delete loops.
In DSS, the record format name is always “R” + Filename. If the record format name is anything else, and you’ve specified this record format name on I/O operations, a rename format will need to be specified on the DCLDISKFILE statement as follows. RNMFMT(OldFormatName) where OldFormatName is the name of the existing format. No changes will need to be made to the actual I/O statements.
The old syntax of RNMFMT(OldFormatName,NewFormatName) is not needed.
Arrival sequence processing must be changed to indexed processing. The simplest method for handling this would be to employ the use of a key field in the file.
If you’re using multi-member files, you will need to provide an alternative method for handling the logic involving these files.
If your file’s record length is > 8060, you will need to consider changes necessary in order to make the record length smaller.
Be sure to include the range operations to enhance speed.
If you were using the *NOLOCK opcode for files opened for update, you will need to declare an *Input instance of the file for *NOLOCK access.
If
an application is going to run against both DSS and DataGate 400, and
your file currently contains binary
fields, you will need to consider changing the field type. (See field
types supported in the DG400 vs.
DSS document)
Qtemp
Object Locking
It is recommended that you do not use ADBFEDIT to browse files that are not indexed because of the inability to scroll within the file. These types of files can be viewed with SQL Server’s Enterprise Manager.
|
04/29/2007
© 2007.
Amalgamated Software of
|