View this email as a Web page Please add System iNetwork Programming Tips to your Safe Sender list.

System iNetwork
System iNetwork Programming Tips
Issue 340
March 11, 2010
From the Editor

IMPORTANT ALERT: Your newsletter soon will mail from a new address. To continue delivery of the System iNetwork Programming Tips newsletter, please add SystemiNetworkProgrammingTips@newsletter.systeminetwork.com to your contact/address book and/or safe-senders list.


System i Developer
System i Developer Starts March 23! The RPG & DB2 Summit is THE conference to get timely, practical education and expert 1-on-1 advice on RPG IV, embedded SQL, DB2, SQL tuning, RSE, PHP, RPG & the Web and more. Learn from gurus Susan Gantner, Jon Paris, Skip Marchesani, Paul Tuohy, Scott Klement and others in a highly interactive, fun, affordable environment. View the Sessions and register today!

New XLPARSER4 Tool Supports XLSX Format
By Scott Klement

In the February 25, 2010, issue of System iNetwork Programming Tips, I presented version 3.6 of Apache's POI utility and explained how I had updated my HSSFR4 service program to work with it so that you can create, load, or update both of Excel's native formats, XLS and XLSX. In today's article, I also update XLPARSER4 to use POI 3.6 with XLSX support.

The XLPARSER4 tool is based on the EventModel from the POI project, whereas HSSFR4 is based on the UserModel. What this means is that XLPARSER4 can extract all the values from cells very quickly and with a low memory footprint, compared to HSSFR4. This ability is perfect when data from a spreadsheet is to be loaded into a physical file—or any other task in which the spreadsheet is only read and not written. By contrast, HSSFR4 is slower and requires more memory, but it offers the ability to write the data back to the original spreadsheet.

*Read More...

System iNetwork
HouseAd Quick, Easy Podcasts -- Download them today!
Find announcements and discussions on topics vital to System i IT professionals, presented and reported by System iNetwork staff and independent System i experts. All podcasts are FREE! Start downloading today.

How Can I Get a List of the Environment Variables That Are Set
By Scott Klement

Sometimes it's useful to be able to get a list of the environment variables that have been set in a job. For example, when a program crashes, you might have a routine that dumps diagnostic information, such as the job log and a program dump. When you do that, it's often useful to also list the environment variables and their current settings. This is especially true in a CGI program in which environment variables control how the program is used.

Although IBM provides the WRKENVVAR command to let you see the variables interactively, IBM doesn't provide a command that retrieves all the variables that have been set. However, it's possible to get the list of variables by using a bit of pointer logic.

*Read More...

Length of CL Variables
By Scott Klement

Q: Is there an easy way to calculate the length of a string in CL, so I don't have to hard-code it? Can I calculate the length both with and without the trailing blanks?

A: There was actually a really good discussion about this subject in the System iNetwork forums this week. In this article, I include the answer that I thought was the best one, and I explain how the code works. I also provide a link to the original thread in the forums so you can read it yourself.

*Read More...


On the Web

So You Were There—What Happened?
Over here at System iNEWS, we have a couple of fun COMMON 50th Anniversary projects in the works—a print piece to go in the bag for COMMON attendees and some coverage in our regular magazine as well. Here's where you come in: If you've been to a COMMON conference, why not share some of your favorite memories, maybe about your first COMMON (Atlanta!) or maybe about something strange, awesome, or downright cool that happened. If you're willing to participate, it's easy—just post a comment in our blog or fire off an email to chris.maxcer@penton.com. We just need your first and last name to go along with it. By sharing your memory with us, you agree to let us edit it (don't worry, we've got gentle hands) and publish it in print or digitally.

Enterprise Firewall Appliances Buyer's Guide
In a world filled with a menagerie of security threats—viruses, malware, phishing, and outright hacking by cyber criminals—giving your IT infrastructure a solid security foundation is a must. An integral part of any network security strategy is the firewall appliance, an infrastructure component that can limit external access to your corporate network to only trusted users and organizations. Firewalls are available in both hardware and software varieties; in this buyer's guide from the March issue of System iNEWS, we look at hardware firewall appliances.


Sign Up for Other System iNetwork Newsletters!
Enter Your E-mail Address:

System iNetwork Systems Management Technical tips, insight, and utilities for configuration, performance, security, and other operational topics, which is sent on alternating Wednesdays.

NEWS Daily System i-related news and announcements Monday-Thursday.

My i & .NET Monthly e-mail newsletter presenting technical articles, how-to guides, tips, and case studies on the integration of .NET applications.

RPG Coder Technical tips and techniques for RPG programmers and developers, which is sent on the 1st and 3rd Thursday of each month.

Sign-up form doesn't work? Subscribe at System iNetwork.com

Thank you to our sponsor:
System i Developer

sponsorArray[1].sponsorName

sponsorArray[2].sponsorName

From System iNetwork
e- Learning

Mar 16 - Microsoft Excel and Microsoft Word for IBM i Developers
Learn techniques to integrate these Microsoft Office applications with your IBM i database.

Mar 16 - Introduction to SQL for System i Developers
Learn essential components of SQL syntax as well as iSeries/System i support for SQL.

April 13 - System i Application Modernization Using the .NET Framework
Learn to apply the tools and technologies in the Microsoft .NET Framework to meet your most pressing System i modernization needs.



Contact Unsubscribe Advertise Submit Press Release

You are subscribed as: #email# (not #email# ? Subscribe Now.)

To unsubscribe from this e–mail please click here.

For questions, comments, and reader feedback about an item covered in System iNetwork Programming Tips contact Scott Klement .

Copyright 2010 | System iNetwork | Penton Media | 221 E 29th St. | Loveland, CO 80538 | Privacy Policy

"System i" is a trademark of International Business Machines (IBM) Corporation and is used by Penton Media, Inc., under license. System iNEWS, SystemiNetwork.com, and the SystemiNetwork.com newsletters are published independently of IBM, which is not responsible in any way for the content. Penton Media, Inc., is solely responsible for the editorial content and control of System iNEWS, SystemiNetwork.com, and the SystemiNetwork.com newsletters.