02
Sat, Nov
2 New Articles

Installing IBM System i Access on Linux

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

 

Follow these simple steps and avoid the gotchas!

 

On my home computer, I am using Ubuntu Linux 8.10. Being an RPG programmer, I could not do this if I did not have a 5250 emulator to use. Fortunately, there are several viable options out there. In a previous TechTip, I discussed some options for operating systems that you may be supporting. In this article, I will get more hands-on by exploring the details of installing System i Access on Linux.

Prerequisites for Installing IBM System i Access for Linux

There are several prerequisites to get your emulator to work: you must have the IBM iSeries Access family (5722-XW1) license, the host servers must be started, and TCP/IP must be running.

 

One thing that will prohibit your software from working on the client end is the use of certain Microsoft fonts for the application. Prior to installing the IBM 5250 software, you need to install the Microsoft fonts that System i Access uses. I'm not sure why IBM set these as the default fonts or didn't set a default font if the Microsoft fonts weren't installed. But if you do not have them installed, your IBM 5250 emulator will not work.

 

Installing the fonts is easy enough...once you know you need them. But it can be frustrating when you need to find out all of these little details by trial and error to get your application to work. A lot of Linux applications that have requirements such as these dump a useful error message, indicating the exact commands that need to be executed for it to work.

Installing the Microsoft Fonts

Use this command to load the required Microsoft fonts:

 

      sudo apt-get install msttcorefonts

You can reboot, or you can flush the font cache without a reboot:

 

      sudo fc-cache -fv

 

Downloading IBM 5250

You can download the IBM 5250 software at IBM's Web Site. But first, you need to register to get an IBM ID. If you do not have one, you can create one with minimal information: you do not even have to provide an official IBM serial number or anything like that.

 

Once you have signed in, download the RPM file. You can download the software for Intel-based Linux workstations and Power PC with 32-bit processors. The 64-bit versions are available, but they do not provide a 5250 emulator. The latest Intel-based Linux RPM for V5R4 at the time of this article is iSeriesAccess-5.4.0-1.6.i386.rpm. So I will be using this file name throughout the article. You may be using a different version, which means you would have a different file name to reflect this.

The RPM File

If you are using Red Hat on an Intel workstation, install the RPM file using the following command:

 

      rpm -ivh iSeriesAccess-5.4.0-1.6.i386.rpm

 

That's all nice for Red Hat users. But what if you're using Ubuntu or Debian? Well, you can convert the RPM file into a usable deb format by using the alien command. Alien is a program that converts between different Linux packages.

 

There are some prerequisites that you must have installed prior to executing the alien command. Install them using the apt-get command:

 

      sudo apt-get install libmotif3 libxaw7 libstdc++5 alien -y

Once you have all of the required software installed, you can convert and install the RPM file on your Ubuntu system as follows:


      sudo alien -i iSeriesAccess-5.4.0-1.6.i386.rpm -cv

The -i option on the alien command indicates that you want to install the packages that have been converted. With Ubuntu and Debian becoming so popular, I would be happy to see IBM start to offer a Debian file that could be downloaded. But until then, use the alien command to convert and install the package for you.

Starting Up the IBM 5250 Green-Screen

In a terminal window, type this command:

 

      ibm5250 10.10.10.1

You could also use the DNS name:

 

      ibm5250 my400.mcpressonline.com

After executing this command, you'll get the sign-on screen (you may get the redundant gray GUI screen asking you for your user name and password before getting the sign-on screen).

Starting Multiple IBM 5250 Sessions from a Single Terminal

In a terminal window, type this command:

 

      ibm5250 10.10.10.1 &

This command has the ampersand (&) at the end of the line, which is used in Linux to send a process to run in the background, like sending a job to batch from an interactive job. This allows your emulator to run without tying up the terminal that you called it from so that you can start up more than one session from a single terminal and then continue entering more commands.

Remapping the Keys

The first thing I wanted to do after installing the 5250 emulator was to remap the keys. And with IBM 5250, it is easy enough with a GUI keyboard screen. On the emulator session's menu bar, choose Option >  Keyboard Remapping to bring up the GUI keyboard that allows you to remap the keys (Figure 1).

 

052009SnyderscreenShot01.jpg

Figure 1: Remap your keyboard. (Click images to enlarge.)

 

