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

Read-only Mode in VS Code for IBM i

January 8, 2024/6 Comments/in VS Code for i /by Alan Seiden

Code for IBM iIf you are using the Code for i extension and would like to “browse” or view certain source members without the risk of modifying them, use the “Read only” or “Protected” capability.

Possible reasons to enable “Protected” or read-only mode may include:

  • It is a production or QA environment
  • You only want to do research on code, not change it
  • Providing an environment to someone who is learning

Protected mode can be enabled at a connection level or the filter level. Either way, the setting must be done on each individual Code for i installation that you want protected.

Connection level

To protect your source code for an entire connection, as with a production environment, here are the steps:

  • Right-click on your IBM i connection name and choose “Connection Settings”
  • Select the “Source Code” tab
  • Check the box for “Read only mode”
  • Click “Save settings”

The “Source Code” tab with “Read only mode” is shown below.

Source code tab of Code for i connection settings with read-only selected

Source code tab of Code for i connection settings with read-only selected

Now, you will see a “Lock” icon next to the connection name, as shown below.

Read-only connection lock

Read-only connection lock

Filter level

To protect your source code for only a specific filter (a source code type, name etc.), here are the steps:

  • From the Object Browser, right-click the filter you want to protect and choose “Maintain Filter”
  • Select the “Source Code” tab
  • Check the “Protected” checkbox
  • Click Save settings

Screen shots of the steps are shown below.

Maintain filter

Maintain filter

 

Protected Option on Source Code Tab

Protected Option on Source Code Tab

Now, you will see a “Lock” icon next to your filter name, as shown below.

Protected filter with Lock

Protected filter with Lock

 

VS Code for i Resources

Get additional tips and documentation on Visual Studio Code for i from our resource guide.

For the best way to get your entire team up and productive with VS Code for i, talk to us about Code for i support and  training for RPG and COBOL developers.

(Links edited on 11/18/2025)

Tags: CL, IBMi, RPG
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 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2024-01-08 11:44:202025-11-18 13:50:23Read-only Mode in VS Code for IBM i
Alan Seiden

About Alan Seiden

Alan works to preserve your investment in IBM enterprise systems by designing and implementing modernization strategies that leverage your existing business logic.

With a passion ...Read More

6 replies
  1. Javier
    Javier says:
    July 15, 2024 at 12:43 pm

    I have all those options deactivated but VSCode keeps opening sources just for read-only, why could it be?

    Reply
    • Alan Seiden
      Alan Seiden says:
      July 15, 2024 at 1:00 pm

      Javier, check the the Code for IBM i output tab for the CHKOBJ command when the member is opened.

      Reply
  2. Glenn Gundermann
    Glenn Gundermann says:
    January 9, 2024 at 12:15 pm

    Without creating a new connection or new filter, is there a way to toggle an open source member to read-only? Rdi does this and I used this feature all the time. If VS Code can’t, this would be a great feature to add.

    Reply
    • Christian Jorgensen
      Christian Jorgensen says:
      January 12, 2024 at 7:03 pm

      You can use the commands “Open File…” (Alt-Ctrl-O) and “Open File (readonly)…” (Alt-Ctrl-P), which will open a dialog, where you can enter the member path. The readonly command will open the member – well, as readonly…

      You can’t change the mode of an opened file from “modifying” to “readonly” and vice versa. You have to close the member and open it again in the desired mode.

      Re-opening a member is easy now, since we have implemented “Recent files” in the dialogs – so the most recently used file will be shown in the top of the list in the open file dialog. You can configure how many recent files you want in the list – press Ctrl-, and select the Code for IBM i extension. The config value is called “Recently Opened Files Limit” and the default value is 10.

      We have also implemented search function in the commands, so you can type the beginning of the library / file / member and ‘*’ and the server will show the matching libraries / files / members.

      HTH.

      Best regards,
      Christian

      Reply
      • Christian Jorgensen
        Christian Jorgensen says:
        January 15, 2024 at 3:01 am

        Sorry, my previous post were incorrect – the commands are called “Go To file” and the hotkeys are

        Ctrl-Alt-P => Go To file… ( for update)
        Ctrl-Alt-O => Go To file (Read Only)…

        Best regards,
        Christian

        Reply
        • Alan Seiden
          Alan Seiden says:
          January 15, 2024 at 10:14 am

          Thanks, Christian!

          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: URL Rewriting with Apache Web Server Link to: URL Rewriting with Apache Web Server URL Rewriting with Apache Web Server Link to: Our Favorite ibm_db2 Settings for PHP Link to: Our Favorite ibm_db2 Settings for PHP Our Favorite ibm_db2 Settings for PHP
Scroll to top Scroll to top Scroll to top