Seiden Group
Modern Development & Open Source for IBM i
  • Link to LinkedIn
  • Link to Mail
  • Home
  • Seiden PHP+
    • Seiden PHP+
    • Install & Learn
    • SmartSupport
    • PHP Migrations & Upgrades
    • Success Stories
    • Free PHP Assessment
    • Documentation
    • What’s New (Changelog)
  • IBM i Services
    • Development
    • Training & Mentoring
    • Open Source Setup & Upgrades
    • SSL/TLS Install & Learn
    • Performance
  • Support
    • Open Source & PHP
    • VS Code for i
    • Developer Support
    • Support Success Stories
  • VS Code for i
    • Support
    • Training
    • Code for i Resource Guide
    • Getting Started Videos
    • Code for IBM i Fridays
  • Free Stuff
    • IBM i Strategy & Tips
    • PHP Upgrade Assessment
    • CNX Valence Assessment
    • VS Code for IBM i Resources
    • Code for IBM i Fridays
    • QCachegrind Download
    • PHP Toolkit for IBM i Resources
    • Qshell on i Library
  • Blog
  • About
    • About Our Team
    • About Alan Seiden
    • Speakers & Sessions
    • In the News
  • Contact
  • 201.447.2437
  • Search
  • Menu Menu

Seiden Group Blog

Visual Studio Code, RPG and IBM i

June 21, 2021/34 Comments/in RPG, VS Code for i /by Liam Barry Allan

Visual Studio Code 1.35 iconVisual Studio Code is an IDE and platform for developers to write backend, progressive web apps, frontend, and everything on the spectrum of development. I have created an extension for VS Code, called Code for IBM i, that allows users to work on and maintain their IBM i code. VS Code is the best IDE for extensibility, which is why I wanted to take on such a task.

While Visual Studio Code was built to work with all languages, in my opinion it didn’t have much support for RPGLE or COBOL on IBM i until this point. We’re streamlining RPGLE development in terms of tools and speed for our users. We want to make developing RPGLE and COBOL easy for everyone in the most efficient way possible.

Since 2017, I have been building extensions and standalone IDEs, like IBMiCmd, ILEditor 1, and ILEditor 2. I firmly believe that Code for IBM i is the best iteration of my work, and it makes me so happy that I can share it with everyone.

As of 2021, Code for IBM i has been available for free on the Visual Studio Code Marketplace. It is also open source and relies heavily on user feedback and input (as well as the occasional PR.) Code for IBM i has a ton of functionality… too much for a single article. This post will run you through the setup of VS Code and Code for IBM i.

Installation

Visual Studio Code is available for most operating systems, including Windows and Mac. The very first thing is to download it from the VS Code website. Following that, you can install the extension from the Marketplace.

  1. Open the extensions view
  2. Search ‘ibmi’ and find Code for IBM i
  3. Hit install

Connecting to your IBM i

Now it’s time to connect to your IBM i server. Note that your IBM i will need its SSH daemon started. Usually a simple STRTCPSVR *SSHD  will get that started for you, but you can check out Getting Started with SSH on IBM i if you need more assistance.

After Code for IBM i is installed, you will see a new icon appear on the left. That is the Code for IBM i extension! You can click that, select ‘Connect to an IBM i’, fill out the information, and then hit connect. Code for IBM i will store that connection info for later so you don’t have to type all that in again.

You’ll see a nice info message appear when you are connected successfully.

Editing members

You can find members by using the Object Browser. Start by creating a new filter, which will show a new window.

Create New filter

You can provide a filter name, library, types, source file filters and more. You can see in the image, I am specifying a library and using ‘*srcpf’ as the type, which will then only show source files.

new filter dialog

Clicking save and then opening the filter will show the source files in the chosen library and expanding them will show the members inside. You can click on a source member to open it to edit/view.

Compiling code

Of course, the second most important thing other than editing is compiling your source code. In this case, we have an SQLRPGLE program called DEPTS_WEB. Code for IBM i adds a new shortcut to compile the source code you’re currently working with. To show what compile options you have, you can use the Control + E shortcut (or Command + E on Mac). This will show a dropdown with the available Actions (another topic worth its own blog post). Each Action has a different command that it will run.

In our case, we want to run CRTSQLRPGI to compile our program and there is a default action for that.

After the compile runs, Code for IBM i will display the errors from the compile in line with the source code (as you would expect). It looks like, in this case, the pre-compiler couldn’t find a file definition. That usually indicates that there is a library list issue / the library with that table is missing from the library list.

