Code for IBM i | Part 8: Special Contribution 1
Impressions and Evaluation as a Code for IBM i User
By Yu Tamada, Development Office, Chubu System Company (CSC)
Code for IBM i is useful for program analysis because of its high visibility and the ability to use other extensions of Visual Studio Code (VSCode) by downloading the source code to a local environment. Comparing with the actual 5250 screen, we will describe in detail the advantages of using Code for IBM i and Visual Studio Code in our business.
1. High visibility
First, the amount of source code that can be displayed on a single screen is large. 5250 screen has a limit to the amount of source code that can be displayed on a single screen, as shown in Figure 1. On the other hand, with Code for IBM i, as shown in Figure 2, as much source code displayed on display can be checked at once. This alone is enough to improve work efficiency.
In addition, since the source code is classified by color according to its role, it is possible to prevent the possibility of inadvertently overlooking something.
As one of the major color categories in Code for IBM i, commented-out source code is displayed in green.
A typical example of source code management is when the source code is left commented out as history before modification.
When analyzing the above source code on the 5250 screen, as shown in Figure 3, missing a single asterisk results in a different interpretation than initially intended.
On the other hand, in Code for IBM i, color identification is provided as shown in Figure 4, which prevents oversight.
Code for IBM i also has a source code comparison function. However, since the method of expression is different from that of the 5250 screen, Code for IBM i may be easier to understand in some cases.
In the case of the 5250 screen, the source code before and after a change is compared line by line vertically (Fig. 5 and Fig. 6).
On the other hand, Code for IBM i allows side-by-side comparison of source code before and after changes (Figures 7-9).
Furthermore, while the 5250 screen displays only an excerpt of the changed source code, Code for IBM i can simultaneously check all source codes within a member.
2. Source Code Download and VSCode Extensions
Code for IBM i’s functionality allows source code to be downloaded to the local environment with a single click. By downloading the source code to the local environment in advance, even when you cannot connect to IBM i, such as on a business trip or working at home, you can proceed with your business wherever you are.
In addition, by opening the downloaded source code in VSCode, other VSCode extensions can be used. For example, here is one extension I found to be a good match in analyzing the RPGLE program.
Bookmarks
As the name suggests, this extension allows users to bookmark source code(Figure 10). The bookmarks are kept in a list and can be navigated to the bookmarked section with a single click (Figure 11).
Bookmarks can be attached in advance to subroutines that are called multiple times, saving the user the trouble of repeatedly searching through the source code. Of course, there are many other useful extensions besides “Bookmarks.”
Incorporating Code for IBM i and VSCode into program analysis may solve what we find inconvenient on the 5250 screen. Incorporating Code for IBM i into business operations for program analysis differs from program editing and has a lower threshold. Especially if the source code is downloaded to the local environment and used, it is likely risk-free. If you have yet to use Code for IBM i or VSCode, why not try it?CC
Author
Yu Tamada
Development Office
Chubu System Company (CSC)
https://www.cscweb.jp/
After graduating from university, Ms.Tamada worked in many industries, including mail order and manufacturing sales. While working, she learned programming as a hobby. In 2021, she joined Chubu System Company(CSC). Although she did not know RPG, she was able to take charge of practical operations after six months through CSC’s original RPG-IV education program. Currently, she is mainly in charge of web systematization of the legacy IBM i system.
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/