IBM Support

SYSTOOLS.GETENV

News


Abstract

The GETENV scalar function retrieves the value of an environment variable for the current job.

The function is implemented using the getenv() API. The result is similar to the QSYS2.ENVIRONMENT_VARIABLE_INFO view and the Work with Environment Var (WRKENVVAR) CL command.

Content

For complete details, see SYSTOOLS.GETENV scalar function in IBM Documentation.

{ "data": [ { "Article Type":"News (DB600)", "Category":"IBM i Db2", "ARM Category":"IBM i Db2 > SQL Services / table functions", "Keywords":"SYSTOOLS; GETENV; environment variable; scalar function; IBM i; Db2; SQL; getenv API; WRKENVVAR; QSYS2.ENVIRONMENT_VARIABLE_INFO; IBM i services", "Predicate":"USAGE", "Classifier":"DEVELOP" } ] }

[{"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":"a8m0z0000001go6AAA","label":"IBM i Db2-\u003ESQL Services \/ table functions"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.6.0;7.5.0;7.4.0"}]

Document Information

Modified date:
22 November 2026

UID

ibm17148875