Skip to content

Commit f7ee7d1

Browse files
committed
Variables
1 parent c21b075 commit f7ee7d1

File tree

3 files changed

+214
-1
lines changed

3 files changed

+214
-1
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
"snippets": [
2828
{
2929
"language": "sql",
30-
"path": "./src/language/scalars.code-snippets"
30+
"path": "./src/language/snippets/scalars.code-snippets"
31+
},
32+
{
33+
"language": "sql",
34+
"path": "./src/language/snippets/variables.code-snippets"
3135
}
3236
],
3337
"configuration": {
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
// https://www.ibm.com/docs/en/i/7.4?topic=statement-special-registers-in-sql-statements
2+
// https://www.ibm.com/docs/en/i/7.3?topic=reference-built-in-global-variables
3+
{
4+
"client_host": {
5+
"prefix": "client_host",
6+
"body": "client_host",
7+
"description": "This global variable contains the host name of the current client, as returned by the system."
8+
},
9+
"client_ipaddr": {
10+
"prefix": "client_ipaddr",
11+
"body": "client_ipaddr",
12+
"description": "This global variable contains the IP address of the current client, as returned by the system."
13+
},
14+
"client_port": {
15+
"prefix": "client_port",
16+
"body": "client_port",
17+
"description": "This global variable contains the port number used by the current client to communicate with the server."
18+
},
19+
"job_name": {
20+
"prefix": "job_name",
21+
"body": "job_name",
22+
"description": "This global variable contains the name of the current job."
23+
},
24+
"package_name": {
25+
"prefix": "package_name",
26+
"body": "package_name",
27+
"description": "This global variable contains the name of the package currently being used for a DRDA connection."
28+
},
29+
"package_schema": {
30+
"prefix": "package_schema",
31+
"body": "package_schema",
32+
"description": "This global variable contains the schema name of the package currently being used for a DRDA connection."
33+
},
34+
"package_version": {
35+
"prefix": "package_version",
36+
"body": "package_version",
37+
"description": "This global variable contains the version identifier of the package currently being used for a DRDA connection."
38+
},
39+
"process_id": {
40+
"prefix": "process_id",
41+
"body": "process_id",
42+
"description": "This global variable contains the process ID of the current job."
43+
},
44+
"routine_schema": {
45+
"prefix": "routine_schema",
46+
"body": "routine_schema",
47+
"description": "This global variable contains the schema name of the currently executing routine."
48+
},
49+
"routine_specific_name": {
50+
"prefix": "routine_specific_name",
51+
"body": "routine_specific_name",
52+
"description": "This global variable contains the name of the currently executing routine."
53+
},
54+
"routine_type": {
55+
"prefix": "routine_type",
56+
"body": "routine_type",
57+
"description": "This global variable contains the type of the currently executing routine."
58+
},
59+
"server_mode_job_name": {
60+
"prefix": "server_mode_job_name",
61+
"body": "server_mode_job_name",
62+
"description": "This global variable contains the name of the job that established the SQL server mode connection."
63+
},
64+
"thread_id": {
65+
"prefix": "thread_id",
66+
"body": "thread_id",
67+
"description": "This global variable contains the thread ID of the current thread."
68+
},
69+
"current_client_acctng": {
70+
"prefix": "current_client_acctng",
71+
"body": "current_client_acctng",
72+
"description": "The accounting string for the client connection."
73+
},
74+
"current_client_applname": {
75+
"prefix": "current_client_applname",
76+
"body": "current_client_applname",
77+
"description": "The application name for the client connection."
78+
},
79+
"current_client_programid": {
80+
"prefix": "current_client_programid",
81+
"body": "current_client_programid",
82+
"description": "The program ID for the client connection."
83+
},
84+
"current_client_userid": {
85+
"prefix": "current_client_userid",
86+
"body": "current_client_userid",
87+
"description": "The client user ID for the client connection."
88+
},
89+
"current_client_wrkstnname": {
90+
"prefix": "current_client_wrkstnname",
91+
"body": "current_client_wrkstnname",
92+
"description": "The workstation name for the client connection."
93+
},
94+
"current_date": {
95+
"prefix": "current_date",
96+
"body": "current_date",
97+
"description": "The current date."
98+
},
99+
"current_debug_mode": {
100+
"prefix": "current_debug_mode",
101+
"body": "current_debug_mode",
102+
"description": "The debug mode to be used when creating or altering routines."
103+
},
104+
"current_decfloat_rounding_mode": {
105+
"prefix": "current_decfloat_rounding_mode",
106+
"body": "current_decfloat_rounding_mode",
107+
"description": "The rounding mode to be used when working with decimal floating point values."
108+
},
109+
"current_degree": {
110+
"prefix": "current_degree",
111+
"body": "current_degree",
112+
"description": "The number of tasks the database manager should run in parallel."
113+
},
114+
"current_implicit_xmlparse_option": {
115+
"prefix": "current_implicit_xmlparse_option",
116+
"body": "current_implicit_xmlparse_option",
117+
"description": "The whitespace handling options to be used for XML data when implicitly parsed without validation."
118+
},
119+
"current path": {
120+
"prefix": "current path",
121+
"body": "current path",
122+
"description": "The SQL path used to resolve unqualified data type names, procedure names, and function names in dynamically prepared SQL statements."
123+
},
124+
"current_path": {
125+
"prefix": "current_path",
126+
"body": "current_path",
127+
"description": "The SQL path used to resolve unqualified data type names, procedure names, and function names in dynamically prepared SQL statements."
128+
},
129+
"current function path": {
130+
"prefix": "current function path",
131+
"body": "current function path",
132+
"description": "The SQL path used to resolve unqualified data type names, procedure names, and function names in dynamically prepared SQL statements."
133+
},
134+
"current schema": {
135+
"prefix": "current schema",
136+
"body": "current schema",
137+
"description": "The schema name used to qualify unqualified database object references where applicable in dynamically prepared SQL statements."
138+
},
139+
"current server": {
140+
"prefix": "current server",
141+
"body": "current server",
142+
"description": "The name of the relational database currently being used."
143+
},
144+
"current_server": {
145+
"prefix": "current_server",
146+
"body": "current_server",
147+
"description": "The name of the relational database currently being used."
148+
},
149+
"current temporal system_time": {
150+
"prefix": "current temporal system_time",
151+
"body": "current temporal system_time",
152+
"description": "The timestamp to use when querying a system_period temporal table."
153+
},
154+
"current time": {
155+
"prefix": "current time",
156+
"body": "current time",
157+
"description": "The current time."
158+
},
159+
"current_time": {
160+
"prefix": "current_time",
161+
"body": "current_time",
162+
"description": "The current time."
163+
},
164+
"current timestamp": {
165+
"prefix": "current timestamp",
166+
"body": "current timestamp",
167+
"description": "The current date and time in timestamp format."
168+
},
169+
"current_timestamp": {
170+
"prefix": "current_timestamp",
171+
"body": "current_timestamp",
172+
"description": "The current date and time in timestamp format."
173+
},
174+
"current timezone": {
175+
"prefix": "current timezone",
176+
"body": "current timezone",
177+
"description": "A duration of time that links local time to Universal Time Coordinated (UTC) using the formula: `local time - CURRENT TIMEZONE = UTC`. It is taken from the system value QUTCOFFSET."
178+
},
179+
"current_timezone": {
180+
"prefix": "current_timezone",
181+
"body": "current_timezone",
182+
"description": "A duration of time that links local time to Universal Time Coordinated (UTC) using the formula: `local time - CURRENT TIMEZONE = UTC`. It is taken from the system value QUTCOFFSET."
183+
},
184+
"current user": {
185+
"prefix": "current user",
186+
"body": "current user",
187+
"description": "The primary authorization identifier of the job."
188+
},
189+
"current_user": {
190+
"prefix": "current_user",
191+
"body": "current_user",
192+
"description": "The primary authorization identifier of the job."
193+
},
194+
"session_user": {
195+
"prefix": "session_user",
196+
"body": "session_user",
197+
"description": "The runtime authorization identifier (user profile) of the job."
198+
},
199+
"user": {
200+
"prefix": "user",
201+
"body": "user",
202+
"description": "The runtime authorization identifier (user profile) of the job."
203+
},
204+
"system_user": {
205+
"prefix": "system_user",
206+
"body": "system_user",
207+
"description": "The authorization identifier (user profile) of the user connected to the database."
208+
},
209+
}

0 commit comments

Comments
 (0)