Visual Studio Code for IBM i - Setup Actions

Visual Studio Code 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.

For example, we use actions to :

  • Compile: Compile an RPG or COBOL program
  • Run: Run an RPG or COBOL program
  • Debug: Debug an RPG or COBOL program
  • Create: Create a new IBM i object, such as a program, file, or job
  • Delete: Delete an existing IBM i object
  • Copy: Copy an existing IBM i object
  • Rename: Rename an existing IBM i object
  • View: View the contents of an IBM i object, such as a file or program
  • Edit: Edit the contents of an IBM i object, such as a file or program
  • Submit: Submit a job to the IBM i job queue
  • Cancel: Cancel a job that is currently running on the IBM i system

There are various ways of accessing actions; from the command palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac), using keyboard shortcuts but I nearly always use Right-clicking on an object in the VSCode Explorer and selecting the desired action from the context menu

Automatic ACTION creation

When you open a connection and Code for IBM i recognizes that the actions have not been setup, it will ask you if you want to build it automatically like this:

vs code actions automatic

Of course, you want to click RUN SETUP and then select all to create them.

Don't worry if you miss this, or it times out, because you can always do it again manually like this:

Manual ACTION creation

From the command palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac), type "IBM i: Launch Actions Setup" into the selector:

IBM i: Launch Actions Setup

Now simply select the ones you want (which is probably all of them)

IBM i Launch Actions Setup SELECT ALL

And that's that.

Notice that one of those actions was for object type RPGLE?

This means we can use that action against our helloworld.rpgle program we just uploaded to test.

So, lets do that next!

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