Or it can be installed from the Extension view inside Visual Code.
Command Language is the scripting language for the IBM i operating system. This extension assists in CLP or CLLE program development, providing:
It also provides support for running a CL statement with Ctrl+r
.
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.
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:
Press Enter or Tab to accept the highlighted All parameters from the pick list and a skeleton command is created.
UseCtrl+space
to get a pick list of special values or available variables (just one in this example):
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
:
Since the DCL
command is highlighted, hit enter and get a pick list of available parameters:
The VAR
parameter value is selected, so enter the variable name, then tab to the TYPE
parameter value:
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:
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:
A CL command may be executed by highlighting the command and pressing Ctrl+R.
The two lines of the CRTMSGF
command are highlighted:
Press Ctrl+R and success is reported:
Click Open output if you want more detail or if the command fails:
Not all CL commands may be executed.