OSQL Update

PURPOSE:  OSQL UPDATE changes data in columns of existing records in a table.  The WITH WINDOW clause is required for DB-MACH2 and RMS, and will display a Screen Management Facility (SMF) window on the screen.  If the DEFINE PM clause is included, the Process Module (PM) created to execute the command will be saved in the current Data Base Library (DBL) under the object name specified.

Syntax

OSQL UPDATE table_name

WITH WINDOW

[DEFINE PM process_module_name [ONLY]]

table_name

is the name of the table that will be updated.

WITH WINDOW

specifies that a window containing the columns from the table will be displayed on the screen.  The window uses the SMF window development language of ACCENT R.  This clause is required for DB-MACH2 and RMS.

DEFINE PM process_module_name

specifies that the PM containing the code generated to execute the OSQL command be saved and named as an object in the current DBL.  This PM is made up of ACCENT R PM statements and is useful for prototyping applications.

ONLY

specifies that the PM will be created without being executed by OSQL.  This clause is used primarily by the OSQL BUILD command but may also be used for on-line prototyping.  If the ONLY clause is included, the PM may be invoked interactively or from a Command Module (CM).

EXAMPLE

*OSQL UPDATE NISDATA:PUBLISHERS WITH WINDOW &
   DEFINE PM PUBLISHERS_UPDATE ONLY
*USE PM PUBLISHERS_UPDATE

SEE ALSO:  ALTER, UPDATE