Home > AS/400 Tips > iSeries administrator tips > ILE CL can boost productivity and performance
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

ILE CL can boost productivity and performance


Ron Turull
04.28.2004
Rating: -4.30- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


In case you hadn't noticed, the CL language is an official ILE language. There are many obvious advantages to this. There are also some that are not so obvious. And some seeming advantages are not advantages at all!

It's easy to convert CL programs to bound CL procedures
ILE CL supports bound procedure calls via the CALLPRC command. CL programs can be turned into CL procedures and statically bound into other programs. Converting an existing CL program to a CL procedure is as easy as changing its source member type from "CLP" to "CLLE" and compiling it into a module using the CRTCLMOD command. The module is then ready to be bound into any program.


Ron Turull

Because ILE CL can access all the system APIs, including those available only to ILE languages, CL has become quite robust. Dynamic screen manager (DSM) can be used for the most complex screen manipulation and user I/O. The alternative file systems (e.g., hierarchical file system) APIs or a user-written service program can be used to implement database support. At this point in its evolution, the CL language is comparable to BASIC. But before you go building any huge complex applications with CL, remember there are other languages that most likely will do the job better, faster, and with less coding.

Performance tip: Like all ILE programs, a CL program compiled under ILE can run in any activation group you specify. This gives you the opportunity to isolate a CL program in its own activation group. Coding a RETURN command in a CL program will leave a named activation group activated (so it can be reused on the next call to the program). This increases performance because the activation group does not have to be recreated.

More Information

Watch out for RCLRSC
The Reclaim Resources (RCLRSC) command is most often found in CL programs. When converting an existing CL program to ILE, you must pay particular attention to any RCLRSC commands. (See "The trouble with Reclaim Resources" for more details.)

Performance issues
You could squeeze out a 5% performance increase by simply converting your OPM CL programs to ILE CL. In the chart below, notice the seven-second drop in run time gained by converting a simple OPM CL program to ILE CL (133 seconds to 126). The program calls another CL program 500,000 times. Since much of CL consists of calling other programs -- either directly with the CALL statement or indirectly via commands (i.e., calling command processing programs) -- this is fairly representative of real-world CL programs.

If your CL programs do a lot of calling to other user-written programs (written in CL or another ILE-enabled language), consider converting all of them to ILE procedures/modules that can be bound into a single ILE program. Bound procedure calls are about 80% faster than external program calls.

Relative performance figures for
500,000 consecutive calls (in seconds)

External call to
OPM CL program
Bound call to
ILE CL procedure
Called from OPM CL 133 Not applicable
(not supported)
Called from ILE CL 126 27

-----------------------------------
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years' experience programming for and managing AS/400-iSeries systems.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries CL programming
A power-handling CL program for multiple IBM i servers
Taking advantage of CL advancements, starting with V5R3
Checking in on your IBM i authorization lists
Running PHP open source applications: NOBODY needs authority
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
CL program for daily backups
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date

Systems Management
Can you trust all those trigger programs?
Are your backups complete?
Controlling remote command processing
Watch your profiles
Avoid locking issues
Send message to users at a remote site
Security journal receiver management
Top 10 backup commands
Create an iSeries Access image and update it with the latest Service Pack
Tracking critical file access in real time

Performance
How to increase performance by grouping users into separate storage pools -- Part III
How to increase performance by grouping users into separate storage pools -- Part II
How to increase performance by grouping users into separate storage pools -- Part I
Managing system performance using iSeries Navigator
The iSeries doctors are in

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts