A note from Craig Pelkie .
. . Over the years, I have developed training for IBM Rochester, authored
Redbooks, published several books and countless articles on core iSeries
programming topics. For the first time, I am making available a powerful
collection of my Labs, Tutorials, How-to-Articles, Quick Reads, Source Code
and Training Tips that are guaranteed to increase your programming knowledge
and make your job easier.
"Just one item which increases productivity,
saves time or makes your job easier is worth many times the low cost of
this training!"
You get over 20 hours of on-site training! Plus Free Software! The PowerTrain
CD is available from me exclusively through Rochester Initiative. I personally
guarantee the PowerTrain CD to be a valuable and useful tool worth
many times its low cost. Get yours today!
Executive Summary
RPG
Code Procedure Prototypes with the Procedure: One of the problems
with coding procedures is that you need to create both a procedure prototype
and a procedure interface. Although the prototype and the interface are
almost the same, you have two separate pieces of code to maintain.
This lesson describes a technique to code the prototype and the interface
in the same source member. By using the compiler /DEFINE and /UNDEFINE
directives, you can use the right code at the right time in the compile
step.
The benefit to you is that you end up with all of your code for the procedure
and its usage in one place. Using this technique will make it much easier
to maintain your procedures when you change the procedure interface.
(Type: Lesson Minimum Rel Level: V4R3+ Time: 20 minutes)
SQL
Using SQL with the iSeries: This lab presents an overview of
the SQL features available in the AS/400 Operations Navigator, V5R1. In
the lab, you create an SQL collection and tables, work with key and check
constraints and add a referential constraint.
You'll use graphical tools to visually create views and work with the
five view types: INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, EXCEPTION
JOIN and CROSS JOIN.
The lab shows how to effectively use the new Database Navigator feature
of AS/400 Operations Navigator. It is an excellent introduction to both
SQL and the AS/400 Operations Navigator SQL functions.
(Type: Lab Minimum Rel Level: V5R1 Time: 2 hours)
Notes: The lab uses OS/400 V5R1 and AS/400 Operations Navigator
V5R1. If you are running an earlier release of either software product,
some of the features described in the lab will not be available to you.
You do not need the SQL Developer's Kit installed on your iSeries-AS/400
to take advantage of the tools described in this document.
Visual Tools for SQL: This is from a seminar conducted a few
months ago. It shows some of the new SQL features available in AS/400
Operations Navigator, how to run SQL scripts (statements), how to change
query attributes for optimization tests, how to create different types
of views, and an overview of the new Visual Explain optimization tool.
Note: you do not need the SQL Developer's Kit installed
on your iSeries-AS/400 to take advantage of the tools described in this
document.
(Type: Lesson Minimum Rel Level: V4R4+ Time: 45 minutes)
Using Aliases: If you have multiple member database files, you
will want to know how to create aliases for members in the files. Using
aliases, you can easily access the file member using SQL statements.
(Type: How-to Minimum Rel Level: V4R3+ Time: 15 minutes)
Net.Data
Get Net.Data Up and Running: These instructions show you how
to create a basic, functional HTTP Server and Net.Data configuration so
that you can start experimenting with Net.Data. The article assumes that
you have no prior experience with configuring IBM HTTP Server for AS/400
or Net.Data.
If you are using an iSeries at V5R1 or higher, you should use the lab
Build Net.Data Web Pages in Minutes rather than this article.
(Type: How-to Minimum Rel Level: V4R3+ Time: 1.5
hours Includes Code File: Hello.ndm Net.Data macro)
Build Net.Data Web Pages in Minutes: This lab introduces you
to Net.Data. Using detailed instructions, you configure IBM HTTP Server
for AS/400 and Net.Data. You then create and test several Net.Data macros
using the iSeries Integrated File System (IFS).
When done with this lab, you will have several working examples of Net.Data
query web pages that you can apply to your own database files.
(Type: How-to Minimum Rel Level: V4R3+ Time: 1.5
hours Includes Code Files: index.html test page, Hello.ndm, query1.ndm,
query2.ndm, query3.ndm, query4.ndm and query5.ndm Net.Data macros)
Update Files using Net.Data: This article shows how to retrieve,
display and update a record in a database file using Net.Data. SQL SELECT
and UPDATE statements are used.
(Type: How-to Minimum Rel Level: V4R3+ Time: 45 minutes
Includes Code File: ndupdate.ndm Net.Data macro)
Doing Subfiles in Net.Data: When you run an SQL SELECT in Net.Data,
by default all of the rows are displayed. Using the techniques described
in this article, you can present "subfile pages" of data, with
forward and backward navigation.
(Type: How-to Minimum Rel Level: V4R3+ Time: 45 minutes
Includes Code File: StartRow.ndm Net.Data macro)
Java
Install and Configure VisualAge for Java: In this chapter from Start
Here: VisualAge for Java for WebSphere you will install and configure
VisualAge for Java 3.5.3 or 4.0 on your workstation. After installing,
you will customize your development environment and add the JT400 project
to contain the AS/400 Toolbox for Java classes.
(Type: Lab Minimum Rel Level: VAJava 3.5.3, VAJava 4.x Time:
1.5 hours)
Note: you can find a copy of the jt400.jar file on the
PowerTrain CD in the /Software/IBM_iSeries_Toolbox_for_Java(R) directory.
Develop and Test "Hello World": In this chapter from
Start Here: VisualAge for Java for WebSphere you will develop and run
a "Hello World" Java class. By doing so, you will become familiar
with working with projects, packages and classes in VisualAge for Java.
You will also write code to display command line arguments passed to your
Hello World class in the VisualAge for Java Console window. That technique
provides a valuable tool for debugging that you will use extensively in
the course.
Finally, you will use the Javadoc generation tool in VisualAge for Java
to create documentation for your Hello World class.
(Type: Lab Minimum Rel Level: VAJava 3.5.3, VAJava 4.x Time:
2 hours)
How to Obtain the VAJava 4.0 Entry Professional Edition from IBM:
This is an excerpt from Start Here: VisualAge for Java for WebSphere.
If you don't have access to a version of VisualAge for Java, you can download
a no-charge evaluation version of VisualAge for Java 4.0 from IBM. This
article describes how to obtain the Entry Professional Edition.
The Entry Edition is limited to 750 classes in the workspace, so you will
not be able to use the AS/400 Toolbox for Java with this version. However,
you can develop and test JDBC applications using the JDBC-ODBC "bridge"
driver, which is also described in the course.
(Type: How-to Minimum Rel Level: VAJava 4.x Time:
1 hour)
Export and Version in VisualAge for Java: After developing
Java code in VisualAge for Java, you need to export it, for example, to
WebSphere Application Server. You can export directly to your iSeries
Integrated File System (IFS) if you have mapped a network drive to your
workstation.
This lab reviews the steps used to export to a JAR file or to a Repository.
You can use a Repository to easily exchange Java with another VisualAge
for Java programmer. You can also version projects in the Repository so
that you can retrieve a past version of source code if necessary.
(Type: Lab Minimum Rel Level: VAJava 3.5.3, VAJava 4.x
Time: 2 hours)
WebSphere
Using the WAS 4.0 Application Assembly Tool: Starting with WebSphere
Application Server version 4.0, you deploy web applications in WAR (Web
Archive) files. A WAR file contains the code for your web application:
servlet classes, JSPs, HTML and graphics files, and other files used in
your web application.
WebSphere Application server 4.0 includes an Application Assembly Tool
(AAT) that you can run from your workstation to help create a WAR file
ready for deployment. This article describes how to install, configure
and use the AAT to deploy a JSP application to WAS 4.0.
(Type: How-to Minimum Rel Level: WAS 4.0 Time: 45
minutes)
Using Connection Pools in VAJava: One of the most important
performance techniques available to you in WebSphere is connection pooling.
Using a connection pool, your servlet or JSP can efficiently use JDBC
to access your iSeries database with minimal overhead.
This article shows how to use the Data Source test environment in the
VisualAge for Java WebSphere Test Environment. Using the test environment,
you can develop and test connection pool code at your workstation, then
deploy working code to WebSphere.
The sample servlet code in the article shows the coding used with connection
pools for both WebSphere Application Server 3.5.x and WebSphere Application
Server 4.x.
(Type: How-to Minimum Rel Level: VAJava 3.5.x, VAJava 4.x
Time: 45 minutes Includes Code File: ConnectionPool.java
servlet code)
HTTP Server
Create HTML Files with Client Access: What's the fastest, easiest
way to create web pages from your iSeries-AS/400 data? Probably the Data
Transfer to HTML option in the IBM Client Access Data Transfer program.
In this lab, you'll learn how to use this feature of Data Transfer. You'll
create HTML table output, multiple linked tables, and learn how to use
the template feature of the program.
Although the resulting output is static HTML files, you may find that
this feature of Client Access is perfectly adequate for some of your web-serving
requirements.
(Type: Lab Minimum Rel Level: V4R3+ Time: 1 hour)
Overview of Certificates and Encryption: This article describes
basic concepts of how encryption is provided between a server and client
sessions, and the role of digital certificates in identifying servers
and clients. Read this before configuring your iSeries or AS/400 Digital
Certificate Manager.
(Type: Lesson Minimum Rel Level: V4R3+ Time: 20 minutes)
Working with Digital Certificate Manager: To start an encrypted
session between your iSeries or AS/400 server and a client (browser or
Client Access Express), you need to install and configure a digital certificate.
If you only need encrypted sessions for intranet and extranet applications,
you can create your own server certificate using the AS/400 Digital Certificate
Manager.
This lesson describes how to configure your iSeries or AS/400 server as
a certificate authority and issue a server certificate.
The material in this lesson shows how to use DCM up to V4R5. There are
some minor changes in the V5R1 configuration program, but you will still
be able to use the lesson as a guide for configuring DCM on a V5R1 system.
(Type: How-to Minimum Rel Level: V4R3+ Time: 1 hour)
Operations Navigator
Application Administration: The Application Administration feature
of AS/400 Operations Navigator helps you control users' access to your
system. Using Application Administration, you can allow or prohibit users'
ability to use features of AS/400 Operations Navigator, Client Access
Express and other programs on your system.
(Type: How-to Minimum Rel Level: V4R3+ Time: 30 minutes)
Backup Utility: The Operations Navigator Backup Utility is
an easy-to-use GUI backup program. You can use the backup utility to quickly
select libraries and Integrated File System (IFS) folders for backup.
The utility helps you create and manage tape sets and includes a scheduling
function.
(Type: How-to Minimum Rel Level: V4R3+ Time: 30 minutes)
iSeries NetServer: The iSeries NetServer is used to access
folders and files in your iSeries and AS/400 Integrated File System (IFS).
It is especially important to know how to work with NetServer if you are
developing Java code, HTML files, and other types of files to be served
from the iSeries (for example, using WebSphere, Tomcat or a web server).
This lab shows you how to use the AS/400 Operations Navigator to effectively
configure and work with NetServer. You also learn how to share folders
and map network drives to your PC for easy access to iSeries folders.
(Type: Lab Minimum Rel Level: V4R3+ Time: 1 hour)
iSeries Server
AS/400 Service Table: The AS/400 and iSeries Service Table is
used to control TCP/IP ports. If you need to know what port is used by
a TCP/IP service, you can look into the Service Table. You may also need
to work with the Service Table if you ever have TCP/IP port conflicts.
(Type: Lesson Minimum Rel Level: V4R1+ Time: 10 minutes)
IP Packet Filtering: One of the problems of using your iSeries
and AS/400 in a TCP/IP environment is that there are many possible points
of attack. Although you can shut-off unneeded TCP/IP services, you need
to control access on the enabled services. One technique is to use a firewall;
another is to use the built-in IP Packet Filter on your iSeries or AS/400
server. This article shows how to configure the IP Packet Filter and describes
an example of using the filter to log a journal entry each time the FTP
server is accessed.
(Type: How-to Minimum Rel Level: V4R3+ Time: 1 hour)
Understanding CCSID: The iSeries and AS/400 servers encode
all data that stored in database files using a Coded Character Set Identifier
(CCSID). Although you usually don't have to be concerned with CCSID when
using programs on the iSeries, you need to know how to work with CCSID
when transferring data to other systems. This article describes the concepts
of CCSID and the OS/400 System Values used to work with it.
(Type: Lesson Minimum Rel Level: All Time: 10 minutes)
Send AS/400 Objects via E-mail: If you work with more than
one AS/400 system, you sometimes need to copy an object from one system
to another. If you don't have compatible save/restore media, you can use
the technique described in this lesson. After saving the objects to a
save file, you can use FTP to send the save file to a PC. You can then
e-mail the save file or even copy it to a diskette or CD-R. You can use
FTP to upload the save file to the target AS/400 and restore its contents
from the save file to the target library.
(Type: How-to Minimum Rel Level: V3R2+ Time: 30 minutes)
Improve DNS with LOCALHOST: If you use the DNS server on your
iSeries or AS/400 system, be sure to read this tip about improving performance
of DNS lookups.
(Type: Lesson Minimum Rel Level: V4R3+ Time: 5 minutes)