SAP on IBM i – Update week 14, 2016 – Problems Starting the SAP Software Update Manager on IBM i and Mistakes Using QSH vs. QP2TERM
The “i” in platform name IBM i stays for “integrated”. Besides the traditional command line interface, there are many other software products, components and features, such as
- The relational SQL database DB2 for IBM i
- Hardware virtualization solutions and logical partitioning
- Internet server and services, e.g. IBM WebSphere or Apache web server
- Modern business software such as SAP NetWeaver based products
- Command shells as known from Unix like operation systems
IBM provides two different Unix-style shells for platform IBM i. The look & feel of them is pretty much the same, but their underlying fundamentals are quite different. The screenshots below show the different screen title to distinguish between the two environments. Both shell environments have their advantages. It depends on your use case which one should be used.
Command prompt started by command QSH
Command prompt started by CALL QP2TERM
The QSH environment exists since many OS releases and can be installed via Option 30 of the operating system – Qshell Interpreter. IBM gives a good overview about it in the IBM Knowledge Center at web page QShell. This environment is able to run IBM i ILE programs beside common shell scripts and Java programs. It provides capabilities to convert text from EBCDIC to ASCII and vice versa based on the coded character set identifier (CCSID) of the job that started QSH. Environment variable QIBM_CCSID can be used to specify a certain target codepage for files created by scripts running in QSH. By default, this variable is set to “0” which means the CCSID from the job that started the QSH command is taken. This is usually an EBCDIC codepage.
The program QP2TERM is part of the Portable Application Solutions Environment for i (PASE for i). If not yet present, you can install it with Option 33 of the operating system – Portable Application Solutions Environment. This environment is intended to enable an easy porting of AIX applications to IBM i. However, like all Unix shells, it does not provide codepage conversion features for text files processing. A good overview can be found in the IBM Knowledge Center at IBM PASE for i. SAP software uses this environment in order to share as much source code as possible with Unix platforms.
When choosing the right shell for SAP tools (QSH or QP2TERM), you need to consider if all involved tools for the given task support codepage conversion for text file processing. SAP’s general upgrade tool SUM (Software Update Manager) consists of a set of different program types and technologies. For platform IBM i it contains PASE and ILE programs built explicitly for this platform, as well as Java programs and Unix shell scripts that are able to run directly on any Unix platform (IBM I, AIX or Linux). Thus it requires to have a well-defined setup to operate independently from languages and codepages. Since the platform independent parts of SUM cannot deal with EBCDIC data, SAP has decided to maintain all files accessed by the SUM in ASCII CCSID 819. In order to avoid dependencies on user profile settings, SAP requires to use CALL QP2TERM rather than QSH for all operations in conjunction with the SUM.
Since the shipment of SUM SP14, we have seen a variety of problems due to unexpected languages or codepage settings that could be traced back to the usage of QSH by user profile QSECOFR (rather that an SAP user profile). The initialization of the SUM procedure requires to execute the Unix shell script STARTUP by QSECOFR or a similar privileged user profile. See SAP Note 2300946 – IBM i: Analysis of start problems with Software Update Manager (SUM) to verify that your job is configured correctly when starting the SUM or when experiencing problems during the usage of the SUM.