Editing the library list

The connection to Code for IBM i has its own library list. That means any time a command is sent to the server, it uses the library list from the settings rather than the library list from the user. It’s very easy to change this library list. In the Code for IBM i extension there is a User Library List view. In that view you can:

  • Change your current library
  • Edit your user library list for any future commands
  • Re-order your user library list

For our DEPTS_WEB program to compile, we need to add the missing library with the DEPARTMENT table. That just so happens to be in the SAMPLE library/schema. You can click the add button in the User Library List view to add a library.

Now that SAMPLE has been added, the next time we try to compile our program there should be no issues. Code for IBM i will tell you that the command ran successfully with an informational message.

Closing

These are just the very basics of Code for IBM i. There is so much to it. For example, some of the other functionality in Code for IBM i includes:

  • Editing and compiling sources from the IFS (RPG, PHP, Python, JavaScript, etc.)
  • Searching through the contents of source files and IFS directories
  • Browsing and maintaining objects in libraries
  • Running SQL statements and viewing results visually
  • Content assist for free-format RPGLE and fixed-format RPGLE

There are also extensions to Code for IBM i which add:

  • Source date support
  • Integrated unit testing for RPGLE
  • Code Coverage for IBM i

Check out the:

  • GitHub repository
  • documentation

For additional information on Code for i, see Visual Studio Code for IBM i: A Resource Guide.

For training on this or any other IBM i development technology—including APIs or open source on IBM i—contact us.

Tags: IBMi development, IBMiOSS, IDE, RPG, Visual Studio Code, VS Code
Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Reddit
  • Share by Mail
https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Liam Barry Allan https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Liam Barry Allan2021-06-21 13:14:032023-10-20 12:46:51Visual Studio Code, RPG and IBM i
Liam Barry Allan

About Liam Barry Allan

Liam Allan, IBM Champion and consultant with Seiden Group, helps IBM i development teams transform their applications and bridge the gap between traditional and modern ...Read More

34 replies
  1. Andrea
    Andrea says:
    February 27, 2025 at 5:31 am

    Hello the extension seems to have a problem with the character “§” in the member name , it shows a � instead of § and when i try to open it says “Error: The editor could not be opened because the file was not found”.
    Other than that great work.

    Reply
  2. Reinaldo
    Reinaldo says:
    December 3, 2024 at 4:40 am

    Hello, I am new to the world of IBM i and still a beginner. I see that this community is amazing and very supportive. May I ask how to integrate my VSCode with Remote-SSH and Mocha TN5250? I have already set up VSCode correctly, and I am able to create, edit, compile, and call programs properly, but when the output is displayed, it only shows that the operation was successful, and no display output appears.

    Reply
  3. Peter
    Peter says:
    February 22, 2024 at 2:54 pm

    Hi, I am able to access source files in the libraries on *SYSBAS but having some issues on adding libraries/source files located on the iASP. I have added the ASP name on the “Source ASP” settings entry, but it still not working. Any help is appreciated. Thanks.

    Reply
  4. Anuradha
    Anuradha says:
    February 3, 2024 at 1:14 pm

    How can I compile ILE C++ program using this extension. I read the doc and it says hit Ctrl+E. I did it and nothing happened. Can someone please help me?

    Thanks
    Anuradha

    Reply
  5. Anuradha
    Anuradha says:
    May 21, 2023 at 11:03 am

    IBM native code editor limits to 80 characters per line. But in the VS code, you don’t have that. How this extension handles it?

    Thanks

    Reply
    • Alan Seiden
      Alan Seiden says:
      May 21, 2023 at 12:32 pm

      The number of characters per line is determined by the record length of the source file, whether it is 80 or another length. Prompt on CRTSRCPF to define a different length. Then, VS Code will warn if you edit longer than the record length, and truncate if you save longer than the record length.

      Reply
      • Anuradha Amarasinghe
        Anuradha Amarasinghe says:
        May 22, 2023 at 1:49 am

        Thanks Alan. Its a great tool

        Reply
      • Jayanthi Arya
        Jayanthi Arya says:
        August 8, 2023 at 3:39 pm

        The record length for my source file creation is set to 92 but when I run my script it looks the line is getting truncated at 80 chars.. how do I fix this?

        RUNSQLSTM SRCFILE(JKUMAR/QSQLSRC) SRCMBR(xxxxxxx) COMMIT(*NONE) NAMING(*SQL)

        Reply
        • Charles
          Charles says:
          December 4, 2024 at 11:30 am

          IBM i reserves the first 12 bytes of a source physical file for the line number of source statement and the date that it was changed. Therefore, for a record length of 92, there are only 80 characters available for the source line itself.

          Therefore, you would need to create your source file with a longer record length. I recommend at least 112, since that would also be compatible for newer RPG source members with ILE functionality.

          Reply
  6. Nisha
    Nisha says:
    April 13, 2023 at 2:44 pm

    After creating the object filter, I am not able to see the members. The filter tab is not expanding. I noticed that I dont have authority for command strtcpsvr. I am not sure if that is the reason behind this ? If anyone is aware of this issue, please help me. I am trying all possible ways to bring the code from green screen to VS code. Any help is appreciated.

    Reply
    • Alan Seiden
      Alan Seiden says:
      April 14, 2023 at 7:13 pm

      We spoke offline and determined that the issue was most likely related to how SSHD was started. Covered in this issue: https://github.com/halcyon-tech/vscode-ibmi/issues/1222

      Reply
  7. Matt Shea
    Matt Shea says:
    February 10, 2022 at 3:54 pm

    Attempting to open source code in VS Code, nothing happens. Click, double-click, the code does not open in the editor.
    Thoughts?
    Thanks,
    Matt

    Reply
    • Alan Seiden
      Alan Seiden says:
      February 10, 2022 at 5:03 pm

      Hi, Matt, looks like you posted an issue at https://github.com/halcyon-tech/vscode-ibmi/issues/532 and Liam made a suggestion there.

      Reply
  8. Gayan
    Gayan says:
    February 9, 2022 at 4:19 am

    When try to -> connect to an IBM i
    it gives me below error. can anyone give me an answer for this

    ”Cannot activate the ‘Code for IBM i’ extension because it depends on an unknown ‘barrettotte.ibmi-languages’ extension.”

    Reply
    • Alan Seiden
      Alan Seiden says:
      February 9, 2022 at 9:04 am

      Gayan, I see that Liam replied to your question in a Github issue you created: https://github.com/halcyon-tech/vscode-ibmi/issues/519

      Reply
  9. Ramon Sandoval
    Ramon Sandoval says:
    January 8, 2022 at 2:58 pm

    Liam/Alan this is great! I’ve been watching Liam’s YouTube video on using VSC + Github and it is amazing.

    Alan, I met you when I was working at American First Finance, you were working with Jeff C.

    I’d love to continue learning from you and your updates to make use of newer technologies that interact with the iseries. To me using VSC + Github is way better, faster learning curve and easier than MDCMS and RDi.

    Ramon S.

    Reply
    • Alan Seiden
      Alan Seiden says:
      January 22, 2022 at 9:23 am

      Thanks, Ramon!

      Reply
  10. david knittle
    david knittle says:
    December 23, 2021 at 6:44 am

    i was using this and it was fine but now i dont have a member browser any more.

    Reply
    • Alan Seiden
      Alan Seiden says:
      December 23, 2021 at 11:42 am

      David, the member browser changed to the object browser due to user requests. We will update this blog post. See documentation here: https://halcyon-tech.github.io/vscode-ibmi/#/?id=browseedit-source-members And look at “Browse/Edit source members.” Let us know how it goes for you.

      Reply
  11. Frank
    Frank says:
    September 7, 2021 at 7:58 am

    Each time I connect to our IBM i and open a src-pf (ccsid=37) I sooner or later see all my members as undefined.undefined. These members can not be opened. CPFA0A9: OJBECT NOT FOUND. I can’t get rid of this problem.

    Reply
    • Alan Seiden
      Alan Seiden says:
      September 7, 2021 at 11:51 am

      Hi, Frank, thanks for writing. Please post your question on the Code for i issues page: https://github.com/halcyon-tech/vscode-ibmi/issues

      Reply
  12. Michael Wisolmerski
    Michael Wisolmerski says:
    August 16, 2021 at 11:44 am

    Hi –

    I don’t know what happened to my last post, but I asked if CCSID 64K would be supported. Nearly all of out many source files are CCSID 65535.

    Thanks!
    Mike W.

    Reply
    • Alan Seiden
      Alan Seiden says:
      August 16, 2021 at 12:01 pm

      Mike, CCSID 65535 means you have to manually say what kind of encoding to use. You could specify a CCSID in the Code for i plugin settings. Could you try that? Maybe 37, unless you need to use another one?

      Reply
      • Michael Wisolmerski
        Michael Wisolmerski says:
        August 16, 2021 at 12:20 pm

        Alan –

        When I try to open a source member, I get:
        CPD0085: Range of parameter DBFCCSID does not include 65535. CPF0006: Errors occurred in command.

        Reply
      • Michael Wisolmerski
        Michael Wisolmerski says:
        August 16, 2021 at 1:12 pm

        Alan –
        I just tried to open a CCSID 37 source file and I got the same error – I don’t see a setting for CCSID – could you let me know where that is?
        Thanks!

        Reply
        • Alan Seiden
          Alan Seiden says:
          September 7, 2021 at 10:14 pm

          Hi, Michael, the settings link is at the bottom of the editor. (Settings: hostname)

          Reply
  13. Michael Wisolmerski
    Michael Wisolmerski says:
    August 13, 2021 at 2:24 pm

    Hi Liam –

    Our source files are all CCSID 64K – I think this is due to I18N requirements. Can Code for IBM i. be made to work CCSID 64K?

    Thanks!

    Reply
    • Alan Seiden
      Alan Seiden says:
      August 13, 2021 at 2:41 pm

      Hi, Michael, I checked with Liam on this. What’s the encoding of your source file content? e.g. UTF8, 37, 273? Or a mix?

      Reply
      • Michael Wisolmerski
        Michael Wisolmerski says:
        August 13, 2021 at 3:11 pm

        Hi Alan –

        They are all CCSID 64K – 65535 and there are MANY – changing them is not possible – and we have a couple at CCSID 37

        And nice to talk to you again – you and I talked several years ago about PHP – I was working for Mayors Jewelers.

        Reply
        • Alan Seiden
          Alan Seiden says:
          August 16, 2021 at 10:38 pm

          Hi, Michael, look at configuring it here:

          Additional settings

          Source file CCSID
          The CCSID of source files on your system. You should only change this setting from *FILE if you have a source file that is 65535 – otherwise use *FILE. Note that this config is used to fetch all members.

          Reply
  14. Dylan Hague
    Dylan Hague says:
    July 6, 2021 at 3:33 pm

    Been looking for something like this for quite some time! Will be watching this repo closely, cheers!

    Reply
  15. Jacob Enders
    Jacob Enders says:
    July 6, 2021 at 12:21 pm

    Love it. Best thing since sliced bread.

    Reply
  16. Richard Nemerovsky
    Richard Nemerovsky says:
    June 25, 2021 at 3:35 pm

    Nice! We’ve been exploring possibly going the GitHub route with all of our RPGLE, etc. code and were planning on going the RDi route along with EGit. Any thoughts on how approach like that would work in relation to this? Thanks.

    Reply
    • Liam Barry Allan
      Liam Barry Allan says:
      June 25, 2021 at 4:18 pm

      Hey Richard.

      There is also another extension that adds a Git client within VS Code to work with sources on the remote server: https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.git-client-ibmi

      This could likely help with some of that progress. It’s also another good topic that should get another post I think.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

