fhg
Volume 9, Number 36 -- November 18, 2009

File Caching in RSE

Published: November 18, 2009

by Jon Paris

Two of my favorite features of RSE are the Outline View and the Program Verifier. One thing they both have in common is the fact that they use cached descriptions of any required externally described files. These cached descriptions are retrieved once and then stored in the RSE workspace for fast retrieval when required to refresh the Outline View or when Verifying the code in the editor.

Because both these features rely on those cached descriptions, they also have something else in common; when a file's external description changes, neither of them will automatically catch on to that fact. Therefore they can be using out of date file information and this can be a common cause of confusion. "What do you mean there's no such field? I just added it to the file and recompiled it!"

There are a number of ways to deal with the "out of date" file cache situation. Depending on whether you know that a specific file's description has changed or merely suspect that to be the cause of some behavior (such as verifier errors of the type described above), you may choose one or the other of the following options:

1. If you know the file(s) that have changed, you can easily update the cached information. Locate the file in the Remote Systems tree view, right-click on the file, and then select "Cache File Descriptions." Now when you refresh your outline view and/or re-verify your source, you should see that you have the updated file and field descriptions. Don't forget that if this is a new file, you may need to refresh the tree view before you can see it.

2. If there are a number of files where the new file descriptions don't seem to be showing up or if you're not sure which file the fields should be in, an alternative approach is to select the Verify (Prompt) option, select "Cache" from the list on the left, and check the "Refresh Cache" check box. When you subsequently press "OK" to invoke the verifier, it will go out and re-cache all the file descriptions for files used by that source member.

There are also options to completely clear your cache of all file descriptions, but that's a pretty drastic thing to do and I can't think of an occasion when that would be an advisable way to solve this particular problem. But in a few minutes we will discuss one set of circumstances where you might need to do this if you are using WDSC.

Note that this issue of a "stale cache" will not be cured by closing and restarting WDSC/RDi, or recreating the file (whether within RSE or any other way). One might think that the "Refresh" button in the Outline view would do it, but sadly it doesn't. For those of you interested in such trivia, the reason is that under the covers, the Outline view is populated by the cross reference data provided by the verifier! If only IBM would add a "Refresh All" button to force it to perform the underlying verification with the cache refresh option. It might seem logical that RSE would recognize that the DDS source for a file has been changed in the editor and that therefore it should refresh its cached version of that file, but sadly it is just not that intelligent. It gets its file descriptions exclusively from the file object itself, never from the source, and it only goes back to update its file description information when forced to using one of the methods mentioned above.

I mentioned earlier that there was one situation where you would need to clear the entire cache. This relates to a bug in WDSC that causes the verifier (or a refresh of the outline view) to take longer and longer and longer. What causes the slow down? Apparently the algorithm used for searching the cache is very inefficient when the cache lists are very large. Sadly, although this bug has been known for a while, IBM chose not to fix it in WDSC, so you will have to move to RDi to get rid of it.

In order to work around the problem in WDSC, the cache has to be cleared completely. There are actually two "clear cache" options in the preferences. The one you need appears on the Remote Systems→iSeries→Cache preference page. For those using RDi , it's Remote Systems→IBM i→Cache, but since this particular problem is fixed in RDi, you shouldn't need to use it for this purpose. The button you need is marked "Clear Cache." You do NOT want the button on another page that says "Clear Cached Files". If you use that one, you'll wipe out of the all temporary copies of the source members open in the editor, which could really ruin your day if you haven't saved them!

P.S. For the adventurous among you, it is possible to edit the cached file descriptions used by WDSC, but it is not a task for the faint of heart. This is something I occasionally did when truly desperate, perhaps because I needed to verify or outline a program and had no internet connection available to pick up the current file descriptions. In RDi 7.5 all the layouts seem to have changed so I guess I'll have to forgo that dubious pleasure.


Jon Paris is one of the world's most knowledgeable experts on programming on the System i platform. Paris cut his teeth on the System/38 way back when, and in 1987 he joined IBM's Toronto software lab to work on the COBOL compilers for the System/38 and System/36. He also worked on the creation of the COBOL/400 compilers for the original AS/400s back in 1988, and was one of the key developers behind RPG IV and the CODE/400 development tool. In 1998, he left IBM to start his own education and training firm, a job he does to this day with his wife, Susan Gantner--also an expert in System i programming. Paris and Gantner, along with Paul Tuohy and Skip Marchesani, are co-founders of System i Developer, which hosts the new RPG & DB2 Summitconference. Send your questions or comments for Jon to Ted Holt via the IT Jungle Contact page.




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
PROFOUND LOGIC SOFTWARE

Learn the Modernization Tactics
you need to be successful.

Watch our latest on-demand webinar and
learn about the various methods for
modernization and how you can integrate
them to find the right mix for
your business.

Plus, see several real-life examples of how
these modernization methods can
work together.

Download this educational webinar today.


Senior Technical Editor: Ted Holt
Technical Editor: Joe Hertvik
Contributing Technical Editors: Erwin Earley, Brian Kelly, Michael Sansoterra
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

ARCAD Software:  November 20 Webinar: Unify your multi-platform release management - with IOS
Halcyon Software:  Simplify the monitoring of your ERP systems and HA solutions
Manta Technologies:  Your complete source for IBM i training


 

IT Jungle Store Top Book Picks

Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
The iSeries Express Web Implementer's Guide: List Price, $49.95
The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
Can the AS/400 Survive IBM?: List Price, $49.00
Chip Wars: List Price, $29.95


 
The Four Hundred
System for Sale Versus Service for Rent

The i 7.1s Have It; i5/OS V5R4 Extended

IBM Smart Business Moves into Italy, Solutions List Grows in U.S. and India

As I See It: High on Quack

FBI Arrests AS/400 Programmers in Madoff Scheme

Four Hundred Stuff
Security Vendors Take Aim at HITECH Act for Healthcare IT Overhaul

Raz-Lee Adds Object-Level Security to i OS Security Suite

i365 Plans Multi-Platform Backup and Recovery Based on Windows Server

Data Masking Tool from dataguise to Get DB2/400 Support

Kronos Unveils Software, New Sales Approach at Conference

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
November 14, 2009: Volume 11, Number 46

November 7, 2009: Volume 11, Number 45

October 31, 2009: Volume 11, Number 44

October 24, 2009: Volume 11, Number 43

October 17, 2009: Volume 11, Number 42

October 10, 2009: Volume 11, Number 41

October 3, 2009: Volume 11, Number 40

TPM at The Register
IT admins: we don't need no stinkin' servers

HP: Q4 will be better than expected

Dell resells customized Cray baby super

Intel settles with AMD for $1.25bn

ASUS, MSI reveal quad InfiniBand boards

AMD unmasks Opterons of servers future

Netlist goes virtual and dense with server memory

Platform clusters Windows HPC with Linux

What do you call a flash-based super?

Cisco keeps schtum on big iron plans

HP shoots low with Lynnfield ProLiants

zPrime cost-cutting mainframeware gets traction

THIS ISSUE SPONSORED BY:

Profound Logic Software
Help/Systems
WorksRight Software


Printer Friendly Version


TABLE OF CONTENTS
File Caching in RSE

Message Received, But Not Understood

More with the WDSc Tasks View

Four Hundred Guru

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2009 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement