AS/400 Links Partner with Rochester Institute Contact Us
Training Catalog Free Downloads Free Downloads iSeries Career Center Privacy / Usage


Get SpotLight Online – iSeries Technologies and Practice delivered to your inbox every month. These resources are yours at no charge. You may freely download everything from complete tutorials with labs and code to iSeries management articles on key topics. You will find a lot of interesting content here. View the most recent edition below:
 
_________________________________
 
Volume 2
Issue 4

IN THIS ISSUE
Visual LANSA Named to
iSeries Developer Roadmap

Feature Technical Article:
IBM ToolBox for Java
New Entry into Software
Change Management Market
New Thin Client Terminals
New Geocoding Solution for iSeries
TestPLAN Version 2.0 Aids
Sarbanes-Oxley Compliance

Run Any TCP/IP Application Securely
Through an RSF Tunnel

Visual LANSA Named to iSeries Developer Roadmap

IBM has announced the latest version of the iSeries Developer Roadmap, Version 3. LANSA and its product Visual LANSA are included in this Roadmap. This is the first version of the Roadmap in which IBM has included third-party software providers and their tools. IBM Business Partners nominate their solutions, which are then accepted by IBM as enablers of the iSeries Developer Roadmap. A Business Partner’s solution is listed according to the product’s ability to move developers and their applications to the Web. The five categories are Better Tools, Better User Interface, Better Architecture, Better Portability and Better Scalability.

Visual LANSA was listed under the categories of Better Architecture and Better Portability. For the moment, a tool may be listed under two categories only, even though it may fit more. Visual LANSA is an Integrated Development Environment that provides a Windows-based development environment allowing users to deploy applications with multiple user interfaces including Windows, browser and Wireless devices to multiple platforms including Windows, iSeries (AS/400), Linux and UNIX.

For more information about the iSeries Developer Roadmap visit
http://ibm.com/servers/eserver/iseries/roadmap/tools.html

For more information about LANSA visit
http://www.lansa.com

Return to In This Issue

 
Feature Technical Article
IBM ToolBox for Java
The right tools to have in your toolbox for Java development
by Susan Funk
 

So you want to enter the world of Java and the Web, but you’re not sure where to start? The IBM Toolbox for Java is a set of Java classes you can use to access iSeries resources such as jobs, printers, message queues, and data queues. Using the Toolbox for Java, you can run iSeries programs and call non-interactive iSeries commands from Java. In addition, the Toolbox for Java includes a JDBC driver to access your database information. This article gives you examples of how to run commands and programs from Java and how to use the Toolbox for Java JDBC driver to access a database.

What is the IBM Toolbox for Java?

The IBM Toolbox for Java:

(5722-JC1, http://www.ibm.com/servers/eserver/iseries/toolbox/)

is delivered as both a traditional iSeries licensed product and as an open source product. The open source product, JTOpen, has the most recent version of code and contains the most recent fixes and enhancements. You can find out more about JTOpen at http://www-124.ibm.com/developerworks/oss/jt400/.

The Toolbox for Java has a class library you can use to access your iSeries resources. The Toolbox for Java communicates between a client machine and your iSeries server using the OS/400 or i5/OS host servers. The V5R3 version of the Toolbox for Java connects back to V5R1 and later versions of OS/400 or i5/OS.

In addition to calling commands and running programs, you can: access files in the Integrated File System, access data queues, access printers, output queues, and spooled files, list jobs and view job logs, access messages and message queues, retrieve system values and status, access user spaces, view users and groups information, and access databases.

Java programs run within a Java Virtual Machine (JVM). You need to obtain a JVM for the machine you will be running Java programs on. (Note that the iSeries contains a built-in JVM.)

You use javadoc to find out information that describes Java classes and the methods available on each class. Javadoc for the JVM is available at Sun Microsystems’ Java developers’ page at http://java.sun.com
. The page also has tutorials for people new to Java.

You can view the javadoc in the V5R3 IBM Toolbox for Java’s Programmers’ Guide, which is available at:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?info/rzahh/page1.htm  (click the Javadocs link).

The Programmers’ Guide also has code samples and detailed information about Toolbox for Java features.

The Toolbox for Java is a great way to get started in Java because it let you access the same iSeries resources you always have. The rest of this article shows you examples of the features you’ll find within the Toolbox for Java.

Use ProgramCall to call an iSeries program and CommandCall to call an iSeries command

You can use the Toolbox for Java’s AS400 object in almost every Toolbox for Java program you write because it represents a connection to the iSeries server. You can create a connection to an iSeries server with the following line of code:

AS400 myServer = new AS400("myServerName", "myUsername", "myPassword");

Note that the physical connection is not actually made to the server until it is needed.

An easy way to call existing RPG or CL programs from Java is to use Toolbox for Java’s program call classes to call your iSeries program. You can specify input, output, and input/output parameters through Toolbox for Java’s APIs. If the program fails to complete successfully, you can access returned data through output and input/output parameters and view messages. You can call any non-interactive program (with 35 parameters or fewer) from the Toolbox for Java (assuming the profile you are running under has sufficient authority to run that program).

 

import com.ibm.as400.access.AS400;
import com.ibm.as400.access.AS400Message;
import com.ibm.as400.access.ProgramCall;

// Create an object to represent the connection to the iSeries server
AS400 myServer = new AS400("myServerName", "myUsername", "myPassword");

// Create a program call object and specify the program you want to run
ProgramCall myProgram = new ProgramCall(myServer);
myProgram.setProgram("/MYLIBRARY/MYPROGRAM.PGM"));

