What is interfacing?
Interfacing is the ability to access data from various languages and requirements.
These interfaces are the interfaces between the data and the program. These interfaces are sometimes local, that is, on the same system, and other times they are remote, that is, system to system. This chapter covers a wide range of preferred practices for accessing your native ILE data.
Introduction to interfacing
Interfacing is a relatively small word, but one with a wide range of meanings. This section focuses on the connections between systems, objects, and languages.
The term interface is also used to define how individuals interact with various devices. These devices include the touchscreen interface of a smartphone or tablet, the combination of a PC’s keyboard, mouse, and screen, and even the controls of a microwave oven. However, this section describes interfacing in the context of how various systems, or components of a single system, interact and pass data from one to another.
The past
In the past, interfacing between systems was a purely physical interaction. Exchanging data between two systems required that a magnetic tape be prepared on one system and shipped physically to another location to be read on another system at that location. Even earlier, the data transfer medium was punch cards or paper tape.
Over time, these methods gave way to various electronic communication vehicles, many of which were proprietary to the manufacturer of the computer hardware or software systems that were involved. However, no matter how the data was exchanged, it tended to be a batch-oriented process, that is, a set of data was passed from system A to system B, and the results of that processing were returned later.
Today, such processes still take place, but the data is typically in the form of XML files or Comma or Character Separated Values (CSV), and is often transferred electronically between the systems through mechanisms such as FTP.
Just as interactive terminals began to replace batch reports, over time it became necessary for the results of such processes to become available immediately. In some cases, this immediacy was achieved by having a program on one system pretend to be a terminal on the other and to retrieve the data that was returned programmatically. In fact, this is a technique that is still in use today to allow a program to enter data into existing online applications. But over time, more sophisticated and practical methods have evolved.
The present
Today, such interactions typically take place through a wide variety of different mechanisms and methods. Many interactions are done by using web services of one form or another, or by using stored procedure calls against a database. Generically, such processes come under the banner of service-oriented architecture (SOA).
SOA is really an evolution of modular programming practices. SOA takes it one step further by building complete applications from discrete software agents (or services) that have simple, defined interfaces and are loosely coupled to perform a specific function. Such agents can be on the same system, or on two disparate systems on opposite sides of the world.
In SOA, there is a service provider and a service consumer. As you see, IBM i is positioned to play both roles.
Service providers are used by different consumers. For example, a service that validates a customer might be used from a web interface or from green screen or batch applications.
There are many other types of interfaces that are covered in this chapter. This chapter looks at the common interfaces that are used for the various languages that are supported on IBM i.
Having outlined what we mean by interfacing, it is time to look more closely at the details of the technologies and tools that are available. Let us first describe the concept of stateless interfaces.