Assumed Knowledge Level

The following material assumes the reader has completed at the standard aXes eXtension tutorials and is familiar with JavaScript and HTML coding.

What is External Hosting?

aXes 5250 sessions may be imbedded inside an external container application. This may be visualized like this:


In aXes terminology the "external container application" is referred to as an external host.

The requirement is typically that the aXes 5250 session(s):

  • Need to be snapped into, or embedded inside, an existing external host structure.
  • That the external host needs to manage and control the 5250 session in various ways.

Some examples of using an external host are:

  • A financial services organization has created a browser based mash up application to provide access to complete customer investment portfolios. The portfolio information needs to come from different applications running on heterogeneous servers. Just one part of a customer's portfolio resides in a 5250 based System i server application. The customer needs to imbed just 20 of the 5250 screens into their mash up.
  • An organization is implementing the next generation of their current 5250 based ERP application. They are creating a brand new .NET Windows Rich Client – Server application. Time and budget constraints mean that re-writing and re-testing all of ERP application components will not be possible in the first version - so a proportion of the existing 5250 screens and applications will be need to be reused initially. Later, when time and money permit, they will be properly replaced with new .NET coding.

This tutorial covers how this type of external hosting and management may be accomplished.

Setting Up Files for this Tutorial

Step 1

Check that file axexternalhost.js exists in your aXes ts folder. If it does not exist then install it from the copy supplied. This file is a shipped aXes file. You should not modify it.

Step 2

Check that that file \ts\axexternalhost.js is authorized so that user *PUBLIC has *R (and only *R) rights to use it. Use the OS/400 WRKLNK command to check this.

Step 3

Download the files required for the example by clicking Download the example files.

Copy the supplied example files: externalhostblank.htm, externalhostexample1.htm ,externalhostexample2.htm into your project folder (eg: \axes\ts\screens\MyProject1).

Step 4

Check that the copied files: externalhostblank.htm, externalhostexample1.htm, externalhostexample2.htm are all authorized so that user *PUBLIC has *R (and only *R) rights to use them. Use the OS/400 WRKLNK command to check this.

Setting Up 5250 Screen Definitions for this Tutorial

Please complete these screen setup steps in your project before attempting to complete this tutorial:

Step 1

The IBM System i Main System Menu is uniquely identified With name MAIN and With the selection/ command entry input field named CommandLine:


Step 2

The IBM i Display Program Messages screen is uniquely identified With name DSPMSGS:


Note: Identify this screen if it appears immediately after sign on. If it does not appear when you sign on you do not need to identify it.

Step 3

The IBM Display Library screen is uniquely identified with name DSPLIB and with the first two objects displayed named Object_1 and Object_2 respectively:


Note: Navigate to this screen using command DSPLIB QGPL (or any valid library name).

Step 3

The IBM Work with Output Queue screen is uniquely identified with name WRKOUTQ:


Note: Navigate to this screen using WRKOUTQ QPRINT (or any valid output queue name).


Legal Mentions

aXes is brought to you by:


Serving the IBM i community for 30 years.