Between major IBM i releases, IBM ships frequent enhancements using the Technology Refresh (TR). Particular features are present with specific TR levels. SQL offers an easy way to identify the latest TR level on an IBM i system.
IBM i services comprise a collection of DB2 and SQL objects that provide a wealth of system information. The GROUP_PTF_INFO view will display an IBM i’s TR level to the user who runs this SQL:
|
|
SELECT CURRENT SERVER CONCAT ' is running ' CONCAT PTF_GROUP_TARGET_RELEASE CONCAT ' with TR level: ' CONCAT PTF_GROUP_LEVEL AS TR_LEVEL FROM QSYS2.GROUP_PTF_INFO WHERE PTF_GROUP_DESCRIPTION = 'TECHNOLOGY REFRESH' AND PTF_GROUP_STATUS = 'INSTALLED' ORDER BY PTF_GROUP_TARGET_RELEASE, PTF_GROUP_LEVEL DESC LIMIT 1; |
When run on my server, the result was a single column, TR_LEVEL, with the value:
|
|
SEIDENI is running V7R2M0 with TR level: 3 |
Time for me to upgrade, yes?
Here is my original post with older techniques:
I recently needed to know if a client’s IBM i 7.1 system had Technology Refresh 4 (TR4). If it did, I could use the relatively new INSERT with remote SUBSELECT technique, which allows a single SQL statement to copy DB2 data from one partition to another. Such are the benefits of keeping current with Technology Refreshes.
After reading an article on TRs by Steve Will, I decided to document how to determine which TRs are installed on an IBM i system.
TRs, which were introduced with IBM i 7.1, are packaged as Program Temporary Fixes (PTFs). They can be found with the DSPPTF command.
First, determine the product number of the licensed internal code of your system. For 7.1, the product number is 5770999.
Then use the DSPPTF command followed by this product number. For example:
When run on my test system, this command produced a list of PTFs that included MF99007, MF99006, MF99005, MF99004, MF99003, MF99002, and MF99001.
Because Technology Refresh PTF numbers follow the format MF99nnn, where nnn is the TR number (bolded above), I knew that TR7, TR6, TR5, TR4, TR3, TR2, and TR1 were available. I was pleased to learn I could use TR4’s enhancements to DB2.
Overcome SSH ‘Permission denied’ for long IBM i user profiles
/4 Comments/in IBM i, PHP /by Alan Seiden[UPDATED May 2023]
In IBM i releases before 7.4, IBM i’s Secure Shell (SSH) rejected connection attempts with user profile names longer than eight (8) characters. The error message can vary, but may be similar to “Permission denied, please try again” or “Failed to connect sshd.”
For those older releases (7.3 and earlier), you can allow user profiles longer than 8 characters by editing the file:
/QOpenSys/QIBM/UserData/SC1/OpenSSH/etc/sshd_config
and adding a new line containing the string:
ibmpaseforienv PASE_USRGRP_LIMITED=NTo apply your changes, end and then start the SSH server, like so:
An alternative is to set the variable system-wide, to allow other PASE processes to use the improvement:
For more details about configuring SSH, see How to Configure and Use SSH on IBM i.
Free webinars sponsored by COMMON Europe (open to all)
/0 Comments/in Apache, IBM i, Performance, PHP, RPG, Web development /by Alan SeidenStarting January 27, 2015, I’ll be giving three free Tuesday webinars:
All three one-hour webinars will be held at 14:00 Central European Time (CET). That’s 8 AM Eastern Standard Time (EST). The registration page includes a time zone converter.
Details and to register: http://www.data3.se/?p=5287
Thanks to Torbjörn Appehl of Data3 (COMMON Sweden) for organizing these.
Youngiprofessionals.com transition to new server
/0 Comments/in News & Events /by Alan SeidenUpdate as of Jan. 26, 2015: youngiprofessionals.com now redirects to the new server.
————-
The youngiprofessionals.com site, which hosts XMLSERVICE, has been moved to a new server. Till the domain name can be directed to the new server, use this URL: http://yips.idevcloud.com/wiki/.
January newsletter
/0 Comments/in IBM i, News & Events, PHP, Web development /by Alan SeidenI’ve relaunched my PHP and IBM i newsletter. Here is the January 2015 edition, out today.
To subscribe and receive this free newsletter each month, go here: alanseiden.com/tips.
Comments welcome. Happy 2015–
Alan
Learn to combine RPG+PHP at Toronto user group, Jan. 21, 2015
/2 Comments/in IBM i, PHP, RPG, Web development /by Alan SeidenI’ve recorded a special message about my upcoming presentations at the Toronto Users Group for Power Systems evening meeting on January 21, 2015:
In the video, I discuss the two sessions I’ll be presenting:
Hope you can make it to the Toronto meeting, Jan. 21, 2015, Markham, Ontario. Details: http://tug.ca
Free PHP still exists on IBM i (Zend Server Basic Edition)
/5 Comments/in IBM i, PHP /by Alan SeidenUPDATE: As of 2020, we recommend using Seiden PHP on IBM i and LINUX for reliability, speed, and ease of maintenance.
I’ve been hearing from people confused about Zend Server editions on IBM i. Yes, Community Edition was removed with Zend Server 7/8, but Zend replaced that with the no-charge “Basic” edition. The Basic edition exists only on IBM i. It requires registration but at no cost. Zend Server for IBM i can be downloaded here.
While I often recommend the Professional or Enterprise editions of Zend Server for the value-added tools and for Zend’s professional support, rest assured that free PHP still exists, with the Basic edition.
For more information, here is the current list of Zend Server editions for IBM i.
[Update: See PHP 7 and Free Basic Zend Server Edition for IBM i ]
Save your fingers when using PHP-CLI
/1 Comment/in IBM i, PHP /by Alan Seiden2021 Update
The instructions in this blog post contain outdated paths and file names.
To learn the modern way to “save your fingers”—plus additional tips for setting up PHP on IBM i—refer to these two articles in our Open Source Documentation library.
With the Seiden CommunityPlus+ PHP binary, which is php, not php-cli.
After you set the path, you can use
php myscript.phpIn Batch PHP I showed how to call PHP from a command line. For example, with Zend Server 6 or 7 on IBM i, one would launch a PASE command line using the command CALL QP2TERM, or launch QShell using QSH, then type a command such as this:
For those of us who use PHP-CLI often, the above command can be a finger-buster. Let’s shorten the path by creating a symbolic link:
I created the symbolic link in /usr/bin, a directory that is likely to be in any user’s path.
Now try the shortened command:
To test the shortcut without a PHP script, use the -v switch, which requests version information (‘v’ for version) about your PHP installation.
The above command will return version information that starts out something like this:
By creating a symbolic link to the PHP-CLI binary, practitioners of PHP can speed their work while saving their fingers.
For more about symbolic links, see my article Link up with QShell.
Zendcon 2014 promo video for IBM i users
/0 Comments/in Db2 for i, IBM i, PHP /by Alan SeidenAbout Zendcon:
Find the Technology Refresh (TR) level of an IBM i
/9 Comments/in Db2 for i, IBM i /by Alan SeidenBetween major IBM i releases, IBM ships frequent enhancements using the Technology Refresh (TR). Particular features are present with specific TR levels. SQL offers an easy way to identify the latest TR level on an IBM i system.
IBM i services comprise a collection of DB2 and SQL objects that provide a wealth of system information. The GROUP_PTF_INFO view will display an IBM i’s TR level to the user who runs this SQL:
When run on my server, the result was a single column, TR_LEVEL, with the value:
Time for me to upgrade, yes?
Here is my original post with older techniques:
I recently needed to know if a client’s IBM i 7.1 system had Technology Refresh 4 (TR4). If it did, I could use the relatively new INSERT with remote SUBSELECT technique, which allows a single SQL statement to copy DB2 data from one partition to another. Such are the benefits of keeping current with Technology Refreshes.
After reading an article on TRs by Steve Will, I decided to document how to determine which TRs are installed on an IBM i system.
TRs, which were introduced with IBM i 7.1, are packaged as Program Temporary Fixes (PTFs). They can be found with the DSPPTF command.
First, determine the product number of the licensed internal code of your system. For 7.1, the product number is 5770999.
Then use the DSPPTF command followed by this product number. For example:
When run on my test system, this command produced a list of PTFs that included MF99007, MF99006, MF99005, MF99004, MF99003, MF99002, and MF99001.
Because Technology Refresh PTF numbers follow the format MF99nnn, where nnn is the TR number (bolded above), I knew that TR7, TR6, TR5, TR4, TR3, TR2, and TR1 were available. I was pleased to learn I could use TR4’s enhancements to DB2.
ZendCon+Tutorial discount expires Aug. 31
/1 Comment/in Db2 for i, IBM i, PHP /by Alan SeidenZendCon, the premier PHP conference, October 27-30, 2014, in Santa Clara, California, has a discount expiring August
1531 (extended!). When you register, be sure to include the tutorial day (Oct. 27). If you already registered but forgot to add the tutorial day, you can contact the organizers via a link at the bottom of the registration page. Among other half-day tutorials, I’ll be presenting two focused on IBM i:—Mike Meszaros, Software Developer, Specialty Pipe & Tube
My co-presenter for tutorials will be IBM’s Tony Cairns, who helped bring PHP to the IBM i in the first place. He also created XMLSERVICE (toolkit back-end) and is a maintainer of ibm_db2 on the IBM i. One reason Tony comes to ZendCon is to hear from attendees such as yourselves. Normally he stays locked up in his lab. Take advantage of this opportunity to meet him. Watch Tony and me argue and debate in front of the class!
I’m also presenting a session during the regular conference about the PHP Toolkit for IBM i. I’ve updated my presentation with new features of the toolkit and best practices for calling RPG and COBOL.
ZendCon‘s topics are generally advanced ones to enable professional, enterprise-ready development practices. There’s also an IBM i track and plenty of networking time so that IBM i users of PHP can learn from speakers and each other, making the conference appropriate for intermediate users of PHP on IBM i as well.
Hope to see you there, October 27-30, 2014! Remember to register for tutorial day when you register for the conference. Get in touch with questions you’d like answered during my presentations.