codefori / vscode-ibmi

🌍 IBM i development extension for VS Code
https://codefori.github.io/docs/#/
MIT License
284 stars 92 forks source link

Create RPGLE Program - File couldn't be opened #1719

Closed mprattinger closed 9 months ago

mprattinger commented 10 months ago

I create a new rpgle program on my machine and when i run "Create RGPLE Program" i geht the message that the program could't be created because the file couldn't be opened. The file correctly copied to the ibmi but it fails in CRTBNDPGM.

Any idea what i do wrong?

Thanks in advance

r Michael


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

Context Version
Code for IBM i version 2.5.0
Visual Studio Code version 1.85.0
Operating System win32_x64
Active extensions ``` COBOL (cobol): 9.11.22 Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.4.0 Db2 for IBM i (vscode-db2i): 0.6.0 Emmet (emmet): 1.0.0 Error Lens (errorlens): 3.15.0 Extension Authoring (extension-editing): 1.0.0 Git (git): 1.0.0 Git Base (git-base): 1.0.0 GitHub (github): 0.0.1 IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6 JSON Language Features (json-language-features): 1.0.0 Merge Conflict (merge-conflict): 1.0.0 NPM support for VS Code (npm): 1.0.1 Node Debug Auto-attach (debug-auto-launch): 1.0.0 RPGLE (vscode-rpgle): 0.24.0 TODO Highlight (vscode-todo-highlight): 1.0.5 TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0 ```

Remote system |Setting|Value| |-|-| |IBM i OS|V7R3M0| |Tech Refresh|13| |CCSID|273| |SQL|Enabled |Source dates|Disabled ### Enabled features |/QOpenSys/pkgs/bin|/usr/bin|/QSYS.lib/ILEDITOR.lib|/QSYS.LIB|/QIBM/ProdData/IBMiDebugService/bin| |-|-|-|-|-| |bash|attr|GENCMDXML.PGM|QZDFMDB2.PGM|startDebugService.sh| |git|iconv|GETNEWLIBL.PGM||| |grep|setccsid|||| |ls||||| |md5sum||||| |sort||||| |stat||||| |tar||||| |tn5250|||||
Shell env ```bash BUILDLIB=USRPRATT CURLIB=USRPRATT HOME=/home/mprattinge/builds/arraytests HOST=as400test.becom.at LIBLS=BECBASR426 MBP001F700 BEC001ASP2 YAJL LIBHTTP BECCPYR426 BEC001R426 BECOBYR426 USRMPRAIRL BECOBJPRFD USRPRATT MBPOBER040 QTEMP QGPL LOGIN=mprattinge LOGNAME=mprattinge MAIL=/var/spool/mail/mprattinge OLDPWD=/home/mprattinge PASE_USRGRP_LIMITED=N PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin PWD=/home/mprattinge/builds/arraytests SHELL=/QOpenSys/pkgs/bin/bash SHLVL=1 SSH_CLIENT=10.10.101.35 56033 22 SSH_CONNECTION=10.10.101.35 56033 10.10.2.4 22 TZ=-1,M3.5.0,M10.5.0 USER=mprattinge USERNAME=mprattinge _=/QOpenSys/usr/bin/env ```
Variants ```json { "american": "#@$", "local": "#§$" } ```
Errors ```json [ { "command": "/QOpenSys/usr/bin/qsh", "code": 1, "stderr": "CPE3490: Umsetzungsfehler\nRNS9339: Datei test2.sqlrpgle kann nicht geöffnet werden.\nCPC2206: Eigentumsrecht für Objekt RETURNCODE in QTEMP Art *DTAARA geändert.\nCPC0904: Datenbereich RETURNCODE in Bibliothek QTEMP erstellt.\nRNS9310: Umwandlung fehlgeschlagen. Programm TEST2 in Bibliothek USRPRATT nicht erstellt.\nSQL9019: SQL-Vorkompilierung ist fehlgeschlagen.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert.", "cwd": "/home/mprattinge/builds/arraytests" }, { "command": "system \"QSYS/CPYTOIMPF FROMFILE(USRPRATT/EVFEVENT TEST2) TOSTMF('/tmp/vscodetemp-O_yQTXOgiD') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM(',') DECPNT(*PERIOD)\"", "code": 255, "stderr": "CPF2803: Zieldatei EVFEVENT in USRPRATT nicht zulässig.\nCPF2817: Wegen eines Fehlers Kopierbefehl beendet.", "cwd": "/home/mprattinge/builds/arraytests" }, { "command": "/QOpenSys/usr/bin/qsh", "code": 1, "stderr": "CPE3490: Umsetzungsfehler\nRNS9339: Datei test.rpgle kann nicht geöffnet werden.\nCPC2206: Eigentumsrecht für Objekt RETURNCODE in QTEMP Art *DTAARA geändert.\nCPC0904: Datenbereich RETURNCODE in Bibliothek QTEMP erstellt.\nRNS9310: Umwandlung fehlgeschlagen. Programm TEST in Bibliothek USRPRATT nicht erstellt.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert.", "cwd": "/home/mprattinge/builds/arraytests" } ] ```
worksofliam commented 10 months ago

