|ASNA DataGate® for SQL Server Reference Manual|
AVR Programming Considerations
New Error Conditions
Considerations for Adapting Existing Applications to DSS
Not Implemented Yet
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
*NOLOCKoption 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.
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
ReadRange– Use the ReadRange opcode in place of the Chain opcode when you're doing
DeleteRange– Use the DeleteRange when performing delete loops.
In DataGate® for SQL Server, 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
DCLDISKFILE statement as follows.
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
*NOLOCKopcode for files opened for update, you will need to declare an
*Inputinstance of the file for
- If an application is going to run against both DataGate® for SQL Server and DataGate® 400, and your file currently contains binary fields, you will need to consider changing the field type.