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

VS Code for IBM i — Tips and Extras

July 14, 2021/9 Comments/in RPG, VS Code for i /by Liam Barry Allan

Visual Studio Code 1.35 iconVisual Studio Code is a widely used IDE in the non-IBM i world. Recently we released Code for IBM i, a freely available extension for VS Code that supports RPGLE and COBOL development for IBM i. You can read about the basics of Code for IBM i and about code coverage functionality in my previous posts.

Today I’m going to cover three additional tips for using Code for IBM i. Of course, for any of this to work, you need to install Code for IBM i.

Tip #1: Viewing SQL results inline

This is such a nifty one. Did you know you can run SQL statements and view the results inline?

  1. Create or open a member (or streamfile!) with the .sql extension
  2. Write an SQL statement: select * from sample.org
  3. Highlight the statement in the editor and press Control+R (or Command+R on Mac)
  4. The result should appear in a new tab in a pretty table

Code for IBM i: View SQL results inline

Note: The library list is not used when running SQL statements when using this method. You should make sure you are specifying the schemas when accessing SQL objects.

Tip #2: Comparing two sources

It is possible to compare two different sources with Code for IBM i—no matter if they are members, stream files, or a mix.

When you right-click on a source member or a stream file, you will see options to ‘Select for Comparison’ and ‘Compare with Selected’.

  1. Chose the first source you want to compare. Right-click on it and choose ‘Select for Comparison’
  2. Chose the source you want to compare it with. Right-click on it and choose ‘Compare with Selected’
  3. The diff will appear

Code for IBM i: Comparing Sources

Note: This works on any source/text documents. Whether it’s RPGLE, COBOL, PHP, JavaScript, etc… it works!

Tip #3: Search contents of source files

Are you looking for something in your source code but forget where it is? Why not search for it with Code for IBM i!

  1. Right-click on a source file you want to search in from the Member Browser
  2. A box will appear where you can enter your search term. Enter the term and press enter
  3. Results will appear when the search is done. The results appear in a new text document with hyperlinks to the member, which when control+clicked on, will open the member in a new tab

Code for IBM i: Search contents

Note: This also works for IFS directories.

These are just three ways that Code for IBM i helps you boost your productivity. See Visual Studio Code for IBM i: A Resource Guide for additional information.

As always, for training related to this or any other IBM i development technology, contact us.

Tags: COBOL, IBMi development, IBMiOSS, IDE, open source, RPG, SQL, 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-07-14 09:24:282023-01-30 17:36:35VS Code for IBM i — Tips and Extras
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

9 replies
  1. Duane Sanders
    Duane Sanders says:
    September 25, 2024 at 5:15 pm

    What is best way to copy a source member to another library using Code for i?

    Reply
  2. Wai Mok
    Wai Mok says:
    June 24, 2024 at 10:24 am

    I also tried below as mentioned by another reader:
    “Is it possible to compare source members from two different IBM i systems? Or do they have to be on the same IBM”
    For me, it only worked when it was done in one IBMi connection.
    When I tried to compare source members from two different IBMi connections,
    it did not work.
    Hope someone can post a way to do that.

    Reply
    • Alan Seiden
      Alan Seiden says:
      June 24, 2024 at 11:52 am

      Source member comparison only works within a single IBM i system.

      Reply
  3. Wai Mok
    Wai Mok says:
    June 24, 2024 at 10:21 am

    It seems it can’t handle the SQL with more than one SQL statements.
    I have two SQL statements in a source member, I only highlighted one of them and press CTRL+R, it highlighted both statements automatically with an error message
    SQL0199] Keyword SELECT not expected. Valid tokens: FOR USE SKIP WAIT WITH FETCH LIMIT ORDER UNION EXCEPT OFFSET., 42601, -199

    Reply
  4. Bill Howie
    Bill Howie says:
    June 3, 2024 at 10:08 am

    Hello,
    Is it possible to compare source members from two different IBM i systems? Or do they have to be on the same IBM i?

    Reply
    • Alan Seiden
      Alan Seiden says:
      June 24, 2024 at 11:26 am

      We will find out if there is a way to compare from two different IBM i systems.

      Reply
      • Alan Seiden
        Alan Seiden says:
        June 24, 2024 at 11:52 am

        Source member comparison only works within a single IBM i system.

        Reply
  5. Mario Salgado
    Mario Salgado says:
    February 17, 2024 at 12:06 pm

    Hello,
    I wonder to learn how to link Code for i and Client Acess to combine for example, sql scripts executions and 5250 terminal.
    Thanks for your support.

    Best Regards,

    Reply
    • Alan Seiden
      Alan Seiden says:
      June 24, 2024 at 11:53 am

      I don’t understand the question, but Code for i does support a 5250 terminal (tn5250).

      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: Solving “curl#6 – getaddrinfo() thread failed to start” Link to: Solving “curl#6 – getaddrinfo() thread failed to start” Solving “curl#6 – getaddrinfo() thread failed to start” Link to: Visual Studio Code, IBM i & PHP Link to: Visual Studio Code, IBM i & PHP Visual Studio Code, IBM i & PHP
Scroll to top Scroll to top Scroll to top