Blog
iCan

May 17, 2013

Technology Moves Fast. PASE Can Help

This week’s blog was written by Tony Cairns. Tony is a member of the IBM i development team working on open-source solutions, including PASE and PHP enablement.

25withlogo (2).jpg
As a member of the PASE development team, inquiries from the IBM i community regarding PASE often come to me. In one such recent email, the following phrase caught my eye:

To most, including me, it (PASE) is just "the other side I rarely use.”

E-x-a-c-t-l-y!

PASE (Portable Application Solutions Environment) for IBM i is an optionally installable component of the operating system. There’s no charge for it. Specifically, if you were to go looking for it, it installs as Option 33. However, there’s probably no reason to go looking for it because you’d most likely find that it has, in fact, already been installed on your system and is quietly running one of the many popular offerings available for IBM i, such as Java, PHP, SAP and so on.

What?? It’s optional, but it’s probably already installed? That’s right. PASE is such an integrated part of the operating system these days that you’d have to go out of your way to remove it – at the risk of severely limiting your system. That’s why, for most, PASE is often shrouded in all the mystery of a good Indiana Jones movie.

PASE Unveiled …

Let’s look at how PASE enables IBM i to support AIX applications, using PHP as an example. Put simply, PASE enables AIX compiled binary code (e.g., PHP) to run inside the same process as your ILE programs (e.g., RPG) “sharing” IBM i System Licensed Internal Code (SLIC) and POWER hardware (see figure below).

PASE
Just to be clear, in PASE, AIX compiled binaries are NOT emulated in any way. They run directly on the POWER processor and in same IBM i job/process as your ILE programs. This is possible due to “shared” SLIC. And since the POWER processor supports both AIX 32-bit binaries and 64-bit binaries, PASE also supports both 32/64-bit AIX binaries. As such, PASE enables you to run many AIX applications on the IBM i operating system with little or no change, effectively expanding the portfolio of solutions available for the platform.

IBM i Project Manager ...

The PASE environment shared kernel is very accurate matching AIX behavior. Most project managers report PASE porting and version upgrades cost pennies on the dollar compared to conventional application development. At the Rochester lab we walk the talk, to wit, about 98 percent of PASE runtime is borrowed directly from AIX with less than 2 percent change to fit our merged ILE/PASE environment.

IBM i Operator ...

Since PASE and ILE programs share the same SLIC kernel, they also share the same basic exception/signal processing. Therefore, essential system operations are the same for both PASE jobs and non-PASE jobs, allowing IBM i operational tools like wrkactjob to view job attributes, end jobs, etc. As an IBM i operator, continue to use same familiar IBM i tools for PASE jobs, and when you have time, you can choose to learn all manner of new techniques offered via PASE shells and scripting (future blog).

IBM i Programmer ...

PASE memory required for any program run stack, heap size or shared memory is acquired from same SLIC teraspace pools use by ILE programs. Therefore, ILE/PASE programs can share data and actually call routines in either environment. However, as a true Midwest geek I am bound by Minnesota nice, so I feel compelled to mention that it takes practice to use the ILE-2-PASE QP2 APIs and counter-part PASE-2-ILE _ILECALL, _PGMCALL APIs (future blog).

By the way, in IBM i 6.1 and later, ILE and OPM program models are better converged, so PASE memory can also be used by OPM programs. … Hey, if you haven’t done so already, isn’t about time you moved up beyond V5R4???

IBM i CTO ...

We the people (IBM i people), say thanks to AIX developers worldwide for testing ported PASE production applications.

Sound funny? Maybe, but helps IBM i CTOs sleep soundly at night. We are not alone when running AIX ported PASE applications. Most often, AIX counterparts have lived through development trials and cost, tested each new version, and re-designed to fit customer feedback. After the AIX dust settles, we the people (IBM i people) pick up hard-earned AIX binaries for our own PASE production environments.

I tell you these things not because you need to completely understand them, but rather because I’d like to give you an appreciation for how thoroughly and seamlessly the environment has been integrated into IBM i. As a growing number of solution providers leverage PASE, it’s becoming more likely every day that you may be reaping the benefits of an application built to utilize the capabilities of AIX – and not even know it.

For those of you having an interest in a deeper understanding of PASE, perhaps looking for ways that you can further leverage the environment, I’ll follow up with another post featuring additional information, tips and useful resources in the near future. Meanwhile, join the conversation on Facebook and share your own comments and stories about PASE.

 

May 10, 2013

Making a Good First Impression, Then Making It Last

Our guest blogger today is Kathy Tri, a senior software engineer at IBM Rochester who functions as the technical lead and architect for IBM i install, upgrade, license management and Power System upgrades. She shares insights and information about her team’s ongoing efforts to deliver an exceptional client experience. Read it, and then join the conversation on facebook.

25withlogo (2).jpg
A positive out-of-box experience for clients deploying IBM i has been a key point of emphasis from day one, and will continue to be in the future. Much is owed to the integration of the operating system with key functions, such as security and database, and with IBM middleware like WebSphere Application Server. We package and test everything together as a fully integrated stack to ensure the quick and easy deployment of an IBM i system or partition. As technical lead and architect for installs and upgrades, my goal is to ensure an easy migration to a new release with minimal downtime. The key objective for the IBM i operating system and its related products is to enable our customers to run their businesses without having to worry about the computer. A common thread among customers running IBM i systems is that they plug it in and leave it alone. It just runs with minimal intervention. This is what we had in mind when we developed IBM i support for what we call n-2 (n minus two) upgrades. For example, if an IBM i customer is currently on release V5R4, they can directly move to release 7.1 without having to install 6.1. This allows a customer to remain on a release for at least four years before needing to move to a new release. While it would be wonderful if customers could always remain current with operating system releases and technical refreshes, we know this is often not possible.

Since customers may have more than one partition or system, we also support interoperability between systems that are one or two releases apart. In other words, interoperability allows clients to develop applications on a current release and deploy them to a release n-1 or n-2. Another out-of-the-box feature is that most customer data can be moved from any prior release of AS/400 to the current releases of IBM i. For example, just the other day I was asked about moving applications and data from a V4R2 AS/400 to IBM i 7.1 on a new POWER7 system. Indeed, most of the data and applications will move with minimal reconfiguration needed. This is not a typical upgrade, and I certainly wouldn’t recommend it as an upgrade strategy, but it is an example of how we try to ensure investment protection and ease of moving to current releases and hardware. In this case, the customer will have the applications they love and will be able to gradually take advantage of new functions available.

Today we offer a number of tools to help plan the install or upgrade of an IBM i partition. For example, the IBM Pre-upgrade Verification tool for IBM i ensures that key items have been completed before upgrading the operating system and related products. To allow for remote install and eliminate media errors, we encourage downloading your entitled software and license keys from the Entitled Software Support (ESS) site.

Once the media images have been downloaded, you can use the resulting image to upgrade or install a new partition. In addition, network install allows for remote install from a single media image, which makes it easier to deploy the release. If you want a good reference for this capability, download IBM i Network Install using Network File System. Meanwhile, the IBM i Information Center has complete information about planning and installing a new release of IBM i.

The virtual media, or network install, was very beneficial for an IBM i customer who had a system that was older than  five years. They wanted to move to a current release to take advantage of some new application modernization functions. Their dilemma, however, was they didn’t know where the physical box was anymore! No one had needed to do anything with the physical system for a few years and the building they were in had been remodeled. They were wondering if there was any way to upgrade without having to physically load the DVDs into the system. Using the virtual media that was downloaded from the ESS website, they were able to upgrade the system without touching the physical box. They eventually found the system, it had accidently been walled over!

The out-of-box experience has always been key to IBM i customers. Our goal has been to provide them with an exceptional client experience that yields fast time to value. The influence of this “plug it in and go” capability has also rubbed off onto new POWER environments. IBM PureSystems takes it another step and optimizes the complete solution stack, combining advanced IBM hardware and software along with patterns of expertise. The result is an optimized configuration that is fully integrated and simple to deploy. The rapid deployment capabilities of these systems provide a simplified experience. Individual elements of your IT infrastructure need not be separately acquired. As a result, customers can focus on delivering business value. Sound familiar?

 

 

 

May 01, 2013

Performance Reports With the Performance Data Investigator

Several weeks ago I wrote about the latest enhancements to the Performance Data Investigator in Performance Data Investigator – Better than Ever.

That article had the following paragraph:

Performance Reports
You now have the ability to generate performance reports from PDI. In the past, you could get text-based reports from the PT1 product, but these were difficult to analyze. The performance reports provide graphical views of the performance data and can be customized to report on the metrics that are important to you.

Note that this reporting feature is part of the latest Navigator for i Enhancements and you need to install the PTFs documented in that blog.

Let’s assume your manager wants a weekly update on the some key performance metrics for your IBM i partition from your peak timeframe. In this contrived scenario, we’ll say that is every Friday – we’ll pretend Friday is the busiest day for your business and there are some critical jobs that run each Friday night. Every Monday morning, your manager wants to review CPU utilization, page fault informationand disk performance information from that timeframe (he’s particularly concerned about several disk performance metrics since there have been ongoing concerns about disk performance). With the new reporting feature, you can easily create a report definition that contains the desired metrics. You can then generate that report every Monday morning by running the report over the Collection Services data from the critical timeframe of the prior Friday.

