codefori / vscode-ibmi Goto Github PK
View Code? Open in Web Editor NEW๐ IBM i development extension for VS Code
Home Page: https://codefori.github.io/docs/#/
License: MIT License
๐ IBM i development extension for VS Code
Home Page: https://codefori.github.io/docs/#/
License: MIT License
Let's say I want to quickly nav to a directory and download a files or do something with is. A manual cd option would be nice.
This is more of a nice-to-have.
I receive the above mentioned error message, when I attempt to connect to our IBM i server. There is no further information about the error. So what can I do know? I already checked the server side and I noticed, that there is a SSH connection to my PC:
Successfully connected as clearly indicated by the job log:
Last but not least, I receive error "Object already exists. Object is /home/raddatz." when I execute command "mkdir '/home/raddatz'", whereas "IBMi.js" checks for "File exists". Could that be part of the problem?
Hi everyone ,
What do you think if we add a graphical debug through the ACS?
If you already installed IBM Toolbox for Java on your server, both the jt400.jar and the tes.jar files are in the same directory on the server: /QIBM/ProdData/HTTP/Public/jt400/lib/
After copying the jar files to your client, add them to your client CLASSPATH environment variable.
To start Debug Manager from a command prompt on your client, run the following command: java utilities.DebugMgr
reference:
https://www.itjungle.com/2020/06/08/guru-graphical-debugging-through-acs/
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzamq/rzamqrunning.htm
This could be a really cool one. Providing the ability to do a different two souces.
Maybe a right-click option on members and streamfiles to select which files to compare?
Not sure if this is a VS code thing or not, but messages pile up.
Is it me, or is the package.json
file for extensions super ugly? I hate having to define my command in three places.
For example, code-for-ibmi.connect
is defined in 3 places... seems kinda crazy.
Being able to use Ctrl/Command + FORWARD_SLASH would be nice when editing RPG, CL, etc. I can easily do this one.
Might involve creating a command which looks at the activeEditor, etc.
I find myself single-clicking files and opening them randomly when I really didn't want the file or source member to open.
If others like single-click open functionality, create a setting called Single-Click-Open.
If enabled, function as does already.
If disabled, enforce double click opens.
Note: If I were to click a HUUGE file this could be disruptive.
I have two systems that I connect to regularly. If I try to open a second connection while one is active, I get an error telling me there is already an active connection. But I can find no obvious way to disconnect from one and connect to the other.
I'm probably just missing something but ...
Also make sure that DOT files. Ex: .bashrc, .profiles, etc show up.
Hi,
Have you considered putting the library list setting on connection level instead of as a global setting (code-for-ibmi.libraryList)?
I have multiple servers I want to connect to, but they all have different library lists for compilation and not all libraries exist on all servers. This forces me to change the library list setting when I switch servers, since trying to set the library list with a nonexistent library returns an exception (CPF2110).
Somethings to consider:
*EVENTF *NOGEN
so we can generate an error listing, which would then populate the diagnostics panel? This is more real-time than having to compile every time you want the diagnostics to update. We can do this without a language server.Am open to ideas and discussion.
We're looking for some more compile defaults. Right now we only have RPGLE.
We're looking for defaults for the following extensions:
See this link for an example, and also where to add more defaults: https://github.com/halcyon-tech/code-for-ibmi/blob/master/package.json#L126
Maybe it already works this way, but I haven't tested yet.
This way if I have a make file or something else PASE/QSH I want to run I can trigger it here.
An alternative option is I can use my QSHEXEC command to run a QSH/PASE script.
As I wrote in the object, I think that the lists should be different:
Is it correct or did I misunderstood how to use the extension?
Thanks in advance for your great job
Firstly, thanks so much for your work on this extension, I am not native to as400 programming but this extension makes it a breeze to review code already written.
I am having difficulties opening files from some locations, they simply do not open. I took the liberty to run this extension locally and console.log the ssh commands to get an understanding of what exactly is failing and why:
Here is what I can provide, hopefully it helps illustrate my problem.
When double clicking on a file I receive these logs in the extension:
Specifically I see the command to be
system "CPYTOSTMF FROMMBR('/QSYS.lib/WLIB.lib/QRPGLESRC.file/CFCRTGCDS.mbr') TOSTMF('/tmp/vscodetemp-oiZyUiJVC3') STMFOPT(*REPLACE) STMFCCSID(1208)"
and the result to be:
stderr:'CPFA0A9: Object not found. Object is /QSYS.lib/WLIB.lib/QRPGLESRC.file/CFCRTGCDS.mbr.\nCPFA097: Object not copied. Object is /QSYS.lib/WLIB.lib/QRPGLESRC.file/CFCRTGCDS.mbr.'
Compared to a different directory, which is successful as follows:
Any thoughts on how I might be able to debug this further?
Since we now have the comparison features in the extension, I am wondering if we should add some new functionality that
Mostly looking for ideas on this. I think it sounds like a good idea, but is it really?
Needs to include the following items:
console.log
s I addedIt would be nice to quickly download a copy of an source member form a source file for offline editing.
Not high priority, but would be cool.
Download:
Right click on member, select download, prompt where to save to locally.
Upload:
Right click source member and select upload, prompt for local file to upload. Will replace contents of selected source member.
Just to be able to see all the standard IFS attributes.
Could even trigger one of the CL commands to show the output of DSPATR or whatever Cl command shows file attributes.
Renaming errors when you only change the extension, which should be possible.
When pressing F1 and choosing "IBMi: Connect" I get the following error:
Command 'IBM i: Connect' resulted in an error
(command 'code-for-ibmi.connect' not found)
code-for-ibmi 0.0.6, VS Code 1.53.2 on linux
I was thinking about casually exploring adding an additional browser for browsing spool files similar to the member, IFS, and object browsers this week after work when I found the time.
I would gather the tree items using QSYS2.OUTPUT_QUEUE_ENTRIES.
Starting functionality would just be viewing and deleting spool files.
Possible functionality:
CPYSPLF FILE(TEST1) TOFILE(*TOSTMF) SPLNBR(*LAST) TOSTMF('/MyFolder/test_1.pdf') WSCST(*PDF) STMFOPT(*REPLACE)
(or similar) in the background
Let me know if there are any suggestions or obvious pitfalls with this idea
We need documentation in either HTML format or markdown (preferred).
Docs should live in the docs
folder in the root.
The following items need documenting:
I am able to set up and see my source file and library. However, when I click on some members I don't see these sources.
nothing happens.
I am able to open source on QSYSINC/H.
I am not sure if IASP is an issue? I see all the source code files expanded, it's just that it does open when double clicked.
After action completes, if not using a compile command the completion message still says:
"Compiled file/member successfully" ot on fail "file/member did not compile."
Couple thoughts for easy change:
"file/member action completed successfully" or on fail "file/member action did not complete successfully."
More complex thought 1:
Possibly put a completion or error message in the settings.json for each action so they can have their own message.
More complex thought 2:
Possibly surface the CPF response message(s) from command completion.
My ideal answer would be option 2 which might surface the CPF message, but the easy change of message verbiage is good for now also.
Things to ponder.
Is there a way to only refresh the selected source file in case a developer has several source files in their list ?
Ex: Click on source file and then click the refresh icon at the top.
If this change is made title it: "Refresh Selected Source File" instead of "Refresh Member List"
Another option would be to just re-add the Right-Click option at the source file level to just refresh the selected source file.
Either way the idea is to NOT have to refresh all members across all my source files in the list all the time.
Not high pty, but global action commands not working.
Something similar to what this Postgres extension provides?
https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres
Is it worth building this?
I can successfully connect using the "Connect to an IBM i" button. Therefore this issue is not urgent.
However, when I restart VSCODE, I thought I should be able to to use the "Connect to previous IBM i" to avoid some typing. While it does seem to remember my previous connections, nothing seems to happen, as shown below.
Pressing enter on the highlighted connection, or left clicking, or right clicking result in this:
I press "Enter" and nothing happens.
I use VSCODE mainly for playing with node.js and do not consider myself an expert. So this may be a user error on my part. Or maybe something in my setup. This is my settings.json: (Hmmm. I don't see why the font suddenly changes after "code-for-ibmi.connections". Perhaps there is some hex garbage in there.)
`{
"telemetry.enableTelemetry": false,
"editor.renderControlCharacters": false,
"editor.fontFamily": "Cascadia Code, Inconsolata, Lucida Sans",
"editor.fontLigatures": false,
"editor.renderWhitespace": "none",
"editor.cursorStyle": "block",
"editor.minimap.enabled": false,
"terminal.integrated.shell.windows": "C:\WINDOWS\System32\cmd.exe",
"window.zoomLevel": 0,
"update.mode": "start",
"compile-hero.disable-compile-files-on-did-save-code": false,
"compile-hero.generate-minified-html": true,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"code-for-ibmi.connections": [
{
"host": "pub400.com",
"port": 2222,
"username": "lennons"
},
{
"host": "ipublic.online",
"port": 2222,
"username": "lennons"
}
],
"code-for-ibmi.homeDirectory": "/home/lennons1",
"code-for-ibmi.libraryList": "QSYS2,QSYSINC, LENNONS1",
"code-for-ibmi.logCompileOutput": true,
"code-for-ibmi.sourceFileList": [
"QSYSINC/H",
"lennons1/QTEMP",
"lennons1/QCLSRC",
"lennons1/qrpglesrc"
],
"code-for-ibmi.temporaryLibrary": "lennons2",
"code-for-ibmi.compileCommands": [
{
"fileSystem": "member",
"extensions": [
"rpgle",
"rpg"
],
"name": "CRTBNDRPG",
"command": "CRTBNDRPG PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE)"
},
{
"fileSystem": "member",
"extensions": [
"CLLE",
"CL"
],
"name": "CRTBNDCL",
"command": "CRTBNDCL PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE)"
},
{
"fileSystem": "member",
"extensions": [
"CLP"
],
"name": "CRTCLPGM",
"command": "CRTCLPGM PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*SOURCE) OUTPUT(*PRINT)"
}
]
}`
I am seeing a lot of potentials for other people to write extensions that connect to an IBM i to do some specific, so we should write stuff so people can use our connect and some of our APIs!
Howdy all!
After seeing some of these messages on Midrange:
It makes me think that Code for IBM i needs a welcome page after the extension is installed, or callable by command. Gitlens has something similar.
What do you think?
HI,
Could you let me configure the port for connecting to my IBM I or Could you let me specify a certificate?
Because my server on port 22 accept connections only with certificate (because it is open on internet), while on port 2222 it let me connect with user and password.
Many thanks.
Until now, I copy my source into my home directory (of my ibm i user) and there I make a git.init, so I can use git.
Is there a possibility to use git with your extension?
Many thanks.
I cannot figure out a way to refresh the library/member view with the browser pulled up. Is there a way to do this?
It would be nice if the Problems window loading issues with your source when you saved (this is because we'd go back to the server to get us information).
In order to do this, we need to run compile commands with OPTION(*EVENTF *NOGEN)
.
*EVENTF
generates the information/error listing*NOGEN
stops the source from actually compilingWe'd need to add code to add these to the commands that support them. I believe the list of commands that support both these options are:
CRTBNDRPG
CRTRPGMOD
CRTSQLRPGI
CRTBNDCBL
CRTCBLMOD
CRTBNDC
CRTCMOD
CRTCLMOD
- it is not available on CRTBNDCL
If anyone else knows other options that would speed up this command execution, please me know.
The developers would also have to specify which action they want to use to run the command. Since we won't know from just saving, it usually helps to have a directive in the source so we can use it and know which action to run without prompting the user. For example:
//compile:CRTSQLRPGI
/* compile:CRTCLMOD */
* compile:CRTBNDCBL
If one is not specified, then it will not run.
When I was compiling today it kept giving me errors with my code. I had made the corrections but was still getting the errors. Finally, I realized that I hadn't saved the changes first and it was trying to compile the last saved changes (which still contained the error).
Can we get a prompt to save if we haven't done that first or have VS Code automatically save first as part of the CRTL + E to compile?
Not high pty, but once we figure out re-ordering menu items, let's put Run Action at the top and possibly a separator and then the member actions.
I think it would be neat if we could add a webview with simple input boxes and lists that would let the user manage the current connection settings (instead.getConfig()
).
This might make it nicer than having to keep editing the JSON file.
The user would click 'Save', pass the new values back to the app and the app would call set
to update the config (or maybe we need a setMany
too?)
This way if developer wants to remove a source file from the workspace on left they can.
I'm on 0.2.3. The issue occurs after I add a new source file, then try to expand it.
If I exit VSCODE and restart it, the problem is fixed and I can expand the source file.
Note also that while trying to document this issue I have managed to add QPRGLESRC several times. This occurred because I added it, but it didn't show up. I then added it twice more without it showing up. Finally, when I added QDDSSRC, the three QRPGLESRCs showed up. Timing issue maybe...
I've been on various earlier releases and I understand that things are improving rapidly. Thus my settings.json file is somewhat messy which might be contributing to this problem. There are a lot of lines in low intensity which I believe means they are not referenced and one of these is ""code-for-ibmi.temporaryLibrary" which was an earlier setting.. I see that now that library lists are connection specific (a good change!) there I now have several "tempLibrary": "ILEDITOR" lines.
Here's my settings.json file:
{
"telemetry.enableTelemetry": false,
"editor.renderControlCharacters": false,
"editor.fontFamily": "Cascadia Code, Inconsolata, Lucida Sans",
"editor.fontLigatures": false,
"editor.renderWhitespace": "none",
"editor.cursorStyle": "block",
"editor.minimap.enabled": false,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"window.zoomLevel": 0,
"update.mode": "start",
"compile-hero.disable-compile-files-on-did-save-code": false,
"compile-hero.generate-minified-html": true,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"code-for-ibmi.connections": [
{
"host": "pub400.com",
"port": 2222,
"username": "lennons"
},
{
"host": "ipublic.online",
"port": 2222,
"username": "lennons"
}
],
"code-for-ibmi.homeDirectory": "/home/lennons/qrpglesrc",
"code-for-ibmi.libraryList": "QSYS2,QSYSINC, LENNONS1",
"code-for-ibmi.logCompileOutput": true,
"code-for-ibmi.sourceFileList": [
"QSYSINC/H",
"lennons1/QTEMP",
"lennons1/QCLSRC",
"lennons1/qrpglesrc"
],
"code-for-ibmi.temporaryLibrary": "lennons2",
"code-for-ibmi.compileCommands": [
{
"fileSystem": "member",
"extensions": [
"rpgle",
"rpg"
],
"name": "CRTBNDRPG",
"command": "CRTBNDRPG PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE)"
},
{
"fileSystem": "member",
"extensions": [
"CLLE",
"CL"
],
"name": "CRTBNDCL",
"command": "CRTBNDCL PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE)"
},
{
"fileSystem": "member",
"extensions": [
"CLP"
],
"name": "CRTCLPGM",
"command": "CRTCLPGM PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*SOURCE) OUTPUT(*PRINT)"
}
],
"workbench.activityBar.iconClickBehavior": "focus",
"workbench.list.openMode": "doubleClick",
"code-for-ibmi.connectionSettings": [
{
"host": "pub400.com",
"sourceFileList": [
"QSYSINC/H",
"LENNONS1/TEMP"
],
"libraryList": [
"QSYS2",
"QSYSINC"
],
"homeDirectory": "/home/lennons",
"tempLibrary": "ILEDITOR",
"buildLibrary": "QTEMP"
},
{
"host": "ipublic.online",
"sourceFileList": [
"QSYSINC/QRPGLESRC",
"LENNONS1/TEMP",
"LENNONS1/QCLSRC",
"LENNONS1/QRPGLESRC",
"LENNONS1/QRPGLESRC",
"LENNONS1/QRPGLESRC",
"LENNONS1/QDDSSRC"
],
"libraryList": [
"QSYS2",
"QSYSINC"
],
"homeDirectory": "/home/lennons",
"tempLibrary": "ILEDITOR",
"buildLibrary": "QTEMP"
}
],
"code-for-ibmi.actions": [
{
"type": "member",
"extensions": [
"RPGLE",
"RPG"
],
"name": "Create Bound RPG Program (CRTBNDRPG)",
"command": "CRTBNDRPG PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)"
},
{
"type": "member",
"extensions": [
"SQLRPGLE"
],
"name": "Create SQL ILE RPG Program (CRTSQLRPGI)",
"command": "?CRTSQLRPGI OBJ(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) CLOSQLCSR(*ENDMOD) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)"
},
{
"type": "member",
"extensions": [
"RPGLE",
"RPG"
],
"name": "Create RPG Module (CRTRPGMOD)",
"command": "?CRTRPGMOD MODULE(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTRLS(*CURRENT)"
},
{
"type": "member",
"extensions": [
"CMD"
],
"name": "Create Command (CRTCMD)",
"command": "?CRTCMD CMD(&OPENLIB/&OPNMBR) PGM(&OPNLIB/&OPNMBRC) SRCFILE(&OPENLIB/&OPENSPF) ALLOW(*ALL) CURLIB(*NOCHG) PRDLIB(*NOCHG)"
},
{
"type": "member",
"extensions": [
"CMD"
],
"name": "Create Command (Allow Return Variables - CRTCMD)",
"command": "?CRTCMD CMD(&OPENLIB/&OPNMBR) PGM(&OPNLIB/&OPNMBRC) SRCFILE(&OPENLIB/&OPENSPF) ALLOW(ALLOW(*BPGM *IPGM *BMOD *IMOD) ) CURLIB(*NOCHG) PRDLIB(*NOCHG)"
},
{
"type": "member",
"extensions": [
"pf",
"lf"
],
"name": "Delete File (DLTF)",
"command": "?DLTF FILE(&OPENLIB/&OPENMBR)"
},
{
"type": "member",
"extensions": [
"dspf"
],
"name": "Create Display File (CRTDSPF)",
"command": "?CRTDSPF FILE(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) SRCMBR(&OPENMBR) RSTDSP(*NO) REPLACE(*YES)"
},
{
"type": "member",
"extensions": [
"pf"
],
"name": "Create Physical File (CRTPF)",
"command": "?CRTPF FILE(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) SRCMBR(&OPENMBR) SIZE(*NOMAX) MAXMBRS(1)"
},
{
"type": "member",
"extensions": [
"lf"
],
"name": "Create :Logical File (CRTLF)",
"command": "?CRTLF FILE(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF)"
},
{
"type": "member",
"extensions": [
"CLP",
"CLLE"
],
"name": "Create CL Program (CRTCLP)",
"command": "?CRTCLPGM PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OUTPUT(*PRINT) REPLACE(*YES)"
},
{
"type": "member",
"extensions": [
"CLP",
"CLLE"
],
"name": "Create Bound CL Program (CRTBNDCL)",
"command": "?CRTBNDCL PGM(&OPENLIB/&OPENMBR) SRCFILE(&OPENLIB/&OPENSPF) OPTION(*EVENTF) DBGVIEW(*SOURCE)"
},
{
"type": "member",
"extensions": [
"GLOBAL"
],
"name": "Create Program (CRTPGM)",
"command": "?CRTPGM PGM(&OPENLIB/&OPENMBR) MODULE(*PGM) ENTMOD(*FIRST) BNDSRVPGM(*NONE) BNDDIR(*NONE) ACTGRP(*ENTMOD) TGTRLS(*CURRENT)"
},
{
"type": "object",
"extensions": [
"GLOBAL"
],
"name": "Delete object",
"command": "?DLTOBJ OBJ(&LIBRARY/&NAME) OBJTYPE(*&TYPE)"
},
{
"type": "object",
"extensions": [
"pgm"
],
"name": "Call program",
"command": "?CALL &LIBRARY/&NAME"
}
]
}
I installed it , I'm connecting but I have error loading member message , How could I debug or give you more info?
Thanks
When I listed my root dir /, my files and dirs were not Alphabetically sorted.
It would be nice to quickly download a copy of an IFS file or regular source member for offline editing.
Not high priority, but would be cool
Download selected IFS file:
Right click on IFS file, select download, prompt where to save to locally.
Upload selected IFS file:
Right click IFS file and select upload, prompt for local file to upload. Will replace contents of selected IFS file.
Upload File by Selecting Upload option on dir itself
Right click dir name, select upload, prompt for file name, upload the IFS file into the selected directory. Prompt for replace if IFS file already exists.
This was Liams
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.