// If the program did not run successfully, print to screen the
// messages that came back from the server
if (myProgram.run() != true)
{
        AS400Message[] messageList = pgm.getMessageList();
 int numberOfMessages = messageList.length;
 for (int i = 0; i < numberOfMessages; i++)
 {
  System.out.println("Message " + i + "= +
  messageList[i].getText());
 }
}

Code Example 1

Again, assuming the profile you’re running under has sufficient authority to run the command, you call a non-interactive iSeries command using the Toolbox for Java’s CommandCall class. The results are available as messages that are contained in AS400Message objects.

import com.ibm.as400.access.AS400;
import com.ibm.as400.access.AS400Message;
import com.ibm.as400.access.CommandCall;

// Create an AS400 object with signon information
AS400 myServer = new AS400("myServerName", "myUsername", "myPassword");

// Create a CommandCall object to call a command
CommandCall cmd = new CommandCall(myServer);
cmd.run("CRTLIB MYLIB");

//Print out the messages that came back
AS400Message[] messageList = cmd.getMessageList();
int numberOfMessages = messageList.length;
for (int i = 0; i < numberOfMessages; i++)
{
 System.out.println("Message " + i + "= +
 messageList[i].getText());
}

Code Example 2

Using Toolbox JDBC Driver

You can use the Toolbox for Java JDBC driver to access your iSeries DB2 database. The Toolbox for Java JDBC driver can be used natively on the same iSeries server as your iSeries database, remotely from a separate iSeries server, or remotely from any client machine that has a Java Virtual Machine. When you write a JDBC program, you write against JDBC interfaces and select an implementation. The Toolbox for Java supports the JDBC 3.0 specification. To view JDBC specifications, see Sun Microsystems’s JDBC page at http://java.sun.com/products/jdbc
.
The main JDBC class is Driver, which lets you make a connection to a database. Toolbox’s implementation of the Driver interface is:

com.ibm.as400.access.AS400JDBCDriver.

import java.sql.*;

// Specify which JDBC driver you wish to use by specifying the Driver
// implementation
Class.forName("com.ibm.as400.access.AS400JDBCDriver");

// Create a connection object
Connection connection  = DriverManager.getConnection("jdbc:as400://mySystem");

//Execute a query
Statement select = connection.createStatement ();
ResultSet rs = select.executeQuery ("SELECT * FROM MYLIBRARY.MYTABLE");

// Print out the contents of the ResultSet to the screen
for (int i = 0; rs.next(); i++)
{
 System.out.println("Customer number [" + i + "] = " +
 rs.getString("CUST_NUMBER"));
}

Code Example 3

Alternatively, you can use the iSeries native JDBC Driver (which has the Driver implementation com.ibm.db2.jdbc.app.DB2Driver). This driver is shipped as part of the IBM Developer Kit for Java (57xxJV1). To read the FAQ page for the driver, go to: http://www-1.ibm.com/servers/enable/site/java/jdbc/jdbcfaq.html . You can only access the native JDBC driver from a Java program running on an iSeries, while the Toolbox driver runs on any Java Virtual Machine. The Native JDBC driver offers the best performance when the database and Java Virtual Machine both reside on the iSeries.

JDBC interfaces are implementation-independent. You can write a JDBC program once, then run it against different kinds of databases using different implementations of the JDBC interfaces.