Let’s walk through how you do this. 

Reports are found by expanding Performance>All Tasks>Reports>Performance Data Report Definitions.

DawnMayPDIReport1

You will find three predefined report definitions. You can create your own report definition to get exactly the report you want.

The report definition is separate from the report itself. The report definition specifies what perspectives (a perspective is simply a chart or table) you want to include in the report. You can then run that report definition over your selected Collection Services collection to create the desired report.

For our scenario, we will create our own custom report definition that includes the metrics we are interested in. From the report definitions page, you select Actions>Add Performance Data Report Definition. This will bring up the page where you define your report. You give it a name and description, then use the Add button to chose the performance charts (perspectives) that will be contained within your report. When you are adding a perspective you get the same navigation tree you see when you use the Investigate Data task. You simply select the charts or tables you want included in your report.

In my example, we are using Collection Services data and we want the following charts:

  1. CPU Utilization and Waits Overview
  2. Page Faults>Page Faults Overview
  3. Disk>Disk Response Time>Detailed>Disk I/O Rates Overview - Detailed

For the Collection specified on the definition, we will let this default to the most recent collection in the default collection library (which is usually QPFRDATA). This is the collection that will be used by default when you create the report; you can override this setting when you create the report.

In the Cover Page field, you can add whatever text you want displayed on the first page of the PDF.

The report definition properties look like the following:

DawnMayPDIReport2

After you have created your report definition, you can then run that report over the desired performance collection, using the Actions>Create Performance Data Report, and when you do this, you have the ability to specify the collection over which the report will be run. In our contrived example, we would create the performance data report each Monday morning, selecting the Collection Services collection from the prior Friday.

 

DawnMayPDIReport3

 

In my example, I chose to generate my report as a PDF, which I can then share with others.

This reporting feature is extremely easy to use and very flexible. And you have it – it’s all part of Navigator for i; there is nothing for you to do except to make sure you have installed the latest PTFs required for Navigator.

Start using it today!

 

 

 

 

April 24, 2013

Integrate Web Services With DB2 for i 7.1 Part Two

This week's blog article was written by Nick Lawrence. Nick works for IBM in Rochester, Minn., on DB2 for IBM i. His responsibilities include full-text search for DB2 and SQL/XML. Thanks, Nick!

In part one of this two-part blog entry, the idea was introduced that DB2 for i could be integrated with a Web service, using the user-defined functions in the SYSTOOLS schema and the built-in SQL/XML support. Part one includes a number of links to information about the user-defined functions, and also to information on the built-in SQL/XML support. One important resource was a link to a whitepaper that provides the complete details for these functions.

The second part of this blog entry examines a specific scenario where the data from a Web service is converted into relational rows and columns.

Suppose that a delivery service stores its vehicles' fuel and maintenance costs in a DB2 for i database. In addition to the actual expenses incurred, the application's processing involves the weekly national average cost (per gallon) of fuel. In other words, an SQL query might reference the national average, or the average might be stored in the database for auditing purposes.

This problem has two parts to it.

  1. The database must retrieve an XML document that contains the current week's average fuel prices from a Web service (this example uses a Web service located at http://www.fueleconomy.gov).
  2. After retrieval, the XML document needs to be transformed into rows and columns.

Figure 1 is a diagram of this setup.

Figure 1 - Web service interaction with DB2 for i

Dawn1

Using the functions that have been provided in SYSTOOLS, we can use SQL to get the average fuel price for the current week as an XML document. This is accomplished using the HTTPGETBLOB function and is shown in Figure 2.

Figure 2 - Retrieve current fuel prices

VALUES
 XMLPARSE(DOCUMENT
   SYSTOOLS.HTTPGETBLOB(
     --- URL ---
     'http://www.fueleconomy.gov/ws/rest/fuelprices',

     --- HTTP request header ---
     '<httpHeader>
       <header name="Accept" value="application/xml"/>
      </httpHeader>'
   )
 )

In Figure 2, the URL identifies the resource that is to be obtained, and the HTTP request header indicates that the data should be returned in an XML format. The XML document that is returned from the Web service is shown in Figure 3.

Figure 3 - Returned XML document

<?xml version="1.0" encoding="UTF-8"?>
<fuelPrices>
  <cng>2.12</cng>
  <diesel>4.16</diesel>
  <e85>3.47</e85>
  <electric>0.12</electric>
  <lpg>2.56</lpg>
  <midgrade>3.89</midgrade>
  <premium>4.04</premium>
  <regular>3.75</regular>
</fuelPrices>

The XML document shown in Figure 3 is not useful in SQL unless SQL has a way of understanding the relationships and data defined by the document. Fortunately, the XML support in DB2 for i 7.1 includes the built-in XMLTABLE table function. Figure 4 shows a query that uses the XMLTABLE function to convert the XML document in Figure 3 into a result set (rows and columns).

