Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade snippets to Spring 2024 level #314

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions schemas/rpgle.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down Expand Up @@ -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."
},
Expand All @@ -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",
Expand All @@ -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",
" <do somthing?>",
" EXEC SQL",
" FETCH NEXT FROM $1 INTO $4;",
"ENDDO;",
"enddo;",
"",
"EXEC SQL",
" CLOSE $1;",
Expand All @@ -225,60 +225,60 @@
"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": {
"prefix": "workstation-function-keys",
"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": {
Expand Down