Please share the contents of your Code for IBM i output channel after the compile fails.

image
mprattinger commented 10 months ago

Hi,

thanks for the fast reaction:

.: echo "This should be the only text!" { "code": 0, "signal": null, "stdout": "This should be the only text!", "stderr": "" }

.: echo $HOME && cd && test -w $HOME { "code": 0, "signal": null, "stdout": "/home/mprattinge", "stderr": "" }

/home/mprattinge: /QOpenSys/usr/bin/qsh liblist { "code": 0, "signal": null, "stdout": "QSYS SYS\nQSYS2 SYS\nQHLPSYS SYS\nQUSRSYS SYS\nQFNTCPL SYS\nQFNT240LA1 SYS\nBECFTP SYS\nAC SYS\nQSHELL PRD\nQGPL USR\nQTEMP USR\nMBPOBER040 USR", "stderr": "" }

/home/mprattinge: /QOpenSys/usr/bin/qsh system "CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')"; if [[ $? -ne 0 ]]; then exit 1; fi { "code": 1, "signal": null, "stdout": "", "stderr": "CPF2111: Bibliothek ILEDITOR bereits vorhanden.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert." }

/home/mprattinge: [ -d "/tmp" ] { "code": 0, "signal": null, "stdout": "", "stderr": "" }

/home/mprattinge: echo $SHELL { "code": 0, "signal": null, "stdout": "/QOpenSys/pkgs/bin/bash", "stderr": "" }

/home/mprattinge: echo $PATH { "code": 0, "signal": null, "stdout": "/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin", "stderr": "" }

/home/mprattinge: test -e /home/mprattinge/.bashrc { "code": 0, "signal": null, "stdout": "", "stderr": "" }

update /home/mprattinge/.bashrc/home/mprattinge: ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx /home/mprattinge: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" select OS_VERSION || '.' || OS_RELEASE as VERSION from sysibmadm.env_sys_info /home/mprattinge: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" select max(ptf_group_level) as HIGHEST_DB2_PTF_GROUP_LEVEL from qsys2.group_ptf_info where PTF_GROUP_DESCRIPTION like 'DB2 FOR IBM I%' and ptf_group_status = 'INSTALLED'; /home/mprattinge: ls $HOME/.vscode/codeforiserver-1.4.5.jar { "code": 0, "signal": null, "stdout": "/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx", "stderr": "" }

{ "code": 0, "signal": null, "stdout": "/home/mprattinge/.vscode/codeforiserver-1.4.5.jar", "stderr": "" }

/home/mprattinge: echo $SHELL { "code": 0, "signal": null, "stdout": "DB2>\n ?>\n\nVERSION \n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n7.3 \n\n 1 RECORD(S) SELECTED.", "stderr": "" }

{ "code": 0, "signal": null, "stdout": "/QOpenSys/pkgs/bin/bash", "stderr": "" }

{ "code": 0, "signal": null, "stdout": "DB2>\n\nHIGHEST_DB2_PTF_GROUP_LEVEL \n----------------------------\n 32\n\n 1 RECORD(S) SELECTED.\n\nDB2>", "stderr": "" }

/home/mprattinge: mkdir -p "/home/mprattinge/builds/arraytests" { "code": 0, "signal": null, "stdout": "", "stderr": "" }

/home/mprattinge/builds/arraytests: ls | wc -l { "code": 0, "signal": null, "stdout": "3", "stderr": "" }

/home/mprattinge/builds/arraytests: /QOpenSys/pkgs/bin/md5sum $(find . -type f) { "code": 0, "signal": null, "stdout": "5abb169b83dba9f0adc20c0f2a11589b ./.vscode/actions.json\n46652927c9ce029443278a6ee46036c3 ./arrayt.sqlrpgle\n46652927c9ce029443278a6ee46036c3 ./test.rpgle\n46652927c9ce029443278a6ee46036c3 ./test2.sqlrpgle", "stderr": "" }