Figure 4 - Current fuel prices as rows and column

SELECT fuel_prices.*
FROM
 XMLTABLE('fuelPrices' PASSING
  XMLPARSE(DOCUMENT
    SYSTOOLS.HTTPGETBLOB(
      --- URL ---
      'http://www.fueleconomy.gov/ws/rest/fuelprices',

      --- HTTP Request Header ---
      '<httpHeader>
        <header name="Accept" value="application/xml"/>
       </httpHeader>'
    )
   )

 COLUMNS
   "regular"  DOUBLE,
   "midgrade" DOUBLE,
   "premium"  DOUBLE,
   "diesel"   DOUBLE) fuel_prices;

Figure 5 shows the result set that was created by the query in Figure 4.

Figure 5 - Result set

  Dawn5

The query in Figure 4 is an SQL query, meaning that it can be easily incorporated into other SQL statements or queries that need to reference the data in Figure 5. An example of how to join data from a Web service with relational data is included in the whitepaper.

Although the HTTP GET request might be the most commonly utilized HTTP method, the SQL UDFs can also invoke the POST, PUT and DELETE HTTP methods. The additional HTTP methods can be invaluable for causing a Web service to take some action in response to an event that happens in a DB2 for i database. Some examples of these HTTP methods are included in the whitepaper.

The HTTP functions really make it easier to access Web services, allowing a software architect more time to figure out the most effective way to use the service. The built-in XML support allows developers and architects to spend their time utilizing the information in XML documents, rather than writing code to compose and decompose XML.

 

 

 

April 17, 2013

IBM i Single Level Store …. In Lieu of a Crystal Ball

25withlogo (2).jpg

When the System/38 was being architected, it was recognized that underlying hardware technology was subject to unpredictable change. While it didn’t take a crystal ball to understand that change would be inevitable, having one to forecast the future of storage technology sure would have been nice. But as we all know, there is no crystal ball. This reality led to the development of Single Level Store. A key feature of Single Level Storage (SLS) architecture is that it insulates the upper-level code from the specifics of the storage technology it uses. Along with the Technology Independent Machine Interface, TIMI (see Steve Will’s “TIMI - Protecting Investments and Integrity in IBM i”), SLS is a fundamental element of the design that has allowed IBM i to continue to take advantage of new capabilities seamlessly.

Single level storage makes memory and disk space one entity; you do not need to know where your programs or files are stored. When you access something, you request it by name, and IBM i will automatically find it for you. Is it already in memory? Super! If it’s not, the storage management component will find it, wherever it may reside on disk and bring it into memory. You don’t need to worry about where the disk is or what type of disk is used. You can easily add additional storage, including solid state drives, to your existing disk configuration. The storage management support effortlessly introduces disks to the system regardless of their capabilities or technological frameworks.

Let’s review some of the technical advantages at your fingertips with IBM i and SLS along with the integrated storage management it incorporates: 

  1. You can seamlessly optimize the use of solid state drives. This ability is an extension of automatic storage management. IBM i can automatically place your frequently accessed data on SSDs; IBM i with SLS manages your storage.

    But did you know that with the magic of SLS, you can also get immediate benefits of a very fast IPL by putting your load source on SSDs? Several IBM i clients have moved entirely from spinning disks to SSDs; substantially reduced IPL time was among the many benefits

  2. You can transparently add more disk capacity and automatically balance your use of that additional storage.
    It’s critical to have your data and files distributed across disk units to allow for parallelism when accessing that data; you do not want a single disk unit to become a bottleneck. IBM i’s storage management will do this automatically for you. You do have controls, such as trace and balance for fine tuning, but once you have a configured environment, IBM i will take care of it all for you.

  3. You are alleviated of the need to manage where your data is stored or the space allocated to file systems.
    On many non-i systems, you will find storage allocated to file systems. When the file system gets full, you will get errors until you either increase the size of the file system or delete files to free up space. There may be plenty of space available on the physical disk, it’s just not assigned to that particular file system.

    When I first started working with some software on a Unix environment and I discovered this requirement, I was dumbfounded. Why would anyone want to worry about how much storage is allocated to which file system? Why doesn’t the system take care of that for you? After all, there’s plenty of disk storage available!

IBM i Single Level Storage is well documented in the IBM i Information Center topic, IBM i Storage Management. Interestingly, this article is geared toward readers familiar with x86 storage architecture.

Other blogs on SLS include Steve Will’s “The “New” Value of Single Level Store” and Mike Cain’s “One of the Crown Jewels: Single Level Storage.”

Single Level Storage makes i easy.