Code for IBM i | Part 5: Useful extensions other than Code for IBM i
By Makoto Ogawa, T&Trust K.K.
We have so far explained how to use Code for IBM i, but there are other valuable extensions for program development on IBM i. Let us introduce them all at once here.
CL
CL is an extended function that provides the following functions when editing CLP and CLLE source code.
・Code completion function when entering CL commands
・Outlines
After installing this extension, the message shown in Figure 49 will appear in the lower right corner of the screen when you first connect to IBM i.
If you click Yes here, the necessary programs and other components for the ILEDITOR library will be installed. Note that the code completion function for CL commands cannot be used unless this component is installed. Also, the above screen will disappear after a while, so if this happens or you click No by mistake, reconnect, and the screen will reappear.
Now, let’s look at the code completion function. When creating a CL program, SEU allows you to use the prompt function when entering commands. This code completion function provides the same functionality.
First, after typing the command you want to enter, press the space key, and you will see a list of typical parameter candidates and an option to insert all parameters (Figure 50).
Clicking on All parameters to insert all parameters will insert all keywords (Exhibit 51).
For some keywords, pressing Ctrl + spacebar within the brackets will display possible input candidates. Using this function, coding CL programs may be done in VSCode with almost no problems (Figure 52).
In addition, outlines, which are not available in SEU, are also supported. An outline is a function that displays a list of files, variables, subroutines, etc., in a CL program. Furthermore, when an item is clicked in the outline view, the cursor moves to the corresponding position in the source code, which is more convenient for programs with many steps (Figure 53).
RPGLE
This extended function provides the following functions when editing RPGLE source code.
・Code completion function at the time of input
・Outline
・Support for input in fixed position entry format (RPGLE)
The code completion function is a useful feature when coding free-form RPG. It displays candidates when entering functions or RPG instructions.
For example, function candidates are displayed if you input up to %f after an if instruction (Figure 54).
If you select %found as the input, it will be inserted as shown in Figure 55, including the contents to be input.
If you input “for,” candidates are displayed in Figure 56.
If you select “for” at the top, the code including endfor is inserted as shown in Figure 57.
In addition, the outline function is provided as well as the CL extension function (Figure 58).
Author
Makoto Ogawa
President and CTO,CIO
T&Trust K.K.
https://www.tat.co.jp/
Since 1989, he has been responsible for system development and programming training on AS/400. He learned how IFS works on OS/400 V3R1 through Linux, and since then, he has been deeply interested in open source in IBM i. His theory is that developer needs knowledge of Linux to understand IBM i. He has also written many articles for i Magazine.
Contents of Code for IBM i: The whole picture
Part1 About Code for IBM i
Part2 Basic Usage
Part3 Maintenance of source code
Part4 Can it replace SEU/PDM?
Part5 Useful extensions other than Code for IBM i I
Part6 Useful extensions other than Code for IBM i II
Part7 Creation and execution of translation programs using DeepL API
Part8 Special Contribution 1
Part9 Special Contribution 2
[i Magazine・IS magazine] https://www.imagazine.co.jp/