The Toolbox for Java’s Record Level Access classes are another iSeries-only option for database access, but they may be more familiar to RPG programmers because they allow sequential file access and keyed file access. Look at the javadoc for class com.ibm.as400.access.RecordFormat and click on the example "Using the RecordFormat class with the record-level database access classes" for an example of how to use the Record Level Access classes.

Access other iSeries resources

Below is a quick summary of other Toolbox features you may want to use:

  • List files in a directory and view files using the Toolbox for Java’s Integrated File System classes.
  • Access data queues, read them sequentially, or take items off a data queue using the Toolbox for Java’s DataQueue classes.
  • Access your printers, hold or release print jobs, view output queues, and even view spooled files using the Toolbox for Java’s print classes.
  • Create Web pages using the Toolbox for Java’s HTML and Servlet classes.

What’s new in Toolbox V5R3 and JTOpen 4.0

In V5R3 (JTOpen 4.0 or above), the Toolbox for Java added the Extensible Program Call Markup Language (XPCML), an enhancement to PCML (Program Call Markup Language). PCML allowed you to describe the parameters to a program, but XPCML goes one step further and lets you use XML schemas to specify input and output parameters and data.

In V5R3, you now can parse communications traces between clients and servers programmatically. The Toolbox for Java’s V5R3 release also includes enhancements to its HTML classes and enhancements to its JDBC driver support.

V5R3 includes a new CommandHelpRetriever class:

(com.ibm.as400.util.CommandHelpRetriever)

which can be used to retrieve help documentation for OS/400 control language (CL) commands in either HTML or User Interface Manager (UIM) format.

The Bottom Line

The Toolbox for Java is a class library that makes it easy to move to Java. You can call the same commands and programs as you always have, but now from Java. With the Toolbox for Java, you can access your integrated file system, database, printers, jobs, and other OS/400 or i5/OS resources.

As you expand your Java knowledge, you can use the Toolbox for Java to help you build Web pages, view spooled files, and move into web services. Check out the JTOpen user forum at http://www-912.ibm.com/j_dir/JTOpen.nsf/By+Date?OpenView to post your questions to Toolbox for Java/JTOpen developers.

The bottom line is that the Toolbox for Java may be exactly the toolbox you need to move into Java development for your iSeries

Susan Funk is a staff software engineer for IBM Rochester, currently a team leader for the Virtualization Engine console. She was formerly the lead software designer and developer on the IBM Toolbox for Java JDBC driver, and she was part of the development team for the iSeries Access for Web alpha release.  Susan can be reached at funks@us.ibm.com.


Return to In This Issue

New Entry into Software Change Management Market

Unbeaten Path International is introducing the software change management product Tight as a Drum, previously marketed in Europe under the name Object Management System. Tight as a Drum employs a sophisticated iSeries repository to control the entire software change process. Changes can be tracked from incident to fix, through test, acceptance, and posting to the live production environment. It handles validation, user sign-off, and documentation of software changes. There is also a fully integrated help desk functionality which registers incidents and change requests.

These benefits are not limited to just the iSeries environment. Programmers using Windows and UNIX can employ Tight as a Drum functionality to upload software components to the iSeries. Furthermore, the product supports both unattended component deployment from the iSeries into UNIX and Windows environments and the installation of deployed code within those environments.

Unbeaten Path is based in the United States and specializes in IT security products and services which comply with Sarbanes-Oxley, PCAOB, FDA 21 CFR part 11, HIPAA, GLBA, and COBIT.

For more information visit
http://www.unbeatenpathintl.com/tightasadrum/source/1.html

Return to In This Issue

New Thin Client Terminals

Affirmative Computer Products added a new range of Thin Client terminals and lowered prices of some "Mini" models by 37%. The zero footprint options are quite popular and a VESA standard mounting bracket is now available for attachment to the rear of 15 and 17inch flat panel monitors. The latest Mini model is 2201; an entry-level Thin Client aimed at IT departments with Windows Terminal Servers and Citrix Servers. It features ICA and RDP Clients as well as VNC capability and Central Management.

The price of the YEStation Mini model 2212 has also been reduced and enhanced, making this single model suitable for the missions of Text Based Terminal, Windows Based Terminal, and Windows Based Terminal with built-in 5250 GUI features. Previously there were three different models required to meet these varying requirements. The fully featured 2212 has a long list of emulated terminals including 5250, 3270, VT 100, 220, 320, 420, and 525 as well as wide variety ASCII/ANSI terminal for use with UNIX servers. The 2212 is preconfigured with Text, Windows and GUI emulation sessions so the user can decide which is most appropriate for their environment.

