Skip to content

CLLE Language tools

Command Language is the scripting language for the IBM i operating system. This extension assists in CLP or CLLE program development, providing:

  • Content assist for CL commands
  • Outline view
  • Go to or peek definition and references

It also provides support for running a CL statement with Ctrl+r.

Installation

The CL Language tools extension can be installed from the Marketplace and is also part of the IBM i Development Pack .

Or it can be installed from the Extension view inside Visual Code.

Install CLLE

Content Assist

Suppose you want to create a data area with the CRTDTAARA command. Enter CRTDTAARA follwed by a space, then press Ctrl+Space to invoke Content Assist to produce a pick list like this:

Example step 2

Press Enter or Tab to accept the highlighted All parameters from the pick list and a skeleton command is created.

Example step 3

UseCtrl+space to get a pick list of special values or available variables (just one in this example):

Example step 5

Content Assist Snippets

Prompting of most CL commands requires a connection to a server. However, there are a number of commands that are provided as snippets, which don’t require a connection. DCL, for example, is provided as a snippet.

To declare a variable, enter just d and get a list of commands that begin with d:

Command assist

Since the DCL command is highlighted, hit enter and get a pick list of available parameters:

Command assist all keywords

The VAR parameter value is selected, so enter the variable name, then tab to the TYPE parameter value:

Command assist parameter

If all the valid valued for TYPE are know, just enter a valid value, for example *CHAR. Or delete the highlighted value and key Ctrl+Space to get a pick list of the valid values:

Command assist parameter

If all the valid valued for TYPE are know, just enter a valid value, for example *CHAR. Or delete the highlighted value and key Ctrl+Space to get a pick list of the valid values:

Command assist parameter

CL Code Runner

A CL command may be executed by highlighting the command and pressing Ctrl+R.

Code Runner Example

The two lines of the CRTMSGF command are highlighted:

Run CL example 1

Press Ctrl+R and success is reported:

Run CL example 1

Click Open output if you want more detail or if the command fails:

Run CL example 1

Not all CL commands may be executed.