vscode-ibmi: Failed to save 'testvsc.rpgle': Unable to write file ....

I have a “old” fix format RPGLE program when I edit the source in VS Code I get an error message “Failed to save ‘testvsc.rpgle’: Unable to write file ‘member:/ROLAND/qrpglesrc/testvsc.rpgle’ (QSYSPRT *LIBL)”. I have looked to see if there were previous reports, the closest I found is #314 , however my error happen with the hex x’22’ value in front of the comment lines. When I remove those hex values I do not get the error. I am not allowed to remove these hex values, so I need to know is there a way to get around the problem.

The funny thing is that when I try to recreate the problem, if the number of source lines are less than 1000, the error does not occur, if more than 1000, the error message occurs

image


⚠️ REMOVE THIS LINE AND ANY SENSITIVE INFORMATION BELOW! ⚠️

Context Version
Code for IBM i version 1.9.1
Visual Studio Code version 1.78.2
Operating System win32_x64
Active extensions
CL (vscode-clle): 1.1.0
COBOL (cobol): 9.5.6
Cloak (vscode-cloak): 0.5.0
Code Coverage for IBM i (code-coverage-ibmi): 0.1.7
Code GPT (dscodegpt): 2.1.10
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.3.1
Db2 for IBM i (vscode-db2i): 0.2.11
ESLint (vscode-eslint): 2.4.0
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.11.0
Extension Authoring (extension-editing): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
Git Project Manager (git-project-manager): 1.8.2
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitHub Pull Requests and Issues (vscode-pull-request-github): 0.64.0
GitLens — Git supercharged (gitlens): 13.6.0
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.5
JSON Language Features (json-language-features): 1.0.0
Live Share (vsliveshare): 1.0.5864
Markdown Language Features (markdown-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
Microsoft Edge Tools for VS Code (vscode-edge-devtools): 2.1.1
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Path Intellisense (path-intellisense): 2.8.4
RPGLE (vscode-rpgle): 0.19.2
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL: Recommender (remote-wsl-recommender): 0.0.19
json (json): 2.0.2
vscode-icons (vscode-icons): 12.4.0
vscode-json (vscode-json): 1.5.2

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh 7
CCSID 37
SQL Enabled
Source dates Enabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin
bash attr ROLANDVSC.GETNEWLIBL QZDFMDB2.PGM startDebugService.sh
chsh iconv
git setccsid
grep
ls
md5sum
sort
stat
tar
tn5250
Shell env
BUILDLIB=LSUTILSDEV
CURLIB=LSUTILSDEV
HOME=/home/ROLAN
LIBLS=QDEVTOOLS  xxxxxxxxxxxx QTEMP
LOGIN=rolan
LOGNAME=rolan
MAIL=/var/spool/mail/rolan
OLDPWD=/home/ROLAN
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/ROLAN
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=
SSH_CONNECTION=
TZ=<SAST>-2
USER=rolan
USERNAME=rolan
_=/QOpenSys/usr/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$"
}
Errors
[
  {
    "command": "/QOpenSys/usr/bin/qsh",
    "code": 1,
    "stderr": "CPD4090:  Printer device PRT01 not found. Output queue changed to QPRINT in library QGPL.\nCPF0820:  Program CLNTMPVSC not created.\nCPC2206:  Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.",
    "cwd": "/home/ROLAN"
  },
  {
    "command": "system \"QSYS/RUNSQLSTM SRCSTMF('/tmp/vscodetemp-O_Ev0AmLvr') COMMIT(*NONE) NAMING(*SQL)\"",
    "code": 255,
    "stderr": "QSYSPRT   *LIBL",
    "cwd": "/home/ROLAN"
  },
  {
    "command": "system \"QSYS/RUNSQLSTM SRCSTMF('/tmp/vscodetemp-O_Ev0AmLvr') COMMIT(*NONE) NAMING(*SQL)\"",
    "code": 255,
    "stderr": "QSYSPRT   *LIBL",
    "cwd": "/home/ROLAN"
  }
]

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

@worksofliam & @chrjorgensen After the V2.0.0 update the issue seems resolved, if we keep the Seu Colors ticked off. Thank you for the efforts, I believe we can close this issue

Hey @bojasv - really sorry for not getting back to you!!

  1. Yes, the Code for IBM i output could be more readable. Right now, it’s just printing the result object (the stdout, stderr and the exit code) which is why you see all those new line characters in them. I would not be opposed to this! Usually I have to copy and paste it out and into a new tab before change the \n characters to a real newline 😄
  2. You’re going to love this. It is not us that inserts the UX (or X even)… it’s actually the RUNSQLSTM command we’re using that inserts them. Not much we can do about that 👎 My guess is that UX is for unicode characters and X for ebcdic or a standard byte stream.

@worksofliam I have looked at the vscodetemp-o_VPVx6BHy in folder /tmp, I see there is 2 (two) insert statements, the first insert statement “ends” at line 2580 of the source and the second insert statement starts from the source line 2581. This is exactly where the source “breaks”, when I receive the “Failed to save” message. The lines from the second insert is just missing in the VSCODE editor, but the source on IBMi is “gone”.

I hope this helps a little bit more.

I have attached the temp file below, which contains the SQL inserts

vscodetemp-O_VPVx6BHy.txt

For my own records, here is the spoolfile from the file trying to be saved

spoolfile.txt