/home/mprattinge/builds/arraytests: find . -depth -type d -exec rmdir {} + 2>/dev/null { "code": 1, "signal": null, "stdout": "", "stderr": "" }

/home/mprattinge/builds/arraytests: /QOpenSys/usr/bin/qsh liblist -d QGPL QTEMP MBPOBER040 && liblist -c USRPRATT && liblist -a BECBASR426 MBP001F700 BEC001ASP2 YAJL LIBHTTP BECCPYR426 BEC001R426 BECOBYR426 USRMPRAIRL BECOBJPRFD USRPRATT MBPOBER040 QTEMP QGPL && system "CRTBNDRPG PGM(USRPRATT/test) SRCSTMF('test.rpgle') OPTION(EVENTF) DBGVIEW(SOURCE)"; if [[ $? -ne 0 ]]; then exit 1; fi { "code": 1, "signal": null, "stdout": "", "stderr": "CPE3490: Umsetzungsfehler\nRNS9339: Datei test.rpgle kann nicht geöffnet werden.\nCPC2206: Eigentumsrecht für Objekt RETURNCODE in QTEMP Art DTAARA geändert.\nCPC0904: Datenbereich RETURNCODE in Bibliothek QTEMP erstellt.\nRNS9310: Umwandlung fehlgeschlagen. Programm TEST in Bibliothek USRPRATT nicht erstellt.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art USRSPC geändert." }

/home/mprattinge: /QOpenSys/usr/bin/qsh system "QSYS/CPYTOIMPF FROMFILE(USRPRATT/EVFEVENT TEST) TOSTMF('/tmp/vscodetemp-O_32gXi3i3') MBROPT(REPLACE) STMFCCSID(1208) RCDDLM(CRLF) DTAFMT(DLM) RMVBLANK(TRAILING) ADDCOLNAM(SQL) FLDDLM(',') DECPNT(PERIOD)"; if [[ $? -ne 0 ]]; then exit 1; fi { "code": 0, "signal": null, "stdout": "", "stderr": "CPC2206: Eigentumsrecht für Objekt QCPEXTEMPS in QTEMP Art USRSPC geändert.\nCPC2206: Eigentumsrecht für Objekt QACP115475 in QTEMP Art USRSPC geändert.\nCPC2206: Eigentumsrecht für Objekt QACEXFLD12 in QTEMP Art USRSPC geändert.\nCPC2206: Eigentumsrecht für Objekt Q1T1TT02 in QTEMP Art FILE geändert.\nCPC2958: Alle Sätze aus Datei EVFEVENT in USRPRATT kopiert.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert." }

r Michael

worksofliam commented 10 months ago

This is a new error for me.

CPC2206: Ownership of object QCPEXTEMPS changed to QTEMP type *USRSPC.

What version of IBM i is this? @mprattinger

mprattinger commented 10 months ago

Hi, we are currently on V7R3M0

worksofliam commented 10 months ago

Are you able to run these from 5250?

mprattinger commented 10 months ago

Hi,

the first command fails with the same message, the second one worked

worksofliam commented 10 months ago

@mprattinger I am starting to ponder if there is not much we can do about that error message from our side if you're still getting that error outside of Code for IBM i.

https://archive.midrange.com/midrange-l/200301/msg01648.html

chrjorgensen commented 10 months ago

@mprattinger Have you tried if the error is fixed by the latest versions of Code for IBM i and VS Code?

chrjorgensen commented 10 months ago

@mprattinger I investigated some more regarding the message RNS9339 in your error log. Here is the description for the error message:

Cause . . . . . : The error is due to one of the following: -- the file does not exist -- if a relative path was specified (not beginning with /) the path is not in the current directory -- the file has a Unicode CCSID and TGTCCSID(*SRC) was specified (this does not apply to /COPY files) -- the file has a pure DBCS CCSID -- the file cannot be opened at this time. See the previously listed message &1 in the job log for more information. Recovery . . . : Correct the error and compile again.

Please check the file test.rpgleis in your current directory, when you run the CRTBNDRPG command. Also check the CCSID of the file!

mprattinger commented 9 months ago

When i ran it from the green screen, i get the same error. The ccsid is correct. I will check with our admin.