Contents

Error Handling

New Error Conditions

Range Opcodes

Considerations for Adapting Existing Applications to DSS

Not Implemented Yet

Other Considerations

Error Handling

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).

New Error Conditions under DSS

The following situations will cause the error indicator to be set on.

  1. Arrival Random Access.

    When a file is opened for *Arrival access, commands such as Chain, SetLL, etc, will cause an error condition.

  2. 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.

Range Opcodes

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.

Considerations for Adapting Existing Applications to DSS

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 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 DataGate® for SQL Server and DataGate® 400, and your file currently contains binary fields, you will need to consider changing the field type.

Other Considerations

  • 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 the Microsoft SQL Server Management Studio.