IBM Support

JOB_NAME & SERVER_MODE_JOB_NAME - Db2 built-in global variables

News


Abstract

JOB_NAME & SERVER_MODE_JOB_NAME - Db2 built-in global variables

Content

You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements > JOB_NAME & SERVER_MODE_JOB_NAME - Db2 built-in global variables

With IBM i 7.2, Db2 for i added a new type of resource in the form of database supplied built-in global variables.

A global variable can be referenced anywhere that a column name is permitted within an SQL statement.

A built-in global variable is special because the database is responsible for providing the value contained within the variable and users are unable to modify (SET) the variable to a different value.

The new built-in global variables are:

  • QSYS2/JOB_NAME - returns the qualified job name of the job where the SQL statement is executed.
  • QSYS2/SERVER_MODE_JOB_NAME - Applies only to QSQSRVR jobs and returns the qualified job name application job which owns the SQL Server Mode connection.  When referenced outside of a QSQSRVR job, the NULL value is returned.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
13 January 2020

UID

ibm11164730