IBM Support

Using Edit Codes and Edit Words in SQL and Query Management

Troubleshooting


Problem

This document discusses the use of edit codes and edit words in SQL and Query Management.

Resolving The Problem

n the process of converting from Query for i (Query/400) to SQL and/or Query Management Queries, the ability to use numeric editing is often lost. SQL does not provide a means of editing numeric output. Query Management forms provide some numeric editing; however, there is no provision for the edit codes used by Query for i, including the five available user-defined edit descriptions. Edit words are also not supported.

While you cannot use these functions within SQL, and there is only limited editing available with Query Management Queries, there is a possible work-around. If you are working with a DDS-described physical file, you can change the file description to include an edit code or edit word. Alternatively, you can create a logical file with edit codes or edit words and change the file name in the query to the logical file.

Unfortunately, result fields cannot be edited. The only way to edit a result field would be to send the query output to an outfile, and then define a logical file over the outfile for use in another query that will be used to print the actual report. The information contained in this document is only in reference to the report formatting capabilities of Query Management and the DB2 Query Manager function, not SQL in general.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000001i3CAAQ","label":"IBM i Db2-\u003EDDS - Data Definition Specifications"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

22835759

Document Information

Modified date:
06 December 2024

UID

nas8N1017439