Last Updated on 18 November 2021 by Roberto De Pedrini
IBM i installation and connection (with video tutorial… by now only in Italian)
Visual Studio Code is a cross-platform development IDE. It is available for Windows, Mac or Linux systems. Here are some steps, in order to start using Visual Studio Code, with the IBM i ecosystem.
- Download from the official site: https://code.visualstudio.com/#alt-downloads and install it.
- Open the new development IDE, go to the Extension Tab (Ctrl + Shift + x) and perform the search and installation of Code for IBM i.
We also have a video tutorial (by now only in Italian) made by Roberto De Pedrini:
- But first let’s connect to our IBM i, and verify that the * SSHD service is active through the command STRTCPSVR * SSHD . Only then, through our IDE, we can click on the extension Code for IBM i and enter the connection parameters of our IBM server. In case of a successful connection, we would find ourselves in a similar situation, with the possibility to change our library list, consult our source members both under IFS and not, view and consult the IFS. If the component is installed db2util , available directly from the open source package management environment, it is also possible to consult the structure of our databases.
The first time you log into the MEMBER BROWSER tab we will only have QSYSINC / H available in the list. Let’s move with the mouse in the drop-down menu, on the button that will allow us to add other source files to that list of the type LIB / FILE.
Edit source files (with video tutorial)
Now, we should be able to open our sources directly from VS Code, modify them, and compile them. With this new development editor, you have the possibility, and should not be underestimated, to download load the sources directly on from the PC as a text file, perform the comparison etc.
To run build commands, you need to navigate to the source member and run the command RUN ACTION (CTRL + E). This will show a drop-down menu with the available actions. Each action has a different command that will be executed.
After compiling, it will be possible directly from Visual Studio Code, to analyze the spool file and its output, similar to RDI operation. To do this, move to the bottom left, click on INFO, and in the output screen choose IBM I Output.
Content assist and RPGLE code indentation
The functions of Rpgle Column Assist, Rpgle Content Assist and Rpgle Indentation but you need to enable them from the Code For IBM i plugin settings.
Also for this part of the connection, editing, and compilation of the RPG sources we have a video tutorial in Italian, also by Roberto De Pedrini:
Personally, I still prefer to use IBM’s official product, RDI, because it offers a far superior user experience, but especially for programmers who aren’t born with * totally free language, it’s much more driven. Nonetheless, a dutiful thanks to all the people who are committed to developing and improving a plugin at almost no cost! (Let’s remember). Surely, this is to be preferred over the traditional SEU. 😁
I had the pleasure of dealing with some components of this fabulous community, for a problem in opening the sources under a member file having CCSSID 65535 . In order to solve, it was necessary from the settings of the newly created connection, to disable the extension db2util and set a CCSSID for the source files with a parameter between 280 and 37. Only in this way was I able to edit members present under a PF with CCSSID 65535.
Conclusions shared also with Roberto De Pedrini:
Link Github: https://github.com/halcyon-tech/vscode-ibmi
Youtube link guide with Liam Allan: https://www.youtube.com/playlist?list=PLNl31cqBafCp-ml8WqPeriHWLD1bkg7KL