About VSCode Tips and Tricks
This the place for all the new VSCODE IBM i tips and tricks I learn along the way...
Module Content
MODULE 5
This the place for all the new VSCODE IBM i tips and tricks I learn along the way...
Further Adventures with VSCODE for IBM i
MEMBERS ONLY
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 VSCode IBM i Source Orbit, rules.mk is a makefile that contains build rules and dependencies for your IBM i source code. It's a crucial file that helps manage the compilation and build process of your IBM i programs. rules.mk is a generated file that's created by the IBM i Extension Pack when you create a new project or import an existing one. The file contains a set of rules and dependencies that define how to compile and build your IBM i source code - let's look at how to force it to be rebuilt
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?
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 ;)
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...
Common Errors
MEMBERS ONLY
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...