For more information visit
http://www.affirmative.net

Return to In This Issue

New Geocoding Solution for iSeries

WorksRight Software announces the availability of Z4 LAT/LON a new Geocoding solution for the IBM iSeries (AS/400, i5). Geocoding is a process that assigns a latitude/longitude coordinate to an address. Once the latitude/longitude coordinate is assigned, an address can be located on a map, used as input for distance calculations, and/or associated with other known geographic areas like Census Tracts, Census Block Groups, MSAs, Time Zones, etc.

Z4 LAT/LON is offered as an optional add-on product to WorksRight’s popular PER/ZIP4 CASS (Coding Accuracy Support System) software. PER/ZIP4 matches addresses to the national ZIP + 4 Postal database. This matching process allows ZIP Codes, ZIP + 4’s, and other mailing information to be verified, corrected, and updated.

In addition to providing valuable geographic data for your addresses, Z4 LAT/LON also provides a sophisticated Nearest Dealer Locator function and an advanced distance calculator. Distances can be calculated between Zip Codes or between known latitude/longitude coordinates. Distances are provided in statute miles, kilometers, and nautical miles.

All three functions of Z4 LAT/LON - the provision of geocoding data, the Nearest Dealer Locator function, and distance calculations - are supported by both an interactive user interface and a callable program or API interface.

For more information or to order a 30-day trial visit
http://www.worksright.com

Return to In This Issue

TestPLAN Version 2.0 Aids Sarbanes-Oxley Compliance

Original Software introduced a new version of its test process management solution, TestPLAN. Version 2.0 includes features designed specifically to help meet the pressing challenges posed by Sarbanes-Oxley compliance, which continues to dominate today’s business landscape.

TestPLAN, a QA plan that formalizes how changes to core software systems are handled, helps companies organize their testing better by pooling key testing resources, developing templates for testing core applications, and producing detailed management reports on progress with testing projects. Version 2.0 includes a range of reporting facilities to ensure that the testing manager can confidently oversee and control the process from the top level. New features include statistics on project performance, task and defect status analysis, project comparison reports and audit-ready project reporting for management and corporate compliance purposes. Reports are available in both tabular and graphical formats.

TestPLAN users can create a multi-layered framework for managing the testing process. Within this, the required tasks and activities can be structured and monitored, with test scripts, results, data documents, screenshots and much more accessible from within the plan. Users can even launch test scripts from TestPLAN everything is stored centrally for multiple user access, and the plan is updated in real time as team members work on it, with each managing and updating their own tasks.

Sarbanes-Oxley legislation is designed to encourage adherence to best business practices and ensure maximum transparency and accountability of publicly held corporations. An inevitability of introducing and adhering to such controls is that a company has to make and manage changes to its core IT systems - those it relies upon for its corporate records and key management processes and reports. To find out more about how TestPLAN can help with corporate compliance efforts, contact Original Software
http://www.origsoft.com

Original Software has also produced a series of white papers demonstrating how software testing can help with Sarbanes-Oxley compliance. The white papers can be downloaded from:
http://www.origsoft.com/White_Overview2.htm

Return to In This Issue

Run Any TCP/IP Application Securely Through an RSF Tunnel

Bug Busters Software Engineering announced an add-on for Release 7.2 of Remote Software Facility (RSF). The new feature, called tunneling, allows any TCP/IP application to be run with full encryption between two AS/400s or iSeries machines.

Until now, transmissions for certain popular TCP/IP applications could not be fully encrypted between two AS/400s. The telnet client provided with OS/400, for example, does not support encryption. While the AS/400 could act as a server for encrypted telnet connections, it could not act as a client for an encrypted connection.

Now, using an RSF tunnel, telnet and other applications can be fully encrypted, even when the client and server are both AS/400s.

Another advantage of RSF tunneling is that it requires fewer ports to be opened in a firewall protecting the server machine. RSF data transfer requests and any RSF tunnel connections all connect to a single port on the server. Therefore, an authorized client AS/400 can connect to a server to send/retrieve objects and establish a telnet session without ever opening the telnet port in the firewall.

For more information and a free trial visit
http://www.bugbusters.net

Return to In This Issue