From cfc8d13578fdabb8330ad66f4ebd7c6cc5a21d03 Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Tue, 7 May 2024 15:29:14 +0200 Subject: [PATCH 1/2] Update snippet for SND-MSG to include new Spring 2024 special values --- schemas/rpgle.code-snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/rpgle.code-snippets b/schemas/rpgle.code-snippets index 07672c97..c5f0866d 100644 --- a/schemas/rpgle.code-snippets +++ b/schemas/rpgle.code-snippets @@ -178,7 +178,7 @@ "snd-msg": { "prefix": "snd-msg", "body": [ - "snd-msg ${1|*INFO,*ESCAPE|} ${2:%TARGET(${3|*SELF,*CALLER,program-or-procedure|})) };" + "snd-msg ${1|*COMP,*DIAG,*ESCAPE,*INFO,*NOTIFY,*STATUS|} ${2:%target(${3|*CALLER,*CTLBDY,*EXT,*PGMBDY,*SELF,program-or-procedure|})) };" ], "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." }, From 90b5f792564de15e17a32dc1a0dd4af4e2ff746c Mon Sep 17 00:00:00 2001 From: Christian Jorgensen Date: Tue, 7 May 2024 15:37:03 +0200 Subject: [PATCH 2/2] Change all RPG reserved keywords to lowercase for consistency --- schemas/rpgle.code-snippets | 98 ++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/schemas/rpgle.code-snippets b/schemas/rpgle.code-snippets index c5f0866d..e53f5a50 100644 --- a/schemas/rpgle.code-snippets +++ b/schemas/rpgle.code-snippets @@ -118,7 +118,7 @@ "prefix": "dcl-ds-ext", "description": "Declare external structure", "body": [ - "dcl-ds ${1:name} ExtName('${2:object}') Qualified;", + "dcl-ds ${1:name} ExtName('${2:object}') qualified;", "end-ds;", "$0" ] @@ -187,8 +187,8 @@ "description": "SQL cursor loop", "scope": "rpgle", "body": [ - "Dcl-Ds $3 ExtName('$3') Alias Qualified;", - "End-Ds;", + "dcl-ds $3 extname('$3') alias qualified;", + "end-ds;", "", "EXEC SQL", " DECLARE $1 CURSOR FOR", @@ -201,13 +201,13 @@ "EXEC SQL", " FETCH NEXT FROM $1 INTO $4;", "", - "Dow SQLSTATE = '00000';", + "dow SQLSTATE = '00000';", " --note 00000 = no errors or warning", " -- 02000 = no data", " ", " EXEC SQL", " FETCH NEXT FROM $1 INTO $4;", - "ENDDO;", + "enddo;", "", "EXEC SQL", " CLOSE $1;", @@ -225,27 +225,27 @@ "description": "The basic definitions for a display file with a subfield", "scope": "rpgle", "body": [ - "Dcl-F ${1:displayfile} WORKSTN Sfile(SFLDta:Rrn) IndDS(WkStnInd) InfDS(fileinfo);", + "dcl-f ${1:displayfile} workstn sfile(SFLDta:Rrn) indds(WkStnInd) infds(fileinfo);", "", - "Dcl-S Rrn Zoned(4:0) Inz;", + "dcl-s Rrn zoned(4:0) inz;", "", - "Dcl-DS WkStnInd;", - " ProcessSCF Ind Pos(21);", - " ReprintScf Ind Pos(22);", - " Error Ind Pos(25);", - " PageDown Ind Pos(30);", - " PageUp Ind Pos(31);", - " SflEnd Ind Pos(40);", - " SflBegin Ind Pos(41);", - " NoRecord Ind Pos(60);", - " SflDspCtl Ind Pos(85);", - " SflClr Ind Pos(75);", - " SflDsp Ind Pos(95);", - "End-DS;", + "dcl-ds WkStnInd;", + " ProcessSCF ind pos(21);", + " ReprintScf ind pos(22);", + " Error ind pos(25);", + " PageDown ind pos(30);", + " PageUp ind pos(31);", + " SflEnd ind pos(40);", + " SflBegin ind pos(41);", + " NoRecord ind pos(60);", + " SflDspCtl ind pos(85);", + " SflClr ind pos(75);", + " SflDsp ind pos(95);", + "end-ds;", "", - "Dcl-DS FILEINFO;", - " FUNKEY Char(1) Pos(369);", - "End-DS;", + "dcl-ds FILEINFO;", + " FUNKEY char(1) pos(369);", + "end-ds;", ] }, "workstation-function-keys": { @@ -253,32 +253,32 @@ "description": "Function key constants for display files", "scope": "rpgle", "body": [ - "Dcl-C F01 X'31';", - "Dcl-C F02 X'32';", - "Dcl-C F03 X'33';", - "Dcl-C F04 X'34';", - "Dcl-C F05 X'35';", - "Dcl-C F06 X'36';", - "Dcl-C F07 X'37';", - "Dcl-C F08 X'38';", - "Dcl-C F09 X'39';", - "Dcl-C F10 X'3A';", - "Dcl-C F11 X'3B';", - "Dcl-C F12 X'3C';", - "Dcl-C F13 X'B1';", - "Dcl-C F14 X'B2';", - "Dcl-C F15 X'B3';", - "Dcl-C F16 X'B4';", - "Dcl-C F17 X'B5';", - "Dcl-C F18 X'B6';", - "Dcl-C F19 X'B7';", - "Dcl-C F20 X'B8';", - "Dcl-C F21 X'B9';", - "Dcl-C F22 X'BA';", - "Dcl-C F24 X'BC';", - "Dcl-C ENTER X'F1';", - "Dcl-C HELP X'F3';", - "Dcl-C PRINT X'F6';", + "dcl-c F01 x'31';", + "dcl-c F02 x'32';", + "dcl-c F03 x'33';", + "dcl-c F04 x'34';", + "dcl-c F05 x'35';", + "dcl-c F06 x'36';", + "dcl-c F07 x'37';", + "dcl-c F08 x'38';", + "dcl-c F09 x'39';", + "dcl-c F10 x'3A';", + "dcl-c F11 x'3B';", + "dcl-c F12 x'3C';", + "dcl-c F13 x'B1';", + "dcl-c F14 x'B2';", + "dcl-c F15 x'B3';", + "dcl-c F16 x'B4';", + "dcl-c F17 x'B5';", + "dcl-c F18 x'B6';", + "dcl-c F19 x'B7';", + "dcl-c F20 x'B8';", + "dcl-c F21 x'B9';", + "dcl-c F22 x'BA';", + "dcl-c F24 x'BC';", + "dcl-c ENTER x'F1';", + "dcl-c HELP x'F3';", + "dcl-c PRINT x'F6';", ] }, "%abs": {