IBM Support

Direct control of system names for global variables

News


Abstract

Direct control of system names for global variables

Content

You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements > Direct control of system names for global variables

The optional FOR SYSTEM NAME clause has been added to the CREATE VARIABLE SQL statement.

The name provided in the FOR SYSTEM NAME clause must be a valid system name and cannot be qualified. The first name provided for the object cannot be a valid system name.

Use the FOR SYSTEM NAME clause to achieve direct control over the service program (*SRVPGM) that is created when the CREATE VARIABLE SQL statement is executed.

See the SQL Reference for details: CREATE VARIABLE

Example:

CREATE OR REPLACE VARIABLE TOYSTORE.GV_EMPLOYEE_NUMBER FOR SYSTEM NAME GVEMPNO CHAR(6)
DEFAULT (select EMPNO from TOYSTORE.vemp where USER_PROFILE_NAME = USER);

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
13 January 2020

UID

ibm11164598