Skip to content

Commit 143678f

Browse files
authored
Merge pull request #314 from chrjorgensen/feature/spring-2024-enhancements
Upgrade snippets to Spring 2024 level
2 parents cc017e7 + 90b5f79 commit 143678f

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

schemas/rpgle.code-snippets

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"prefix": "dcl-ds-ext",
119119
"description": "Declare external structure",
120120
"body": [
121-
"dcl-ds ${1:name} ExtName('${2:object}') Qualified;",
121+
"dcl-ds ${1:name} ExtName('${2:object}') qualified;",
122122
"end-ds;",
123123
"$0"
124124
]
@@ -178,7 +178,7 @@
178178
"snd-msg": {
179179
"prefix": "snd-msg",
180180
"body": [
181-
"snd-msg ${1|*INFO,*ESCAPE|} ${2:%TARGET(${3|*SELF,*CALLER,program-or-procedure|})) };"
181+
"snd-msg ${1|*COMP,*DIAG,*ESCAPE,*INFO,*NOTIFY,*STATUS|} ${2:%target(${3|*CALLER,*CTLBDY,*EXT,*PGMBDY,*SELF,program-or-procedure|})) };"
182182
],
183183
"description": "The SND-MSG operation sends an informational message or an exception message. The message can be sent to any procedure on the call stack, including the current procedure. The message appears in the joblog after it is sent."
184184
},
@@ -187,8 +187,8 @@
187187
"description": "SQL cursor loop",
188188
"scope": "rpgle",
189189
"body": [
190-
"Dcl-Ds $3 ExtName('$3') Alias Qualified;",
191-
"End-Ds;",
190+
"dcl-ds $3 extname('$3') alias qualified;",
191+
"end-ds;",
192192
"",
193193
"EXEC SQL",
194194
" DECLARE $1 CURSOR FOR",
@@ -201,13 +201,13 @@
201201
"EXEC SQL",
202202
" FETCH NEXT FROM $1 INTO $4;",
203203
"",
204-
"Dow SQLSTATE = '00000';",
204+
"dow SQLSTATE = '00000';",
205205
" --note 00000 = no errors or warning",
206206
" -- 02000 = no data",
207207
" <do somthing?>",
208208
" EXEC SQL",
209209
" FETCH NEXT FROM $1 INTO $4;",
210-
"ENDDO;",
210+
"enddo;",
211211
"",
212212
"EXEC SQL",
213213
" CLOSE $1;",
@@ -225,60 +225,60 @@
225225
"description": "The basic definitions for a display file with a subfield",
226226
"scope": "rpgle",
227227
"body": [
228-
"Dcl-F ${1:displayfile} WORKSTN Sfile(SFLDta:Rrn) IndDS(WkStnInd) InfDS(fileinfo);",
228+
"dcl-f ${1:displayfile} workstn sfile(SFLDta:Rrn) indds(WkStnInd) infds(fileinfo);",
229229
"",
230-
"Dcl-S Rrn Zoned(4:0) Inz;",
230+
"dcl-s Rrn zoned(4:0) inz;",
231231
"",
232-
"Dcl-DS WkStnInd;",
233-
" ProcessSCF Ind Pos(21);",
234-
" ReprintScf Ind Pos(22);",
235-
" Error Ind Pos(25);",
236-
" PageDown Ind Pos(30);",
237-
" PageUp Ind Pos(31);",
238-
" SflEnd Ind Pos(40);",
239-
" SflBegin Ind Pos(41);",
240-
" NoRecord Ind Pos(60);",
241-
" SflDspCtl Ind Pos(85);",
242-
" SflClr Ind Pos(75);",
243-
" SflDsp Ind Pos(95);",
244-
"End-DS;",
232+
"dcl-ds WkStnInd;",
233+
" ProcessSCF ind pos(21);",
234+
" ReprintScf ind pos(22);",
235+
" Error ind pos(25);",
236+
" PageDown ind pos(30);",
237+
" PageUp ind pos(31);",
238+
" SflEnd ind pos(40);",
239+
" SflBegin ind pos(41);",
240+
" NoRecord ind pos(60);",
241+
" SflDspCtl ind pos(85);",
242+
" SflClr ind pos(75);",
243+
" SflDsp ind pos(95);",
244+
"end-ds;",
245245
"",
246-
"Dcl-DS FILEINFO;",
247-
" FUNKEY Char(1) Pos(369);",
248-
"End-DS;",
246+
"dcl-ds FILEINFO;",
247+
" FUNKEY char(1) pos(369);",
248+
"end-ds;",
249249
]
250250
},
251251
"workstation-function-keys": {
252252
"prefix": "workstation-function-keys",
253253
"description": "Function key constants for display files",
254254
"scope": "rpgle",
255255
"body": [
256-
"Dcl-C F01 X'31';",
257-
"Dcl-C F02 X'32';",
258-
"Dcl-C F03 X'33';",
259-
"Dcl-C F04 X'34';",
260-
"Dcl-C F05 X'35';",
261-
"Dcl-C F06 X'36';",
262-
"Dcl-C F07 X'37';",
263-
"Dcl-C F08 X'38';",
264-
"Dcl-C F09 X'39';",
265-
"Dcl-C F10 X'3A';",
266-
"Dcl-C F11 X'3B';",
267-
"Dcl-C F12 X'3C';",
268-
"Dcl-C F13 X'B1';",
269-
"Dcl-C F14 X'B2';",
270-
"Dcl-C F15 X'B3';",
271-
"Dcl-C F16 X'B4';",
272-
"Dcl-C F17 X'B5';",
273-
"Dcl-C F18 X'B6';",
274-
"Dcl-C F19 X'B7';",
275-
"Dcl-C F20 X'B8';",
276-
"Dcl-C F21 X'B9';",
277-
"Dcl-C F22 X'BA';",
278-
"Dcl-C F24 X'BC';",
279-
"Dcl-C ENTER X'F1';",
280-
"Dcl-C HELP X'F3';",
281-
"Dcl-C PRINT X'F6';",
256+
"dcl-c F01 x'31';",
257+
"dcl-c F02 x'32';",
258+
"dcl-c F03 x'33';",
259+
"dcl-c F04 x'34';",
260+
"dcl-c F05 x'35';",
261+
"dcl-c F06 x'36';",
262+
"dcl-c F07 x'37';",
263+
"dcl-c F08 x'38';",
264+
"dcl-c F09 x'39';",
265+
"dcl-c F10 x'3A';",
266+
"dcl-c F11 x'3B';",
267+
"dcl-c F12 x'3C';",
268+
"dcl-c F13 x'B1';",
269+
"dcl-c F14 x'B2';",
270+
"dcl-c F15 x'B3';",
271+
"dcl-c F16 x'B4';",
272+
"dcl-c F17 x'B5';",
273+
"dcl-c F18 x'B6';",
274+
"dcl-c F19 x'B7';",
275+
"dcl-c F20 x'B8';",
276+
"dcl-c F21 x'B9';",
277+
"dcl-c F22 x'BA';",
278+
"dcl-c F24 x'BC';",
279+
"dcl-c ENTER x'F1';",
280+
"dcl-c HELP x'F3';",
281+
"dcl-c PRINT x'F6';",
282282
]
283283
},
284284
"%abs": {

0 commit comments

Comments
 (0)