iCan Blog Archive

IBM i is an old friend. We programming geeks of golden age have been writing reliable business programs for years on IBM i. Our IBM i has protected our programming investment like a family member—operating system releases, hardware upgrades, no matter, our programs still run our businesses decades later. Unlike so many other business machines we shall not name, we people of IBM i, can truly say we got a good business deal with our IBM i.

After last week’s blog, Tony Cairns had a few more things to say about PASE, so once again, here’s Tony:

Over many years, we formed strongly held beliefs about our machine comrade of many names, S/38, AS/400, iSeries, System i, IBM i. Admitting marketing folks move in mysterious ways, whatever the name, we know this machine comes with a fantastic integrated DB2 database, operational controls of a mainframe (simplified), undeniable security features, great communications, elegantly simple business languages like RPG, sophisticated object oriented languages like Java and much more—all integrated, all tested, all works. Yes, I would venture to say we all know what this machine can do … or do we?

Last week, I addressed two of these widely held myths about our IBM i: 

Wrong: IBM i cannot run popular Open Source (zip/unzip, gunzip, curl, etc.).
Wrong: IBM i ILE RPG and PASE programs don’t mix.

This week, I want to address two more:

Wrong: IBM i has no GUI.
Wrong: IBM i “command line” means 5250.

Let us tour the PASE twilight zone, where our IBM i is just getting started …

IBM i has a GUI?

Yes. In fact, free application development right on your IBM i machine is easy. Look mom, no green screen! I use ssh -X adc@mysystem, PASE GUI editor nedit every day, to edit PHP, RPG, Ruby, etc. 

DawnFIG1

How?

Make sure 5770SC1   *INSTALLED   OpenSSH, OpenSSL, zlib
go licpgm
Enable X11Forwarding yes sshd_config file
/QOpenSys/QIBM/UserData/SC1/OpenSSH/openssh-4.7p1/etc/sshd_config
X11Forwarding yes

Note:
OpenSSL versions change /openssh-4.7p1 is example, so check your version.

Call qp2term … after ssh running, may be last time you use qp2term

> cd /QOpenSys/QIBM/UserData/SC1/OpenSSH
> ls

Start sshd on IBM i 

            STRTCPSVR SERVER(*SSHD)

Use an X server capable laptop with ssh installed

xhost + lp0364d   … only 1st time usessh -X adc@lp0364d … my V7R1 machine (works on v5r4+)

Note:

            Linux – works out of box (Red Hat, Ubuntu, etc.)
Mac – I think works out of box (X always included, not sure ssh)
Windows – Oh pesky Windows, load both ssh and cygwin/X ( http://x.cygwin.com/ ) 

Need copy of PASE GUI nedit?

            On YIPs: http://www.youngiprofessionals.com/wiki/index.php/PASE/Shell

            SHELL_use-n.n.n.zip … other interesting PASE things as well

AIX download: http://sourceforge.net/projects/nedit/files/nedit-executable/5.5/nedit-5.5-AIX.tar.gz/download

IBM i command line, but no 5250? 

In the previous example, we already demonstrated another IBM i command line using ssh adc@lp0364d.

So, hear ye programmers of IBM i, if ye be tired of behavior less stellar on 5250-based qp2term and qsh, give ssh a try. And don’t forget, you can switch to your favorite shell right after you signed on. Personally I like tcsh—tab file path completion, backspace/delete actually work, a thing of beauty (pardon, my geek is showing again).

ssh -X adc@lp0364d  … off to IBM i we go (w/graphics turned on, see previous) 
> tcsh … I complied from open source, but you can find binaries for AIX/PASE with Google
> cd /www/zendsvr/htdocs/tests/xmlservice/
> nedit test_20426_ZZVARY_toolkit_pgm.phpt &  … screen shot previous section

Want to develop RPG with ssh -X?

No problem. 

ssh -X adc@lp0364d  … off to IBM i we go (w/graphics turned on, see previous) 
> e easyRPG.rpgle &
> system -i “CRTRPGMOD SRCSTMF(‘/www/zendsvr/htdocs/Samples/SHELL_use/easyRPG.rpgle’) DBGVIEW(*SOURCE) OUTPUT(*PRINT) REPLACE(*YES)  MODULE(QGPL/EASYRPG)”
> system -i “CRTPGM PGM(QGPL/EASYRPG) MODULE(QGPL/EASYRPG)”

Want to know more?

On YIPs: http://www.youngiprofessionals.com/wiki/index.php/PASE/Shell

This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.