codefori / vscode-ibmi

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

Code for IBM i object browser filter error #1255

Closed bigsdavid closed 8 months ago

bigsdavid commented 1 year ago

I've installed and completely wiped/reinstalled VS Code 1.77.3 + Code for IBM i, and after creating a filter for a source file under "object browser", expanding the object browser filter returns "Cannot set properties of undefined (setting 'from')"

worksofliam commented 1 year ago

@bigsdavid please share your VS Code settings JSON.

worksofliam commented 1 year ago

@bigsdavid Please also share what version of Code for IBM i you are using?

bigsdavid commented 1 year ago

Code for IBM i version 1.8.0

User settings JSON: Problem is in the code-for-ibmi.connectionSettings for "DEV1". Opening the source code filter in the Object Browser I created throws the "Cannot set properties of undefined (setting 'from')" error when I attempt to open the filter. The source code filter for the PUB400 connection works - does not throw this error.

{ "zowe.ds.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [], "searchHistory": [] }, "zowe.uss.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "zowe.jobs.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "code-for-ibmi.connections": [ { "name": "DEV1", "host": "10.6.0.2", "port": 22, "username": "d_wilson", "privateKey": "" }, { "name": "PUB400", "host": "pub400.com", "port": 2222, "username": "wilsond", "privateKey": "", "buttons": "submitButton", "password": "*****", "keepaliveInterval": 35000 } ], "code-for-ibmi.connectionSettings": [ { "name": "DEV1", "host": "", "objectFilters": [ { "name": "Development source", "library": "SOURCEDEV", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false, "buttons": "SAVE" } ], "libraryList": [ "GPLIB", "QGPL", "VLDLSVR", "PCSHTABLES", "QTEMP", "SPLAMATIC", "ZMODEDIIP", "ZMODLIB10", "HAWKEYEAS1", "CRYPTO", "JGILIBR", "SFGLIBR" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/d_wilson" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/d_wilson", "enableSQL": true, "tempLibrary": "D_WILSON", "tempDir": "/tmp", "currentLibrary": "D_WILSON", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" }, { "name": "PUB400", "host": "", "objectFilters": [ { "name": "SOURCE", "library": "WILSOND1", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false, "buttons": "SAVE" } ], "libraryList": [ "QGPL", "QTEMP", "GAMES400" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/WILSOND" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/WILSOND", "enableSQL": true, "tempLibrary": "WILSOND1", "tempDir": "/tmp", "currentLibrary": "WILSOND1", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" } ], "workbench.editor.enablePreview": false, "terminal.integrated.sendKeybindingsToShell": true }

chrjorgensen commented 1 year ago

@bigsdavid Your filters look a bit wrong:

Instead of this

{
"name": "Development source",
"library": "SOURCEDEV",
"object": "Q",
"types": [
"SRCPF"
],
"member": "",
"memberType": "",
"protected": false,
"buttons": "SAVE"
}

you should have this

{
"name": "Development source",
"library": "SOURCEDEV",
"object": "Q*",
"types": [
"*SRCPF"
],
"member": "*",
"memberType": "*",
"protected": false
}

Try and change the config file according to the above and see if it helps. And if so, also do the change for the PUB400 object filter, which has the same error.

You must use * when specifying object types (like *SRCPF) and generic object names, member names and member types in the Object Filter UI.

The lines "buttons": "SAVE" should not be there and seems to be a bug in the extension. We will investigate this... thanks.

bigsdavid commented 1 year ago

@chrjorgensen - thanks for the reply. I modified the config per your instructions. Still getting the same error on the DEV1 system for the filters. The PUB400 config, which looks exactly the same as far as construction, works just fine.

Here are the current settings:

{ "zowe.ds.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [], "searchHistory": [] }, "zowe.uss.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "zowe.jobs.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "code-for-ibmi.connections": [ { "name": "DEV1", "host": "10.6.0.2", "port": 22, "username": "d_wilson", "privateKey": "" }, { "name": "PUB400", "host": "pub400.com", "port": 2222, "username": "wilsond", "privateKey": "", "buttons": "submitButton", "keepaliveInterval": 35000 } ], "code-for-ibmi.connectionSettings": [ { "name": "DEV1", "host": "", "objectFilters": [ { "name": "Development source", "library": "SOURCEDEV", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false }, { "name": "Personal source", "library": "D_WILSON", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false } ], "libraryList": [ "GPLIB", "QGPL", "VLDLSVR", "PCSHTABLES", "QTEMP", "SPLAMATIC", "ZMODEDIIP", "ZMODLIB10", "HAWKEYEAS1", "CRYPTO", "JGILIBR", "SFGLIBR" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/d_wilson" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/d_wilson", "enableSQL": true, "tempLibrary": "ILEDITOR", "tempDir": "/tmp", "currentLibrary": "D_WILSON", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" }, { "name": "PUB400", "host": "", "objectFilters": [ { "name": "SOURCE", "library": "WILSOND1", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false } ], "libraryList": [ "QGPL", "QTEMP", "GAMES400" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/WILSOND" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/WILSOND", "enableSQL": true, "tempLibrary": "WILSOND1", "tempDir": "/tmp", "currentLibrary": "WILSOND1", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" }, { "name": "PROD1", "host": "", "objectFilters": [], "libraryList": [], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [], "autoSortIFSShortcuts": false, "homeDirectory": ".", "enableSQL": true, "tempLibrary": "ILEDITOR", "tempDir": "/tmp", "currentLibrary": "", "sourceASP": "", "sourceFileCCSID": "*FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": false, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true } ], "workbench.editor.enablePreview": false, "terminal.integrated.sendKeybindingsToShell": true, "vscode-rpgle.showFixedFormatOutline": true }

chrjorgensen commented 1 year ago

@bigsdavid Sorry for no success...

Next step: Please restart VS Code, recreate the issue and share all output from Code for IBM i in the Output tab, so we can see the server communication:

billede

If very long, upload it as a text file.

bigsdavid commented 1 year ago

File:

Code_for_i_DEV1_output_window_contents.txt

chrjorgensen commented 1 year ago

Thanks for the upload. There is no server side errors, but one thing I noticed is your bash profile outputs this on each command:

...Running /home/d_wilson/.bashrc...

So stdout always has the above in the beginning of the string, like this sample:

"stdout": "Running /home/d_wilson/.bashrc\nCPF9861: Output file O_SGEBUFOV created in library ILEDITOR.\n

I think this will confuse Code for IBM i when interpreting the output from the command issued. Please try and edit your bash setup to not have this additional output on bash commands issued from SSH.

bigsdavid commented 1 year ago

We have a facility that is su/sudo-like on our IBM i system and those messages were in the bash startups to let the user know if they were a 'root' user or not, and which LPAR they were on.

When I commented out those echos, the filters started working!

Great bit of sleuthing, Christian! Thanks!

chrjorgensen commented 1 year ago

You're welcome - and you're not the first having this issue (that's why I could pinpoint this when seeing the output from the server).

Hope you will continue enjoying Code for IBM i.

bigsdavid commented 1 year ago

Hi @chrjorgensen - I've run into a similar problem but this time there is no error message. A object browser filter to a source physical file never opens/expands. No errors logged in the "output" window during connection to the server, or when I expand the filter to show the source members. Not sure where to look with this one. Following is the settings.json. Filter is for connection PROD1, filter name "Source" (i've tried Q* and QRPGSRC, both, in the object name)

{ "zowe.ds.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [], "searchHistory": [] }, "zowe.uss.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "zowe.jobs.history": { "persistence": true, "favorites": [], "history": [], "sessions": [ "zxplore2022" ], "fileHistory": [] }, "code-for-ibmi.connections": [ { "name": "DEV1", "host": "10.6.0.2", "port": 22, "username": "d_wilson", "privateKey": "", "buttons": "submitButton", "keepaliveInterval": 35000 }, { "name": "PUB400", "host": "pub400.com", "port": 2222, "username": "wilsond", "privateKey": "", "buttons": "submitButton", "keepaliveInterval": 35000 }, { "name": "PROD1", "host": "10.1.0.1", "port": 22, "username": "d_wilson", "privateKey": "", "buttons": "submitButton" } ], "code-for-ibmi.connectionSettings": [ { "name": "DEV1", "host": "", "objectFilters": [ { "name": "Development source", "library": "SOURCEDEV", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false, "buttons": "SAVE" }, { "name": "Personal source", "library": "D_WILSON", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false } ], "libraryList": [ "GPLIB", "QGPL", "VLDLSVR", "PCSHTABLES", "QTEMP", "SPLAMATIC", "ZMODEDIIP", "ZMODLIB10", "HAWKEYEAS1", "CRYPTO", "JGILIBR", "SFGLIBR" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/d_wilson", "/" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/d_wilson", "enableSQL": true, "tempLibrary": "ILEDITOR", "tempDir": "/tmp", "currentLibrary": "D_WILSON", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" }, { "name": "PUB400", "host": "", "objectFilters": [ { "name": "SOURCE", "library": "WILSOND1", "object": "Q", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false } ], "libraryList": [ "QGPL", "QTEMP", "GAMES400" ], "autoClearTempData": false, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/WILSOND" ], "autoSortIFSShortcuts": false, "homeDirectory": "/home/WILSOND", "enableSQL": true, "tempLibrary": "WILSOND1", "tempDir": "/tmp", "currentLibrary": "WILSOND1", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": true, "encodingFor5250": "default", "terminalFor5250": "default", "setDeviceNameFor5250": false, "connectringStringFor5250": "localhost", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" }, { "name": "PROD1", "host": "", "objectFilters": [ { "name": "Source", "library": "D_WILSON", "object": "QRPGSRC", "types": [ "SRCPF" ], "member": "", "memberType": "", "protected": false } ], "libraryList": [ "JGILIBR", "AALLIBR", "GPLIB", "QGPL", "D_WILSON", "SFGBOLIBR", "ILEDITOR" ], "autoClearTempData": true, "customVariables": [], "connectionProfiles": [], "commandProfiles": [], "ifsShortcuts": [ "/home/d_wilson", "/" ], "autoSortIFSShortcuts": true, "homeDirectory": "/home/d_wilson", "enableSQL": true, "tempLibrary": "ILEDITOR", "tempDir": "/tmp", "currentLibrary": "JGILIBR", "sourceASP": "", "sourceFileCCSID": "FILE", "autoConvertIFSccsid": false, "hideCompileErrors": [], "enableSourceDates": false, "sourceDateMode": "edit", "sourceDateGutter": false, "encodingFor5250": "default", "terminalFor5250": "IBM-3477-FC", "setDeviceNameFor5250": false, "connectringStringFor5250": "ssl:localhost 992", "autoSaveBeforeAction": false, "showDescInLibList": false, "debugPort": "8005", "debugIsSecure": false, "debugUpdateProductionFiles": false, "debugEnableDebugTracing": false, "readOnlyMode": false, "quickConnect": true, "buttons": "save" } ], "workbench.editor.enablePreview": false, "terminal.integrated.sendKeybindingsToShell": true, "vscode-rpgle.showFixedFormatOutline": true }

chrjorgensen commented 1 year ago

@bigsdavid Even though you see no errors, please attach all the output from Output view anyway, from connecting to the server to expanding the filter:

We need to see the commands issues and the server responses to determine any cause...

bigsdavid commented 1 year ago

here is the content of the output window:.: pwd { "code": 0, "signal": null, "stdout": "/home/d_wilson", "stderr": "" }

/home/d_wilson: pwd { "code": 0, "signal": null, "stdout": "/home/d_wilson", "stderr": "" }

/home/d_wilson: /QOpenSys/usr/bin/qsh liblist { "code": 0, "signal": null, "stdout": "", "stderr": "" }

/home/d_wilson: system "CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')" { "code": 255, "signal": null, "stdout": "", "stderr": "CPF2111: Library ILEDITOR already exists." }

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

/home/dwilson: system "DLTOBJ OBJ(ILEDITOR/O) OBJTYPE(FILE)" /home/d_wilson: rm -f /tmp/vscodetemp* /home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i')" select CHARACTER_CODE_SET_ID from table( QSYS2.QSYUSRINFO( USERNAME => upper('d_wilson') ) ) { "code": 0, "signal": null, "stdout": "", "stderr": "" }

{ "code": 255, "signal": null, "stdout": "", "stderr": "CPF2125: No objects deleted." }

{ "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i')" with VARIANTS ( HASH, AT, DOLLARSIGN ) as ( values ( cast( x'7B' as varchar(1) ) , cast( x'7C' as varchar(1) ) , cast( x'5B' as varchar(1) ) ))select HASH concat AT concat DOLLARSIGN as LOCAL from VARIANTS; { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

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

/home/d_wilson: ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx { "code": 2, "signal": null, "stdout": "", "stderr": "ls: cannot access '/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx': No such file or directory" }

/home/d_wilson: system "DSPFD FILE(D_WILSON/Q) TYPE(ATR) FILEATR(PF) OUTPUT(OUTFILE) OUTFILE(ILEDITOR/O_Ru3rjLbH)" { "code": 0, "signal": null, "stdout": "CPF9861: Output file O_RU3RJLBH created in library ILEDITOR.\nCPF9862: Member O_RU3RJLBH added to output file O_RU3RJLBH in library ILEDITOR.\nCPF3030: 18 records added to member O_RU3RJLBH in file O_RU3RJLBH in ILEDITOR.", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" SELECT * FROM ILEDITOR.O_Ru3rjLbH { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

.: system "DLTOBJ OBJ(ILEDITOR/O_Ru3rjLbH) OBJTYPE(*FILE)" { "code": 0, "signal": null, "stdout": "", "stderr": "" }

worksofliam commented 1 year ago

@bigsdavid It looks like this might be your issue: https://halcyon-tech.github.io/docs/#/pages/tips/setup?id=no-results-from-sql-execution

bigsdavid commented 1 year ago

Was already using the sshd daemon /QOpenSys/QIBM/ProdData/SC1/OpenSSH/sbin/sshd. Also tried the .pem format for the authentication by private key (instead of using a password), but that didn't help either.

bigsdavid commented 1 year ago

When I run all of the commands below (taken from the output display) from a puTTY session, they all work - and the db2 utility SQL SELECT returns rows.

/home/d_wilson: system "DSPFD FILE(D_WILSON/Q) TYPE(ATR) FILEATR(PF) OUTPUT(OUTFILE) OUTFILE(ILEDITOR/O_jyxJkKwq)" { "code": 0, "signal": null, "stdout": "CPF9861: Output file O_JYXJKKWQ created in library ILEDITOR.\nCPF9862: Member O_JYXJKKWQ added to output file O_JYXJKKWQ in library ILEDITOR.\nCPF3030: 18 records added to member O_JYXJKKWQ in file O_JYXJKKWQ in ILEDITOR.", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" SELECT * FROM ILEDITOR.O_jyxJkKwq { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

.: system "DLTOBJ OBJ(ILEDITOR/O_jyxJkKwq) OBJTYPE(*FILE)" { "code": 0, "signal": null, "stdout": "", "stderr": "" }

chrjorgensen commented 1 year ago

@bigsdavid Are you sure this is not the same problem as previous - that your shell profile outputs some data to stdout, which then confuses Code for IBM i? The symptoms are exactly the same here...

We have added a check (PR #1270) on connecting to a server for this situation, and the change will be included in a future release. If you like, you can clone this repo and run the extension from the master branch and have the check run against your server... else you'll have to wait for the release.

bigsdavid commented 1 year ago

I have a DEV and PROD (and one to PUB400) set up in my VS Code configurations. On my LPARs (DEV and PROD), all extraneous echo's have been commented out in .bash_login, .bashrc and .profile and profile. The object filters for source PFs works fine on the DEV config, and the shortcuts for IFS folders works on both. I'm just not seeing any output for the source PF object filter on PROD. There is no mention of any error, and no output. Anyway to get a more detailed trace of what's going on? Perhaps a server job on the host (if I can identify which job is serving the request)?

chrjorgensen commented 1 year ago

Please right-click the connection PROD and select Connect and Reload Server Settings and report any errors (this will make all checks run again for the server). We just had another issue where the system had the terrible data area QCPTOIMPF - see this comment for more information.

If this does not give any clue, run the commands in Putty as before and upload the output from command

LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
SELECT * FROM ILEDITOR.O_<blahblahblah>
bigsdavid commented 1 year ago

We don't have the QCPTOIMPF data area on our system. I remember the issue about needing that data area, but it's long gone.

bigsdavid commented 1 year ago

The connect and reload did not change anything

bigsdavid commented 1 year ago

Here's the output after the connect and reload, then opening the filter:.: pwd { "code": 0, "signal": null, "stdout": "/home/d_wilson", "stderr": "" }

/home/d_wilson: pwd { "code": 0, "signal": null, "stdout": "/home/d_wilson", "stderr": "" }

/home/d_wilson: /QOpenSys/usr/bin/qsh liblist { "code": 0, "signal": null, "stdout": "", "stderr": "" }

/home/d_wilson: system "CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')" { "code": 255, "signal": null, "stdout": "", "stderr": "CPF2111: Library ILEDITOR already exists." }

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

/home/dwilson: system "DLTOBJ OBJ(ILEDITOR/O) OBJTYPE(FILE)" /home/d_wilson: rm -f /tmp/vscodetemp /home/d_wilson: system "CHKOBJ OBJ(QSYS/QCPTOIMPF) OBJTYPE(DTAARA)" { "code": 0, "signal": null, "stdout": "", "stderr": "" }

{ "code": 255, "signal": null, "stdout": "", "stderr": "CPF2125: No objects deleted." }

{ "code": 255, "signal": null, "stdout": "", "stderr": "CPF9801: Object QCPTOIMPF in library QSYS not found." }

/home/d_wilson: system "CHKOBJ OBJ(QSYS/QCPFRMIMPF) OBJTYPE(*DTAARA)" { "code": 255, "signal": null, "stdout": "", "stderr": "CPF9801: Object QCPFRMIMPF in library QSYS not found." }

/home/d_wilson: ls -p /QOpenSys/pkgs/bin/ { "code": 0, "signal": null, "stdout": "2to3\n2to3-3.6\n2to3-3.9\n5250keys\nR\nRscript\n[\naccessdb\naclocal\naclocal-1.15\naddftinfo\naddgnupghome\naddr2line\nafmtodit\nalternatives\nanacron\nansible\nansible-config\nansible-connection\nansible-console\nansible-doc\nansible-galaxy\nansible-inventory\nansible-playbook\nansible-pull\nansible-test\nansible-vault\napplygnupgdefaults\napropos\natob\nautoconf\nautoheader\nautom4te\nautomake\nautomake-1.15\nautoreconf\nautoscan\nautoupdate\nawk\nbase32\nbase64\nbasename\nbash\nbashbug\nbison\nbsqldb\nbsqlodbc\nbtoa\nbunzip2\nbzcat\nbzcmp\nbzdiff\nbzegrep\nbzfgrep\nbzgrep\nbzip2\nbzip2recover\nbzless\nbzmore\nc++\nc++filt\nc2ph\nc_rehash\ncal\ncaptoinfo\ncat\ncatman\ncc\nccmake\ncertutil\nchardetect\nchcon\nchem\nchgrp\nchmod\nchown\nchroot\nchroot_setup\nchsh\ncjpeg\ncksum\nclear\ncmake\ncmsutil\ncol\ncolcrt\ncolrm\ncolumn\ncomm\ncorelist\ncp\ncpack\ncpan\ncpp-6\ncpp-6.bin\ncrlutil\ncrond\ncronnext\ncrontab\ncrtfrmstmf\ncsplit\nctest\ncurl\ncurve_keygen\ncut\ncwbcopwr\ncwbmedic\ncwbnltbl\ncwbping\ncwbtrc\ndatacopy\ndate\ndb2util\ndb2util.1.0.7\ndb_archive\ndb_checkpoint\ndb_deadlock\ndb_dump\ndb_hotbackup\ndb_load\ndb_printlog\ndb_recover\ndb_sql\ndb_stat\ndb_upgrade\ndb_verify\ndd\ndebuginfo-install\ndefncopy\nderdump\ndf\ndir\ndircolors\ndirmngr\ndirmngr-client\ndirname\ndjpeg\ndltest\ndos2unix\ndu\necho\negrep\nelfedit\nenc2xs\nencguess\nenv\neqn\neqn2graph\nex\nexpand\nexpr\nf2py3.6\nf95\nfactor\nfalse\nfgrep\nfind\nfind-repos-of-install\nfisql\nflex\nflex++\nfmt\nfold\nfreebcp\nfunzip\ng++\ng++-6\ng++-6.bin\ngawk\ngcc\ngcc-6\ngcc-6.bin\ngcc-ar\ngcc-ar-6\ngcc-ar-6.bin\ngcc-nm\ngcc-nm-6\ngcc-nm-6.bin\ngcc-ranlib\ngcc-ranlib-6\ngcc-ranlib-6.bin\ngcov\ngcov-6\ngdb\ngdiffmk\ngendiff\ngetopt\ngfortran\ngfortran-6\ngfortran-6.bin\ngit\ngit-cvsserver\ngit-receive-pack\ngit-shell\ngit-upload-archive\ngit-upload-pack\nglilypond\ngmake\ngnu-ar\ngnu-as\ngnu-ld\ngnu-nm\ngnu-ranlib\ngnu-size\ngnu-strings\ngnu-strip\ngperl\ngpg\ngpg-agent\ngpg-connect-agent\ngpg-wks-server\ngpgconf\ngpgparsemail\ngpgscm\ngpgtar\ngpgv\ngpinyin\ngrap2graph\ngrep\ngrn\ngrodvi\ngroff\ngroffer\ngrog\ngrolbp\ngrolj4\ngropdf\ngrops\ngrotty\ngroups\ngsed\ngunzip\ngzexe\ngzip\nh2ph\nh2xs\nhardlink\nhead\nhexdump\nhostid\nhpftodit\niconv\nid\nidle3\nidle3.6\nidle3.9\nifnames\nigawk\nindxbib\ninfocmp\ninfotocap\ninstall\ninstmodsh\nipcmk\niptest\niptest3\nipython\nipython3\nisosize\nisql\niusql\njmacs\njoe\njoin\njpegtran\njpico\njq\njson_pp\njstar\nkill\nld.bfd\nless\nlessecho\nlesskey\nlexgrog\nlftp\nlftpget\nlibnetcfg\nlibpng-config\nlibpng16-config\nlibtool\nlibtoolize\nlink\nlistsuites\nlkbib\nln\nlocate\nlogname\nlook\nlookbib\nlp5250d\nls\nlzcat\nlzcmp\nlzdiff\nlzegrep\nlzfgrep\nlzgrep\nlzless\nlzma\nlzmadec\nlzmainfo\nlzmore\nm4\nmac2unix\nmailq\nmake\nmakei\nman\nman-recode\nmandb\nmanpath\nmc\nmcdiff\nmcedit\nmcookie\nmcview\nmd5sum\nmesg\nmkdir\nmkfifo\nmknod\nmktemp\nmmroff\nmodutil\nmsmtp\nmsmtpd\nmv\nnamei\nnano\nncdu\nncurses6-config\nncursesw6-config\nneeds-restarting\nneqn\nnginx\nnice\nnl\nnode\nnodever\nnohup\nnologin\nnpm\nnproc\nnpx\nnroff\nnss-policy-check\nnumfmt\nobjcopy\nobjdump\nocspclnt\nod\nodbc_config\nodbcinst\nopenssl\nosql\npackage-cleanup\npaste\npatch\npathchk\npdfmom\npdfroff\nperl\nperl5.24.1\nperlbug\nperldoc\nperlivp\nperlthanks\npfbtops\npic\npic2graph\npiconv\npinentry\npinentry-curses\npinky\npip\npip3\npip3.6\npip3.9\npk12util\npkg-config\npl2pm\npod2html\npod2man\npod2text\npod2usage\npodchecker\npodselect\npost-grohtml\npowerpc-ibm-os400-pkg-config\npp\npr\npre-grohtml\npreconv\nprichunkpng\npriforgepng\nprigreypng\nprintenv\nprintf\npripalpng\npripamtopng\npripnglsch\npripngtopam\npriweavepng\nprove\npstruct\nptar\nptardiff\nptargrep\nptx\npwd\npydoc\npydoc3\npydoc3.6\npydoc3.9\npyfiglet\npygmentize\npyjwt\npython\npython2\npython2.7\npython3\npython3-config\npython3.6\npython3.6-config\npython3.6m\npython3.6m-config\npython3.9\npyvenv-3.6\nqr\nrdjpgcom\nreadelf\nreadlink\nrealpath\nrefer\nrename\nrenice\nrepo-graph\nrepo-rss\nrepoclosure\nrepodiff\nrepomanage\nrepoquery\nreposync\nrepotrack\nreset\nrev\nrjoe\nrm\nrmdir\nrnano\nroff2dvi\nroff2html\nroff2pdf\nroff2ps\nroff2text\nroff2x\nrpm\nrpm2archive\nrpm2cpio\nrpmbuild\nrpmdb\nrpmgraph\nrpmkeys\nrpmquery\nrpmsign\nrpmspec\nrpmverify\nrun-parts\nruncon\nrview\nrvim\nsc\nsc_install_defaults\nscalar\nscedit\nscinit\nscopenports\nscs2ascii\nscs2pdf\nscs2ps\nsed\nselfserv\nsendmail\nseq\nsetsid\nsha1sum\nsha224sum\nsha256sum\nsha384sum\nsha512sum\nshasum\nshow-changed-rco\nshow-installed\nshred\nshuf\nsigntool\nsignver\nsleep\nslencheck\nslsh\nsmtpd.py\nsoelim\nsort\nsplain\nsplit\nsqlite3\nsqlite3_analyzer\nssltap\nstat\nstdbuf\nstrsclnt\nstty\nsum\nsymkeyutil\nsync\ntabs\ntac\ntail\ntar\ntbl\ntclsh8.6\ntdspool\ntee\ntest\ntfmtodit\ntic\ntimeout\ntjbench\ntmux\ntn5250\ntoe\ntouch\ntput\ntr\ntree\ntroff\ntrue\ntruncate\ntrust\ntset\ntsort\ntsql\ntstclnt\ntty\nuname\nuncompress\nunexpand\nuniq\nunix2dos\nunix2mac\nunlink\nunlzma\nunxz\nunzip\nunzipsfx\nupdate-alternatives\nupdate-ca-certificates\nupdatedb\nuptime\nurlgrabber\nusers\nuuidgen\nuuidparse\nvdir\nverifytree\nvfychain\nvfyserv\nview\nvim\nvimdiff\nvimtutor\nwatchgnupg\nwc\nwget\nwhatis\nwheel\nwhereis\nwho\nwhoami\nwish8.6\nwrjpgcom\nxargs\nxmlservice-cli\nxsltproc\nxsubpp\nxt5250\nxxd\nxz\nxzcat\nxzcmp\nxzdec\nxzdiff\nxzegrep\nxzfgrep\nxzgrep\nxzless\nxzmore\nyacc\nydbfdump\nyes\nyum\nyum-builddep\nyum-complete-transaction\nyum-config-manager\nyum-debug-dump\nyum-debug-restore\nyum-groups-manager\nyumdb\nyumdownloader\nzcat\nzcmp\nzdiff\nzegrep\nzfgrep\nzforce\nzgrep\nzipdetails\nzipgrep\nzipinfo\nzless\nzmore\nznew", "stderr": "" }

/home/d_wilson: ls -p /usr/bin/ { "code": 0, "signal": null, "stdout": "Rfile\najar\najar.prv\nappletviewer\napt\nar\narmsrv\narmsrvconv\nattr\nbasename\nbash\nbash2\nbash2bug\nbashbug\nbatchftp\nbison\nbsh\nbwbasic\ncat\ncatsplf\ncc\nchgrp\nchmod\nchown\nclrtmp\ncmp\ncompress\ncp\ncpio\ncurl\ncut\ndataq\ndatarea\ndate\ndb2\ndb2profc\ndb2profc_trace\ndb2profp\nddns-confgen\ndel\ndelv\ndfmadmin\ndhcpd\ndhcrelay\ndig\ndirname\ndnssec-dsfromkey\ndnssec-importkey\ndnssec-keyfromlabel\ndnssec-keygen\ndnssec-revoke\ndnssec-settime\ndnssec-signzone\ndnssec-verify\ndspmsg\necho\negrep\nenv\nexpr\nextcheck\nfgrep\nfile\nfind\nflex\nfortune\ngawk\ngcc\ngencat\ngetftpcode\ngetjobid\ngetnxtnbr\ngettext\ngettextize\ngfortran\ngmake\ngnugawk\ngrep\ngrep.prv\ngunzip\ngzip\nhead\nhost\nhostname\nhwkeytool\nicc\niconv\nid\nidlj\nidn\nikeyman\ninfo\ninfokey\nipcrm\nipcs\nisql\niuqsql\niusql\nixlc\nixlci\njar\njarsigner\njava\njavac\njavadoc\njavah\njavap\njconsole\njdb\njdmpview\njextract\njq\nkdestroy\nkeytab\nkeytool\nkinit\nklist\nkpasswd\nksetup\nld\nldapadd\nldapchangepwd\nldapcompare\nldapdelete\nldapdiff\nldapexop\nldapmodify\nldapmodrdn\nldapsearch\nln\nlocale\nlogger\nlogname\nls\nmake\nmkdir\nmkfifo\nmsgcmp\nmsgcomm\nmsgfmt\nmsgmerge\nmsgunfmt\nmv\nnamed\nnamed-checkconf\nnamed-checkzone\nnamed-compilezone\nnamed-journalprint\nnamed-rrchecker\nnative2ascii\nngettext\nnode\nnode_modules/\nnohup\nnpm\nnslookup\nnsupdate\nod\nodbcinst\norbd\npack200\npackage-lock.json\npax\nperl\nphp\nphp-cli\nping\npip\npolicytool\npoppath\npr\nprintenv\nprofconv\nprofdb\nprofp\nps\npushpath\npwd\npwdx\npython\nqar\nqsh\nqshgawk\nrexec\nrexx\nrm\nrmdir\nrmic\nrmid\nrmiregistry\nrndc\nrndc-confgen\nrpm\nschemagen\nsed\nserialver\nservertool\nsetccsid\nsh\nsort\nsplit\nsqlj\nstrEKM\nsys.mk.gz\nsyssts\nsystem\nsysval\ntail\ntar\ntee\ntest\ntnameserv\ntouch\ntr\ntsig-keygen\nuname\nuncompress\nuniq\nunpack200\nwc\nwget\nwsgen\nwsimport\nxargs\nxgettext\nxjc\nzcat", "stderr": "" }

/home/d_wilson: ls -p /QSYS.LIB/QZDFMDB2.PGM { "code": 0, "signal": null, "stdout": "/QSYS.LIB/QZDFMDB2.PGM", "stderr": "" }

/home/d_wilson: ls -p /QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh { "code": 0, "signal": null, "stdout": "/QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh", "stderr": "" }

/home/d_wilson: ls -p /QSYS.lib/ILEDITOR.lib/GE.PGM { "code": 2, "signal": null, "stdout": "", "stderr": "ls: cannot access '/QSYS.lib/ILEDITOR.lib/GE.PGM': No such file or directory" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i')" SELECT * FROM QSYS2.ASP_INFO { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i')" select CHARACTER_CODE_SET_ID from table( QSYS2.QSYUSRINFO( USERNAME => upper('d_wilson') ) ) { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i')" with VARIANTS ( HASH, AT, DOLLARSIGN ) as ( values ( cast( x'7B' as varchar(1) ) , cast( x'7C' as varchar(1) ) , cast( x'5B' as varchar(1) ) ))select HASH concat AT concat DOLLARSIGN as LOCAL from VARIANTS; { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

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

/home/d_wilson: ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx /home/d_wilson: /usr/bin/attr "/tmp/vscodetemp-O_gO5JPs1j" CCSID { "code": 2, "signal": null, "stdout": "", "stderr": "ls: cannot access '/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx': No such file or directory" }

{ "code": 1, "signal": null, "stdout": "", "stderr": "attr: 001-2248 Error found getting attributes for file /tmp/vscodetemp-O_gO5JPs1j. No such path or directory." }

/: system "RUNSQLSTM SRCSTMF('/tmp/vscodetemp-O_gO5JPs1j') COMMIT(NONE) NAMING(SQL)" { "code": 0, "signal": null, "stdout": "5770SS1 V7R4M0 190621 Run SQL Statements VSCODETEMP 05/17/23 09:38:22 PAGE 1\nSource stream file......../tmp/vscodetemp-O_gO5JPs1j\nTarget release............V7R4M0\nCommit....................NONE\nNaming....................SQL\nGeneration level..........10\nDate format...............JOB\nDate separator............JOB\nTime format...............HMS\nTime separator ...........JOB\nRight margin..............80\nDefault collection........NONE\nIBM SQL flagging..........NOFLAG\nANS flagging..............NONE\nDecimal point.............JOB\nSort sequence.............JOB\nLanguage ID...............JOB\nPrinter file..............LIBL/QSYSPRT\nSource file CCSID.........1208\nJob CCSID.................37\nStatement processing......RUN\nAllow copy of data........OPTIMIZE\nAllow blocking............ALLREAD\nSQL rules.................DB2\nDecimal result options:\n Maximum precision.......31\n Maximum scale...........31\n Minimum divide scale....0\nConcurrent access\n resolution..............DFT\nSystem time sensitive.....YES\nSource member changed on 05/17/23 09:38:21\n5770SS1 V7R4M0 190621 Run SQL Statements VSCODETEMP 05/17/23 09:38:22 PAGE 2\nRecord ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Last change\n 1 CREATE OR REPLACE PROCEDURE ILEDITOR.GETNEWLIBL(IN COMMAND VARCHAR(2000))\n 2 DYNAMIC RESULT SETS 1\n 3 BEGIN\n 4 DECLARE clibl CURSOR FOR\n 5 SELECT ORDINAL_POSITION, TYPE as PORTION, SYSTEM_SCHEMA_NAME\n 6 FROM QSYS2.LIBRARY_LIST_INFO;\n 7 CALL QSYS2.QCMDEXC(COMMAND);\n 8 OPEN clibl;\n 9 END;\n E N D O F S O U R C E \n5770SS1 V7R4M0 190621 Run SQL Statements VSCODETEMP 05/17/23 09:38:22 PAGE 3\nRecord ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Last change\nMSG ID SEV RECORD TEXT\nSQL7989 0 1 Position 1 Procedure GETNEWLIBL was created in ILEDITOR.\n Message Summary\n Total Info Warning Error Severe Terminal\n 1 1 0 0 0 0\n00 level severity errors found in source\n E N D O F L I S T I N G *", "stderr": "" }

/home/d_wilson: system "DSPFD FILE(D_WILSON/Q) TYPE(ATR) FILEATR(PF) OUTPUT(OUTFILE) OUTFILE(ILEDITOR/O_fbZ6F81b)" { "code": 0, "signal": null, "stdout": "CPF9861: Output file O_FBZ6F81B created in library ILEDITOR.\nCPF9862: Member O_FBZ6F81B added to output file O_FBZ6F81B in library ILEDITOR.\nCPF3030: 18 records added to member O_FBZ6F81B in file O_FBZ6F81B in ILEDITOR.", "stderr": "" }

/home/d_wilson: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" SELECT * FROM ILEDITOR.O_fbZ6F81b { "code": 0, "signal": null, "stdout": "DB2>", "stderr": "" }

.: system "DLTOBJ OBJ(ILEDITOR/O_fbZ6F81b) OBJTYPE(*FILE)" { "code": 0, "signal": null, "stdout": "", "stderr": "" }

bigsdavid commented 1 year ago

Here's the output running the commands from a putty session: SFGAS1 (PROD1) /home/d_wilson >system "DSPFD FILE(D_WILSON/Q) TYPE(ATR) FILEATR(PF) OUTPUT(OUTFILE) OUTFILE(ILEDITOR/O_fbZ6F81b)" CPF9861: Output file O_FBZ6F81B created in library ILEDITOR. CPF9862: Member O_FBZ6F81B added to output file O_FBZ6F81B in library ILEDITOR. CPF3030: 18 records added to member O_FBZ6F81B in file O_FBZ6F81B in ILEDITOR. SFGAS1 (PROD1) /home/d_wilson >clear SFGAS1 (PROD1) /home/d_wilson >system "DSPFD FILE(D_WILSON/Q) TYPE(ATR) FILEATR(PF) OUTPUT(OUTFILE) OUTFILE(ILEDITOR/O_fbZ6F81b)" CPF9861: Output file O_FBZ6F81B created in library ILEDITOR. CPF9862: Member O_FBZ6F81B added to output file O_FBZ6F81B in library ILEDITOR. CPF3030: 18 records added to member O_FBZ6F81B in file O_FBZ6F81B in ILEDITOR. SFGAS1 (PROD1) /home/d_wilson >LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')" DB2> SELECT * FROM ILEDITOR.O_FBZ6F81B;

PHRCEN PHRDAT PHRTIM PHFILE PHLIB PHFTYP PHFILA PHMXD PHFATR PHSYSN PHASP PHRES PHDTAT PHWAIT PHWATR PHSHAR PHLVLC PHTXT PHNOFM PHFCCN PHFCDT PHFCTM PHFLS PHICAP PHRES2 PHACCP PHSELO PHCSEQ PHNOMB PHRES3 PHSQLT PHRES4 PHMAXM PHMANT PHRECV PHFKAP PHSIZ PHSIZI PHSIZM PHRCDC PHALLO PHCONT PHUNIT PHFRCR PHDLTP PHMXKL PHMXRL PHJRNL PHJRNM PHJRLB PHJRIM PHJRSC PHJRSD PHJRST PHJROM PHNAML PHRMTN PHRDLT PHNACM PHACCM PHALRD PHALWT PHALUP PHALDT PHDCTL PHINID PHDCTN PHFILN PHRUSE PHCSID PHMXK2 PHSSEQ PHSSLB PHLGID PHTBSH PHTBSU PHNOCS PHNOTR PHTBLN PHLNTB PHAPSZ PHDSTF PHNODG PHNODL PHNUMP PHPRTK PHFLPS PHPRBY PHMQMT PHMQRF PHMQOE PHMQCL PHAPGS PHVOLT PHMQRS PHMQRM PHMQWN PHKPIM


1 230517 100743 QCLLESRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N MIMIX - Custom Step Programs & Other Custom 1 1 130403 162857 Y N A N N 20 0 0 10000 1000 499 509000 N N 0 0 0 0 92 Y COMMON ITHAPRJRN A 1 150423 163649 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QCLSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 090225 134737 Y N A N N 165 0 0 10000 1000 499 509000 N N 0 0 0 0 120 Y COMMON ITHAPRJRN A 1 150423 163649 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QCMDSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 120920 155058 Y N A N N 2 0 0 10000 1000 499 509000 N N 0 0 0 0 92 Y COMMON ITHAPRJRN A 1 150423 163650 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QCPPSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N C++ source 1 1 130311 092054 Y N A N N 1 0 0 10000 1000 499 509000 N N 0 0 0 0 212 Y COMMON ITHAPRJRN A 1 150423 163650 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QCSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N C and C++ source 1 1 130311 091354 Y N A N N 32 0 0 10000 1000 499 509000 N N 0 0 0 0 212 Y COMMON ITHAPRJRN A 1 150423 163650 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QDDSSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N DDS source 1 1 090716 091421 Y N A N N 65 0 0 10000 1000 499 509000 N N 0 0 0 0 92 Y COMMON ITHAPRJRN A 1 150423 163650 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QIFSPRVAUT D_WILSON P PHY PF SFGPROD1 1 D 30 60 Y 1 1 220503 104948 Y N A N N 1 0 0 0 0 0 0 N N 0 0 0 0 663 Y COMMON ITHAPRJRN A 1 220503 104948 O 0 0 Y Y Y Y N 0 N 37 0 HEX ENU 0 0 0 1 N 0 N 0 0 0 N 1 230517 100743 QMISRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N MI source 1 1 190826 141700 Y N A N N 1 0 0 10000 1000 499 509000 N N 0 0 0 0 100 Y COMMON ITHAPRJRN A 1 190826 141700 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QOBJPRVAUT D_WILSON P PHY PF SFGPROD1 1 D 30 60 Y 1 1 220503 104948 Y N A N N 1 0 0 0 0 0 0 N N 0 0 0 0 147 Y COMMON ITHAPRJRN A 1 220503 104948 O 0 0 Y Y Y Y N 0 N 37 0 HEX ENU 0 0 0 1 N 0 N 0 0 0 N 1 230517 100743 QRPGPROTO D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N ILE RPG Function/Procedure Prototypes 1 1 220411 144513 Y N A N N 60 0 0 10000 1000 499 509000 N N 0 0 0 0 112 Y COMMON ITHAPRJRN A 1 220411 144513 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QRPGSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 090603 165958 Y N A N N 230 0 0 10000 1000 499 509000 N N 0 0 0 0 112 Y COMMON ITHAPRJRN A 1 150423 163650 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QRYMSTLOGP D_WILSON P PHY PF SFGPROD1 1 D 30 60 Y Query master logic 1 1 161212 105229 Y N K N N 1 T 1 I A N 0 0 0 0 N N 0 0 0 5 1220 Y COMMON ITHAPRJRN A 1 161212 105230 O 0 0 Y Y Y Y N 0 Y 37 5 HEX ENU 0 0 0 1 N 0 N 0 0 0 N 1 230517 100743 QRYMSTP D_WILSON P PHY PF SFGPROD1 1 D 30 60 Y Query master 1 1 161212 105223 Y N K N N 1 T 1 I A N 0 0 0 0 N N 0 0 0 3 457 Y COMMON ITHAPRJRN A 1 161212 105224 O 0 0 Y Y Y Y N 0 Y 37 3 HEX ENU 0 0 0 1 N 0 N 0 0 0 N 1 230517 100743 QSQDSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N SQL PROCEDURES 1 1 090602 115525 Y N A N N 26 0 0 10000 1000 499 509000 N N 0 0 0 0 160 Y COMMON ITHAPRJRN A 1 150423 163651 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QSQLDEV D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 130802 150135 Y N A N N 10 0 0 10000 1000 499 509000 N N 0 0 0 0 120 Y COMMON ITHAPRJRN A 1 150423 163651 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QSQLSESS D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 100617 154457 Y N A N N 2 0 0 10000 1000 499 509000 N N 0 0 0 0 92 Y COMMON ITHAPRJRN A 1 150423 163651 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QSQLSRC D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N 1 1 090210 181705 Y N A N N 376 0 0 10000 1000 499 509000 N N 0 0 0 0 120 Y COMMON ITHAPRJRN A 1 150423 163651 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N 1 230517 100743 QSQLSRCOLD D_WILSON P PHY PF SFGPROD1 1 S - 1 60 N SQL source for Mayo marketing database 1 1 080917 141920 Y N A N N 74 0 0 10000 1000 499 509000 N N 0 0 0 0 120 Y COMMON ITHAPRJRN A 1 150423 163653 O 0 0 Y Y Y Y N 0 37 0 HEX ENU 0 0 0 N 0 N 0 0 0 N

18 RECORD(S) SELECTED.

DB2>

chrjorgensen commented 1 year ago

@bigsdavid I see you're on IBM i 7.4 on your PROD - is DEV on the same version?

I can't pinpoint any errors, but it seems like the copy from an outfile into a streamfile does not produce any readable content.

I would advice to compare the configurations on PROD and DEV:

  1. The SSHD config file /QOpenSys/QIBM/UserData/SC1/OpenSSH/etc/sshd_config
  2. The system environment variables
  3. Your PASE config - .bashrc etc.
  4. Your SSH job environment variables - find the job QP0ZSPWP in subsystem QUSRWRK servicing your user (joblog may help)

Report your findings here.

bigsdavid commented 1 year ago

SSHD config file PROD:

AllowTCPForwarding yes AllowUsers @10. @192. @127. AuthorizedKeysFile .ssh/authorized_keys Banner /home/template/banner.txt ChallengeResponseAuthentication no ClientAliveCountMax 0 ClientAliveInterval 1800 ListenAddress 10.1.0.1 ListenAddress 10.4.0.1 ListenAddress 127.0.0.1 ListenAddress 192.168.1.1 LogLevel VERBOSE LoginGraceTime 1m PermitRootLogin yes Port 22 Protocol 2 PubkeyAuthentication yes Subsystem sftp /QOpenSys/QIBM/ProdData/SC1/OpenSSH/libexec/sftp-server -l INFO -f AUTH SyslogFacility AUTHPRIV X11Forwarding yes

SSHD config file DEV

AllowTcpForwarding yes AllowUsers @10. @192. @127. AuthorizedKeysFile .ssh/authorized_keys Banner /home/template/banner.txt ChallengeResponseAuthentication no ClientAliveCountMax 0 ClientAliveInterval 1800 ListenAddress 10.4.0.5 ListenAddress 10.6.0.2 ListenAddress 127.0.0.1 ListenAddress 192.168.4.3 LogLevel VERBOSE LoginGraceTime 1m PermitRootLogin yes Port 22 Protocol 2 PubkeyAuthentication yes Subsystem sftp /QOpenSys/QIBM/ProdData/SC1/OpenSSH/libexec/sftp-server -l INFO -f AUTH SyslogFacility AUTHPRIV X11Forwarding yes

System environment variables PROD

CLASSPATH '.:/QIBM/ProdData/HTTP/Public/jt400'
PASE_TZ 'CST6CDT'
EC2_CERT '/usr/local/bin/ec2/cert-S76UXYOKXG' > EC2_PRIVATE_KEY '/usr/local/bin/ec2/pk-S76UXYOKXG6Z' > EC2_HOME '/usr/local/bin/ec2'
PASE_USRGRP_LIMITED 'N'
QIBM_FTP_PORT_EPRT_LIMIT ''
QIBM_TELNET_CLIENT_SSL 'Y'
JAVA_HOME '/QOpenSys/QIBM/ProdData/JavaVM/jdk' > PYTHONHOME '/usr/python'
PYTHONPATH '/usr/python:/usr/python/lib-dynloa' > QIBM_SMTP_FWDSVR_LCL_MAI > 'YES'
SMTP_CLIENT 'IBM'
LPAR_ROLE '*PRIMARY'

System environment variables DEV

PASE_TZ 'CST6CDT'
SKIPWASPLUGIN '1'
EC2_CERT '/usr/local/bin/ec2/cert-S76UXYOKXG' > EC2_PRIVATE_KEY '/usr/local/bin/ec2/pk-S76UXYOKXG6Z' > EC2_HOME '/usr/local/bin/ec2'
PASE_USRGRP_LIMITED 'N'
QIBM_FTP_PORT_EPRT_LIMIT ''
QIBM_TELNET_CLIENT_SSL 'Y'
CLASSPATH '.:/QIBM/ProdData/HTTP/Public/jt400'
JAVA_HOME '/QOpenSys/QIBM/ProdData/JavaVM/jdk' > PYTHONHOME '/usr/python'
PYTHONPATH '/usr/python:/usr/python/lib-dynloa' >
QIBM_SMTP_FWDSVR_LCL_MAI > 'YES'
SMTP_CLIENT 'SFG'
QZLC_SERVERLIST '2'

.bashrc PROD

Set aliases

alias md='mkdir' alias rd='rmdir' alias copy='cp' alias path='echo ${PATH}' alias zip='gzip' alias count="ls -1 | wc -l | tr -d ' '" alias popdir='cd $OLDPWD' alias dir='ls -la && echo $(count) files' alias which='command -v' alias whoson='system wrkactjob | cut -c17-27 | sort -u | grep -Ev "[.*]|^[123456890]|User|^ " | column -c100' alias ls='ls -F --color=auto' alias nano='nano -w -c' alias ncdu='ncdu --color dark'

Set PATH vor user

PATH=/QOpenSys/pkgs/bin:$PATH:/usr/local/bin:$HOME/scripts:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/mysql/bin

Add some important environment variables (current system name (WHEREAMI), default local location (LPAR) and

Current IBM i job id (CURRJOB)

LPAR=$(system dspneta | grep -i "default local location" | cut -f2 -d: | tr -d ' ') export LPAR WHEREAMI=$(system dspneta | grep -i "Current system name" | cut -f2 -d: | tr -d ' ') export WHEREAMI CURRJOB=$(getjobid) export CURRJOB HISTCONTROL=ignoreboth HISTTIMEFORMAT="%Y-%m-%d %T "

If not a fancy terminal (like puTTY), don't colorize the prompt

if [[ "$TERM" == "dumb" || "$TERM" == "" ]] then PS1='$(uname -n) ($LPAR) $(pwd) >' else

Otherwise, have fun and colorize the prompt

export TERM=xterm

PS1='\e[1;33m$(uname -n) ($LPAR) $(pwd) >\e[m' alias ls='ls -F --color=auto' fi

Set some more important environment variables

JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit CLASSPATH=.:$HOME/as400jt/lib/jt400.zip:$HOME/as400jt/utilities:$HOME/java NLSPATH='/QIBM/ProdData/OS400/Shell/MRI2924/%N' EDITOR=nano TZ=CST6CDT PASE_TZ=CST6CDT

Tell the user about the bash shell

echo

echo You\'re running the bash shell.

echo Type help for information about bash built-in commands.

echo It is currently $(date).

echo

.bashrc DEV

alias md="mkdir" alias rd="rmdir" alias type="cat" alias copy="cp" alias path='echo ${PATH}' alias unzip="jar -xvf" alias zip="jar -cvfM" alias count="ls -1 | wc -l | tr -d ' '" alias popdir="cd $OLDPWD" alias dir="ls -la" alias grep="gnugrep" alias which='command -v' PATH=$PATH:/QOpenSys/pkgs/bin:/usr/local/bin:$HOME/scripts:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/mysql/bin

PS1='$(uname -n) $(pwd) >'

if [[ "$TERM" == "dumb" || "$TERM" == "" ]] then PS1='$(uname -n) $(pwd) >' else export TERM=xterm-256color PS1='\e[1;35m$(uname -n) $(pwd) >\e[m' fi export JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit CLASSPATH=.:$HOME/as400jt/lib/jt400.zip:$HOME/as400jt/utilities:$HOME/java NLSPATH='/QIBM/ProdData/OS400/Shell/MRI2924/%N' TZ=CST6CDT PASE_TZ=CST6CDT

[ "$(whoami)" == "root" ] && echo You are running as root.

QP0ZSPWP job environment variables PROD

PASE_TZ 'CST6CDT'
EC2_CERT '/usr/local/bin/ec2/cert-S76UXYOKXG' >
EC2_PRIVATE_KEY '/usr/local/bin/ec2/pk-S76UXYOKXG6Z' >
EC2_HOME '/usr/local/bin/ec2'
PASE_USRGRP_LIMITED 'N'
QIBM_FTP_PORT_EPRT_LIMIT ''
QIBM_TELNET_CLIENT_SSL 'Y'
JAVA_HOME '/QOpenSys/QIBM/ProdData/JavaVM/jdk' >
PYTHONHOME '/usr/python'
PYTHONPATH '/usr/python:/usr/python/lib-dynloa' >
QIBM_SMTP_FWDSVR_LCL_MAI > 'YES'
SMTP_CLIENT 'IBM'
LPAR_ROLE '*PRIMARY'
QIBM_USE_DESCRIPTOR_STDI > 'Y'
TRACEOPT 'UNLINK'
QIBM_DESCRIPTOR_STDERR 'CRLN=N'
QIBM_DESCRIPTOR_STDOUT 'CRLN=N'
QIBM_DESCRIPTOR_STDIN 'CRLN=Y'
LOGNAME 'QSECOFR'
SHLVL '1'
HOSTTYPE 'powerpc'
HOSTID '10.1.0.1'
HOSTNAME 'SFGAS1.SFGNETWORK.COM'
OSTYPE 'os400'
MACHTYPE 'powerpc-ibm-os400'
CLASSPATH '.:/QIBM/ProdData/HTTP/Public/jt400'
TERMINAL_TYPE 'PIPELINE'
HOME '/home/QSECOFR'
PATH '/usr/bin:.:/QOpenSys/usr/bin'
PASE_PATH '/QOpenSys/usr/bin:/usr/ccs/bin:/QO' >
PASE_LANG 'EN_US'
QIBM_PASE_CCSID '1208'
PASE_LOCPATH '/usr/lib/nls/loc'
PASE_NLSPATH '/usr/lib/nls/msg/%L/%N:/usr/lib/nl' >
PASE_LC__FASTMSG 'true'
QIBM_IFS_OPEN_MAX '66000'
LANG '/QSYS.LIB/EN_US.LOCALE '

QP0ZSPWP job environmentvariables DEV

PASE_TZ 'CST6CDT'
SKIPWASPLUGIN '1'
EC2_CERT '/usr/local/bin/ec2/cert-S76UXYOKXG' >
EC2_PRIVATE_KEY '/usr/local/bin/ec2/pk-S76UXYOKXG6Z' >
EC2_HOME '/usr/local/bin/ec2'
PASE_USRGRP_LIMITED 'N'
QIBM_FTP_PORT_EPRT_LIMIT ''
QIBM_TELNET_CLIENT_SSL 'Y'
JAVA_HOME '/QOpenSys/QIBM/ProdData/JavaVM/jdk' >
PYTHONHOME '/usr/python'
PYTHONPATH '/usr/python:/usr/python/lib-dynloa' >
QIBM_SMTP_FWDSVR_LCL_MAI > 'YES'
SMTP_CLIENT 'SFG'
QZLC_SERVERLIST '2'
LANG '/QSYS.LIB/EN_US.LOCALE ' > QIBM_USE_DESCRIPTOR_STDI > 'Y'
TRACEOPT 'UNLINK'
QIBM_DESCRIPTOR_STDERR 'CRLN=N'
QIBM_DESCRIPTOR_STDOUT 'CRLN=N'
QIBM_DESCRIPTOR_STDIN 'CRLN=Y'
LOGNAME 'QSECOFR'
SHLVL '1'
HOSTTYPE 'powerpc'
HOSTID '10.6.0.2'
HOSTNAME 'SFGAS3.DRGNETWORK.NET'
OSTYPE 'os400'
MACHTYPE 'powerpc-ibm-os400'
CLASSPATH '.:/QIBM/ProdData/HTTP/Public/jt400'
TERMINAL_TYPE 'PIPELINE'
HOME '/HOME/QSECOFR'
PATH '/usr/bin:.:/QOpenSys/usr/bin'
PASE_PATH '/QOpenSys/usr/bin:/usr/ccs/bin:/QO' > PASE_LANG 'EN_US'
QIBM_PASE_CCSID '1208'
PASE_LOCPATH '/usr/lib/nls/loc'
PASE_NLSPATH '/usr/lib/nls/msg/%L/%N:/usr/lib/nl' > PASE_LC__FASTMSG 'true'
QIBM_IFS_OPEN_MAX '66000'

chrjorgensen commented 1 year ago

@bigsdavid That surely was a lot of information - and I didn't mean you should report your settings here, but your findings... the differences discovered...

Anyway, I had a quick look, and the only obvious difference between PROD and DEV is the PATH:

PROD:

>>> /QOpenSys/pkgs/bin:$PATH <<<:/usr/local/bin:$HOME/scripts:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/mysql/bin

DEV:

>>> $PATH:/QOpenSys/pkgs/bin <<<:/usr/local/bin:$HOME/scripts:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/mysql/bin

Since the path is not the same, the two systems do not use the same commands... when the command is both in native PASE (AIX) and in IBM i OSS (yum). PROD will use the yum supplied first, while DEV will use the AIX supplied first - unless you have some symlinks in the path pointing to the other set of commands.

If this is not the issue, you have one more go here: Update to the latest version of Code for IBM i, open the Help panel and click on Report an issue and copy-paste the issue content here, so we can see the settings that the extension sees. Do this for both PROD and DEV.

bigsdavid commented 1 year ago

I modified the paths to be the same. No change. I am already at the latest version of Code for IBM i - what do I need to do?

chrjorgensen commented 1 year ago

open the Help panel and click on Report an issue

billede

copy-paste the issue content here, so we can see the settings that the extension sees.

bigsdavid commented 1 year ago

👉🏻 Issue text goes here.


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

Context Version
Code for IBM i version 1.9.4
Visual Studio Code version 1.79.2
Operating System win32_x64
Active extensions ``` Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.3.1 Dev Containers (remote-containers): 0.295.0 Emmet (emmet): 1.0.0 Error Lens (errorlens): 3.11.1 Git (git): 1.0.0 Git Base (git-base): 1.0.0 GitHub (github): 0.0.1 GitHub Authentication (github-authentication): 0.0.2 JSON Language Features (json-language-features): 1.0.0 Merge Conflict (merge-conflict): 1.0.0 Microsoft Account (microsoft-authentication): 0.0.1 Node Debug Auto-attach (debug-auto-launch): 1.0.0 TODO Highlight (vscode-todo-highlight): 1.0.5 TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0 WSL (remote-wsl): 0.78.9 WSL: Recommender (remote-wsl-recommender): 0.0.19 ```

Remote system |Setting|Value| |-|-| |IBM i OS|?| |Tech Refresh|?| |CCSID|?| |SQL|Enabled |Source dates|Disabled ### Enabled features |/QOpenSys/pkgs/bin|/usr/bin|/QSYS.lib/ILEDITOR.lib|/QSYS.LIB|/QIBM/ProdData/IBMiDebugService/bin| |-|-|-|-|-| |bash|attr|GETNEWLIBL.PGM|QZDFMDB2.PGM|startDebugService.sh| |chsh|iconv|||| |git|setccsid|||| |grep||||| |ls||||| |md5sum||||| |sort||||| |stat||||| |tar||||| |tn5250|||||
Shell env ```bash BUILDLIB=JGILIBR CURLIB=JGILIBR CURRJOB=Process identifier 149789 is 547775/QSECOFR/QP0ZSPWP HOME=/home/d_wilson LIBLS=ILEDITOR SFGBOLIBR D_WILSON QGPL GPLIB AALLIBR JGILIBR LOGIN=d_wilson LOGNAME=d_wilson LPAR=PROD1 MAIL=/var/spool/mail/d_wilson OLDPWD=/home/d_wilson PASE_USRGRP_LIMITED=N PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/usr/local/bin:/home/d_wilson/scripts:/QOpenSys/usr/local/bin:/QOpenSys/usr/local/mysql/bin PWD=/home/d_wilson SHELL=/QOpenSys/pkgs/bin/bash SHLVL=1 SSH_CLIENT=10.10.3.14 65068 22 SSH_CONNECTION=10.10.3.14 65068 10.1.0.1 22 TZ=CST6CDT USER=d_wilson USERNAME=d_wilson WHEREAMI=SFGPROD1 _=/QOpenSys/pkgs/bin/env ```
Variants ```json { "american": "#@$", "local": "#@$" } ```
Errors ```json [ { "command": "system \"CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')\"", "code": 255, "stderr": "CPF2111: Library ILEDITOR already exists.", "cwd": "/home/d_wilson" }, { "command": "system \"DLTOBJ OBJ(ILEDITOR/O_*) OBJTYPE(*FILE)\"", "code": 255, "stderr": "CPF2125: No objects deleted.", "cwd": "/home/d_wilson" }, { "command": "ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx", "code": 2, "stderr": "ls: cannot access '/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx': No such file or directory", "cwd": "/home/d_wilson" } ] ```
bigsdavid commented 1 year ago

@chrjorgensen - Was the info in the previous post what you were looking for?

chrjorgensen commented 1 year ago

@bigsdavid I'm sorry but I've run out of ideas of what could be the cause of your error... Most likely it's your system settings or user settings...

I would try the following: