How to use an IDE for IBM-i Development

About How to use an IDE for IBM-i Development

Let's review essential modules, plugins and extensions to make our IDE experience perfect for IBM-i Developers. Personally, I recommend using IBM BOB, which is based on VSCode or Microsoft VSCode itself (Cursor is another excellent contender). In this module we will play with different configurations and explore all the dark corners of this IBM-i programming ecosystem.

Module Content

Let's review essential modules, plugins and extensions to make our IDE experience perfect for IBM-i Developers. Personally, I recommend using IBM BOB, which is based on VSCode or Microsoft VSCode itself (Cursor is another excellent contender). In this module we will play with different configurations and explore all the dark corners of this IBM-i programming ecosystem.

Using IDE - Hints and Tips

Free For All

We've got Visual Studio Code for IBM i downloaded, installed so let's agree on some basic rules and standards. These are really more RULES, if you break the rules you are going to IBM i PRISON because your source code just won't compile!

Let's look at the important files that define our VSCODE for IBM i Workspace

In VSCode for IBM i, "actions" refer to a set of pre-defined tasks or operations that can be performed on IBM i objects, such as programs, files, and jobs.

Good Question - and one I don't necessarily know the best answer for ;) Why? because it changes all the time. So this page will be my *current* config and liable to change based on comments and suggestions ;)

Let's have a look at how we can store the IBM i Source Code locally on our PC and also compile it from there!

It's easier than ever with Code for IBM i. Let's take a few minutes to look at using Visual Studio Code (VS Code) to create and manage modules, bound RPG programs, and ILE (Integrated Language Environment) programs on IBM i. Developing on the IBM i System is easier than ever with Visual Studio Code for IBM i - let's do a compile of a sample RPG ILE Program shall we?

Flipping between local development and host development (on your IBM i System) - so just drag the IFS Explorer to the right side of the screen

On IBM i systems, copybooks and includes are related concepts used in programming, particularly in RPG (Report Program Generator), CL and COBOL. This lesson will explain how to define the INCLUDES folder and how to name and style the source code for CL and RPG copybooks.

IBM-i Control Language Copybooks and Includes

This video demonstrates how to use copybooks in RPGLE and CLLE programs within Visual Studio Code for IBM i development. It builds on previous tutorials about /COPY and /INCLUDE directives, showing how to apply them in a real-world scenario using modern tooling. Come with me to walk through using a real-world example in Visual Studio Code for IBM i

imagine this scenario "I have a bunch of source code (SQL, DDS, RPGLE, SQLRPGLE, SRVPGM's. etc) in a PC Folder and want to try out IBMi BOB or VS-Code. So while I am sorting and organizing the folders to fit into a neat GIT repository - how can I auto-generate each folders Rules.MK file?" This is easy to answer!

We've got Visual Studio Code for IBM i downloaded, installed and we are ready to rock and roll? Right? Right?

A service program is a type of program on the IBM i System that is used to provide a set of reusable functions or procedures that can be used by multiple applications. Service programs are a key component of the Integrated Language Environment (ILE) programming model. A service program is a collection of procedures, functions, or subroutines that are compiled into a single object. This object can then be used by multiple applications, which can call the procedures or functions in the service program to perform specific tasks.

An IBM i binding directory is a type of directory in the IBM i operating system (formerly known as OS/400) that contains binding information for objects in a library. Binding information specifies how objects are linked or connected to each other, and a binding directory provides a central location for storing this information. In the IBM i environment, objects such as programs, service programs, and modules can be bound together to form a larger, more complex application. The binding process involves specifying the linkage between these objects, including the order in which they are executed, the data that is shared between them, and any other dependencies they may have. A binding directory is used to store the binding information for a set of related objects in a single location. This makes it easier to manage and maintain the binding information, as well as to ensure that all of the objects are properly linked together.

Workshop - Using an IDE

Free For All

What is the IDE called commonly known as 'VS Code'?

How to Connect to PUB400 IBM i Server Using Visual Studio Code, we’re going to unlock the power of Visual Studio Code (VS-Code)—one of the most popular code editors in the world—to seamlessly connect with PUB400, a free, public IBM i server perfect for learning and experimentation. Whether you’re an IBM i veteran looking to modernize your workflow or a newcomer eager to explore the platform’s capabilities, this course will guide you step-by-step through the process of setting up a robust development environment. You’ll learn how to establish a secure connection, configure essential extensions, and start coding on IBM i with the tools and efficiency of VS-Code. By the end, you’ll be ready to tackle IBM i projects with confidence, blending the platform’s legendary reliability with the flexibility of modern development practices. Let’s dive in and get connected—your IBM i adventure starts here!

We are not stuck with the old QDDSSRC, QRPGSRC, QRPGLESRC, QCLSRC, QCLLESRC paradigm... storing our code locally, synched with a git repository opens up new avenues of design.

Creating modules, bound RPG, and ILE programs with Visual Studio Code (VS Code) for IBM i offers several benefits. Time for a video review and see it all in action?

Time for a video review and see it all in action? In this video, we’re diving into the power of VS Code to supercharge your IBM i development, with a spotlight on creating and using service programs. Let's take a ten year old service program, modernize it and talk through how it works. Service programs are easy! Whether you’re coding RPG, managing modules, or just tired of green-screen editors, we’ve got the tips to streamline your workflow. Let’s plug in, power up, and make some modular magic, so stick around!

Time for a video review and see it all in action? Welcome, IBM i coders, to Visual Studio Code for IBM i and Binding Directories! Today, we’re unlocking the secrets of binding directories using the sleek power of VS Code. Say goodbye to clunky old-school setups - today we’re streamlining your IBM i projects, linking modules like pros, and making your RPG life a breeze. Ready to bind, build, and boost your skills? Let’s jump in!

Let's make our RPG code beautiful again with 'VSCode for IBM i' magical plugin called "RPGLE Linting" -- Lint is the computer science term for a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs.

Come with me, while I load up an old RPG code snippet and run it through the VSCODE FREE FORMAT RPG code uplift function

To use a 5250 green screen terminal in Visual Studio Code (VS Code) for IBM i, follow these steps: Install Code for IBM i: First, make sure you have Code for IBM i installed in your VS Code. If not, you can find installation instructions here. Open the Terminal: In VS Code, click the Terminals button at the bottom of your screen. A quick-pick menu will appear at the top of your screen. Choose the PASE (SSH) terminal option. Since you’ve already connected to your system using Code for IBM i, the PASE terminal will log you in automatically. 5250 Terminal Requirements: To launch a 5250 emulator, you need to have tn5250 installed. This is a terminal client for IBM i that emulates 5250 terminals. You can install tn5250 via yum. Customize Your Terminal: Code for IBM i provides additional settings to configure your terminal. One common setting is the CCSID mapping configuration, which lets you set the encoding for the terminal. By having both your code and 5250 terminals within the same IDE, you’ll find it more efficient for RPG and open-source development.

Setting the VSCODE IBM i PATH to open source packages on IBM i is beneficial for several reasons: Ease of Access: By setting the PATH to /QOpenSys/pkgs/bin, you can easily access open source tools and packages without needing to specify their full paths each time. This is similar to how library lists work on IBM i Efficiency: It streamlines your workflow by allowing you to run commands and scripts directly from the terminal or within VS Code, improving productivity and reducing the chance of errors Integration: It enhances the integration of open source tools with your development environment, making it easier to use languages and tools like Python, Node.js, and others directly on IBM i Consistency: Ensuring that the PATH is set correctly helps maintain consistency across different development environments and team members, making collaboration smoother

In Visual Studio Code for IBM i creating vanilla programs is easy. But what do we do when we want to modify or tailor the create command for individual programs, commands or modules?

Yes - you heard it right. We can define a variable in our Rules.MK File and reference that anywhere in our project. Let's look at an example...

You’re in good company! Every IBM i programmer hits this question the moment they switch to VS Code. The good news is: yes, you can see the failed compile listing in VS Code, but it depends on which extension and workflow you’re using. Below is the clean, no‑nonsense breakdown so you can get straight to the listing.

Common Errors

Free For All

This error message drove me crazy! The solution is to make sure your PATH is setup correctly for the .bash_profile and .bashrc and not just the .profile Confused? Read on...

This error message drove me crazy! The solution is to find the special character that is defined in the code your are trying to compile and replace it with a friendly normal character. Confused? Read on...

The missing Compile option (typically accessed via Ctrl+E, right-click > Run Action, or the Command Palette) in the Code for IBM i extension for Visual Studio Code when working with RPGLE programs usually stems from configuration, connection, or context issues. I’ll outline the specific reasons why this happens for RPGLE files and provide actionable steps to restore the compile option, focusing on the most common issues based on community reports and the extension’s documentation.

Subscribers Q&A

Free For All

Question: "Why should I store IBM-i Source in IFS rather than good old Source Files?"

Question: "How can I change the look, style and feel of my VS-Code environment?"

Question: "When looking at all source members in a source file, with PDM I can use two keystrokes to see the date and then sort all source members by date (F14 then F15). How can I do this with VS-Code?"

Question: "If you we need to find where a specific field is used in all source members we see all source members, place 25 next to the first source member, press F13 repeats option 25 on all source members and then we can interactively go through each source showing us where the field is located or we can print a list that we can review. Extremely helpful when needing to organize a database change to a file. How can I do this with VS-Code?"

Question: "SEU has the ability to bring source in from other source files/libraries and see them on split screen. How can I do this with VS-Code?"

Ready to learn?
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>