As you can see in Figure 2, I am remapping the Escape key to perform the SystemRequest() function. The Action Help button is useful to provide explanations of what each function performs, such as the FieldExit().

 

052009SnyderscreenShot02.jpg

Figure 2: For example, remap the Escape key.

 

When you are done making your changes and you've closed the screen, you will be asked whether you want to apply your changes.

 

052009SnyderscreenShot3.jpg

Figure 3: Apply your changes.

 

If you "Apply and Save changes before exiting," you will be applying the changes to the session that you have open and also be saving them for future usage.

 

Next, you will be asked where to save the changes.

 

052009SnyderscreenShot4.jpg

Figure 4: Decide where to save changes.

 

  • Save as a default for all your sessions will save your settings and will be applied as the default keymap unless you override it at the command line.

 

  • Save for this session only will apply to your immediate session and not be saved for future use.

 

  • Save as a named key mapping file will prompt you for the name that you wish to assign to the key map.

 

The Location of the Key Map Files

You may want to know where the actual key maps are saved so that if you create a key map that you like, you can push it to other computers. The key maps are saved into binary files in the ~/. iSeriesAccess/ibm_5250/K folder. The tilde (~) indicates the home directory location of the user that you are signed on as.

 

When you save the key map to be the default for all sessions, it is saved into the Default.101 file. If you somehow get your key map to a point that is beyond repair, you could rename or delete this file and have the emulator restore the key maps back to their original settings.

 

Choosing the option to save a named key map file creates a custom key map file in the same directory with the name that you indicated, followed by the .101 extension.

Command Line Options

There are command line options that you can use when you are using the ibm5250 command that would be specified after the IP address or DNS name. These command line options allow you to set various attributes of your sessions. Let's look at how to set the display name of the session and how to specify the usage of a named key map.

 

Set the Display Name

 

When using IBM 5250 on Linux, you need to specify the display name. If you don't, your session may get hung up when, for example, you receive a break message or try to use QShell.

 

To specify the display name, use the -DISPLAY_NAME option followed by the name that you wish to use:

 

      ibm5250 10.10.10.1 -DISPLAY_NAME PGMR21Z

 

This example will connect to the IP address of 10.10.10.1 with the display name of PGMR21Z.

 

When you specify the display name with ibm5250, you must use uppercase letters. Using lowercase letters will generate an error: "Invalid Specification of -DISPLAY_NAME parameter"

 

Specifying a Named Key Map

 

If you create a customized key map that you have named, you can specify the usage of that key map with the -KEYFILE option:

 

      ibm5250 10.10.10.1 -DISPLAY_NAME PGMR21Z -KEYFILE MCPress.101

 

If you create a key map named MCPress when you change your settings, you can access it by specifying it after the -KEYFILE option with the .101 extension. The extension will automatically be added when you save the file. If you do not specify a named key map, then the default key map will be used.

IBM System i Access for Linux: It's a Good Thing!

Now that you know how easy it is to install System i Access on your Linux computer, you've opened up a whole new world of possibilities! Now, go have fun!

Thomas Snyder

Thomas Snyder has a diverse spectrum of programming experience encompassing IBM technologies, open source, Apple, and Microsoft and using these technologies with applications on the server, on the web, or on mobile devices.

Tom has more than 20 years' experience as a software developer in various environments, primarily in RPG, Java, C#, and PHP. He holds certifications in Java from Sun and PHP from Zend. Prior to software development, Tom worked as a hardware engineer at Intel. He is a proud United States Naval Veteran Submariner who served aboard the USS Whale SSN638 submarine.

Tom is the bestselling author of Advanced, Integrated RPG, which covers the latest programming techniques for RPG ILE and Java to use open-source technologies. His latest book, co-written with Vedish Shah, is Extract, Transform, and Load with SQL Server Integration Services.

Originally from and currently residing in Scranton, Pennsylvania, Tom is currently involved in a mobile application startup company, JoltRabbit LLC.


MC Press books written by Thomas Snyder available now on the MC Press Bookstore.

Advanced, Integrated RPG Advanced, Integrated RPG
See how to take advantage of the latest technologies from within existing RPG applications.
List Price $79.95

Now On Sale

Extract, Transform, and Load with SQL Server Integration Services Extract, Transform, and Load with SQL Server Integration Services
Learn how to implement Microsoft’s SQL Server Integration Services for business applications.
List Price $79.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: