Understanding the Query Conversion Process

Enhanced Queries (also referred to as Advanced Queries) use a different format than the Saved Queries that users might have created in previous releases. You can convert the format of the old Saved Queries (UO Type = SQ) to Enhanced Queries (UO Type = AQ) using a conversion process.

This conversion is necessary only if you have query records in the User Overrides application (P98950) with a UO Type of SQ. Alternatively, you can search the UOTY field in the F98950 table for the SQ value.

Conversion Process Objects

The conversion process uses the following objects to change the query UO Type from SQ to AQ:

  • R95SQAQ

    You must run the R95SQAQ batch program (UBE) to convert the queries. The report generated by the batch program displays the number of SQ records in F98950 and F98950D tables that were converted to the new format.

  • D95SQAQPO

    You must use the processing option (PO) template D95SQAQPO to enter any combination of the following three attributes to specify which queries to convert:

    • User ID

      By entering a user ID or role, only the F98950 SQ records with the USER field equal to the User ID specified in the processing option will be converted. The corresponding F98950D SQ records will also be converted.

    • Application Name

      By specifying the application name, only the F98950 SQ records with the OBNM field equal to the application name specified in the processing option will be converted. The corresponding F98950D SQ records will also be converted.

    • Form Name

      By specifying the form name, only the F98950 SQ records with the FMNM field equal to the Form Name specified in the processing option will be converted. The corresponding F98950D SQ records will also be converted.

    If no processing option values are specified, all SQ records will be converted to the new format. If new AQ records with the specified User ID, application name, or form name already exist, the conversion for those records are skipped to avoid replacing the AQ records, which are likely to be more recent than SQ records. Logs will contain a message for each AQ record that was not converted.

  • B95SQAQ

    Business function B95SQAQ is called from R95SQAQ. The business function does the conversion.

  • D95SQAQ

    Data structure D95SQAQ is used by the B95SQAQ business function.

User Override Tables

The conversion updates the following tables:

Table

Table Name

Conversion Effect

F98950

User Override Table

The old Saved Query record has the UOTY field set to SQ. These records are converted to Enhanced Query records with the key UOTY equal to AQ. The old SQ records will NOT be removed after the conversion.

F98950D

User Override Table Description

The old Saved Query record has the UOTY field set to SQ. These records will be converted to Enhanced Query records with the new key UOTY equal to AQ. The old SQ records will NOT be removed after the conversion.

Saved Query Conditions

With the exception of the Current user AB# and/or Test Search value, all the conditions in the old saved queries will be converted. The logs will display an error message indicating that the current user address book number and/or Text Search condition was not converted.

Once it has been verified that the converted queries are correct, you can delete the old Saved Query records (UO Type = SQ) from the User Overrides application.