SUBSCRIBE
Open Thinking
Monthly IBM i Strategy & Tips
  • This field is for validation purposes and should be left unchanged.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
LET'S GET IT DONE!

Recent Posts

  • Do You Need IBM i Observability?
  • PHP 8.6 is Coming Soon to IBM i
  • Safer npm installation is on the way for Node.js (and all JavaScript)
  • Access Modern Security for IBM i and Connected Web Environments
  • IBM i: A Natural Platform for Agentic AI
  • PHP on IBM i in 2026: The Modernization Engine
  • Your “AS/400” Is a Modern IBM i Platform
  • MCP + AI for IBM i Teams (with a MongoDB example)
  • GnuPG PHP Extension for IBM i: Now Included with Seiden Support
  • Getting Started with Code for IBM i: A Lunch & Learn Video

SEIDEN GROUP: Modern Development & Open Source for IBM i

Home   |   Seiden PHP+   |   IBM i Services  |   Support   |   VS Code for i   |   Free Stuff   |   Blog  |   Privacy Policy  |   Contact         201.447.2437

© 2026 Seiden Group, LLC
  • Link to LinkedIn
  • Link to Mail
Link to: Issues with Port 10080 Link to: Issues with Port 10080 Issues with Port 10080 Link to: Visual Studio Code, RPG and Code Coverage Link to: Visual Studio Code, RPG and Code Coverage Visual Studio Code, RPG and Code Coverage
Scroll to top Scroll to top Scroll to top