Longpela Expertise logo
Longpela Expertise Consulting
Longpela Expertise
Home | Press Room | Contact Us | Site Map
FAQ


LongEx Mainframe Quarterly - November 2010
 

technical: Pimp up z/OS with UNIX Systems Services for Free

It's been 16 years since IBM introduced UNIX functionality in z/OS through UNIX Systems Services (USS). However today few really make use of USS and the bounty that it brings. This article looks at some unexpected benefits that can come from USS that cost nothing but CPU seconds.

It isn't news that UNIX Systems Services (USS) brings the world of UNIX to z/OS. To most z/OS sites this means FTP for file transfers, TN3270 for 3270 terminal emulation, and web interfaces to some traditional z/OS systems software. But this is only the beginning of what USS brings to the table. From a world of freeware that can now run on z/OS to extra tools and functionality, USS can bring a renaissance to z/OS: more functionality, more utilities, and easier access.

1. More Application Development Options

For anyone uninterested in learning traditional languages like COBOL or PL/1, USS will be their best friend. More popular languages such as C, C++ and Java are now viable and mature options for developing applications; even in traditional environments like IMS and CICS.

In particular Java has been moving to the mainstream, with Java support for CICS and IMS applications. The free jZOS toolkit can be downloaded from IBMs website, and eases the pain of creating Java applications that run in batch or from a USS shell, and access z/OS services and facilities.

C and C++ aren't far behind, with many vendors beginning to port C applications from other UNIX platforms to z/OS.

PHP and Perl are two more optional languages that can be downloaded free from IBM. A python port is also available from Jean-Yves Mengant, and Ruby on Rails has been run under Websphere Application Server on z/OS.

Application developers also have more control over where they create and compile their applications. HLASM, COBOL, C/C++ and PL/1 compilers, along with the binder, can be called from TSO/E, batch or a USS shell. Application development from a 3270 client is no longer compulsory, and application developers can possibly escape without learning JCL. What's more, IBM is heavily promoting Eclipse-based technologies to develop z/OS applications in new and old languages with their Rational Developer for System z product.

2. z/OS as a Web Server

Facilities allowing z/OS to act as an HTTP server are nothing new. IBMs HTTP Server was available from the early days of USS, and is today a port of the popular Apache HTTP server.

Other z/OS subsystems, including CICS and RMF, have their own HTTP server capabilities in an effort to ease administration and offer new functionality. CICS has also offered HTTP server functionality since CICS TS 1.1, allowing CICS programs to update CICS Documents to produce dynamic web pages.

CICS Web Services further opens the CICS door to Web Services with a SOAP gateway; IMS provides similar functionality using IMS Connect and the IMS SOAP Adapter.

Web applications on J2EE servers are also mainstream on z/OS. IBM has been pushing Websphere Application Server as their flagship J2EE product for many years. However Apache Tomcat has now been ported to z/OS, providing a free, lighter-weight option.

3. Create Image Files from z/OS

z/OS has never been good with images. GDDM has traditionally been the sole option, and although it can create GIF and CGM images, it isn't free or easy to use. However USS opens up some other interesting alternatives.

The JPEG library is a tool that applications can use to create JPEG images, and has been the mainstay of many UNIX applications. The JPEG library is now available on z/OS. Similarly the Libpng library gives applications a way to create PNG files.

Thanks to z/OS Java, free open source software from Apache can now considered. One example is Apache FOP, providing functionality to create several image files, including PNG.

Finally, the Boutell GD library allows programs to dynamically create PNG, JPEG and GIF images.

4. Read and Write Windows Compatible Files from z/OS

Creating Windows compatible files such as Word, Excel, RTF, PDF and zip is now possible from z/OS. Lionel Dyck has created fee software to convert text to CSV (for spreadsheets), HTML, PDF and RTF (for word processors) formats. Apache FOP can also be used to create many different print output formats, predominately PDF.

The free UNIX zlib will create and read pkzip format files, and is used by many UNIX commercial applications. Another free option is Info-ZIP, which can read Windows zip files. And of course tar files can be created and read using the UNIX tar command.

Finally, the Apache POI project provides Java programs with functionality to read and write Office Open XML and OLE2 documents. Or in other words, read and write Microsoft Excel (xls and xlsx), Word (doc and docx) and PowerPoint (ppt and pptx) files.

5. Browse the Internet

The free Lynx is a text based internet browser that can give z/OS applications access to the Internet

6. Email from z/OS

Sending emails from z/OS components is becoming mainstream for many z/OS users. z/OS Communications Server includes an SMTP server that will route emails between JES spool and TCPIP clients, and other SMTP servers.

There are a few different SMTP client options to use with this SMTP server:

  • The TSO/E SMTPNOTE command is a very basic interface for sending emails.
  • Lionel Dyck has written XMITIP, a free SMTP client application. It includes command and ISPF functionality, and can be used to send HTML format emails and file attachments.
  • Dignus have published C code that can be used to send emails from batch.
  • For users interested in sending email from application programs, Andy Robertson has created freeware that can be called using a CALL or EXEC CICS LINK statement.
  • Other products such as the SAS language provide some SMTP client functionality.

The z/OS SMTP server isn't the only option for forwarding emails. The popular UNIX freeware SendMail can run on z/OS, and is well documented in the Communications Server IP Configuration Guide. Another option is to simply code a TCPIP sockets program using something like C or REXX/Sockets to send the information directly to an SMTP server. Schunk Associates gave a Share presentation in 1999 that explains REXX/Sockets.

Alan Nichols in Germany has ported the free PGP (Pretty Good Privacy) to z/OS, providing a quick and easy way of encrypting emails.

Planet MVS has an excellent page discussing email from z/OS. IBM provide free CICS to SMTP samples on their website.

7. z/OS as a Data and File Server

z/OS has traditionally been a central information repository. Large quantities of data has been kept in database managers such as DB2 and IMS for decades; with exceptional data availability, security and performance. These database managers now use USS to give access from applications outside of z/OS. For example:

  • DB2 DDF provides a gateway between DB2 on z/OS and other relational database systems on non-z/OS systems.
  • From IMS 11, IMS Open Database allows applications on remote systems to access DLI databases using SQL statements.
  • CA Datacom supports JDBC and ODBC access.

The advantages don't stop with databases. Non-z/OS users can also access z/OS traditional datasets and USS files:

  • z/OS comes with the z/OS SMB server, allowing Windows users to quickly and easily see and access both traditional and USS files on z/OS. The UNIX based SMB freeware Samba is another SMB option for z/OS.
  • z/OS comes with an NFS server, allowing other UNIX systems (and Windows with Hummingbird Maestro) to access both traditional and USS files on z/OS using an NFS client. z/OS also includes an NFS client to access remote file systems on servers with an NFS server.

z/OS can also be a library manager, storing books and manuals in both BookManager and PDF formats. Users can search, browse and download them via a web browser.

Finally, the z/OS Remote Print Server that comes with Communications Server allows line print clients on any remote UNIX system to print to z/OS JES connected printers.

8. Other Options

The popular and free MySQL database manager can be run on z/OS. This allows z/OS to become a more 'standard' web host with PHP/MySQL applications. Couple this with Apache Tomcat, and you have a very powerful web hosting tool.

Dovetailed Technologies demonstrate just how powerful in their document explaining how to create a z/OS based Wiki.

The True Cost of Freeware

All the above options provide exciting ways to 'pimp up' z/OS: sharing data, accessing the Internet, sending emails, creating dynamic images and providing leading edge web hosting services. However, though these options are free, in reality any extra processing on z/OS is rarely free. USS files often consume more DASD space than traditional z/OS datasets. Any USS process will consume CPU resources, and this can increase dramatically when running complex Java applications without a zAAP processor. Wise systems programmers will measure the real cost before moving any of these features into production.

Most of the options mentioned are freeware that has been ported from other UNIX systems to z/OS. Some of this freeware is mature and popular on z/OS. It is stable with many users contributing information and problem solving information to the community. Other freeware is more exploratory, and may need significant technical work to get running. Either way freeware can be a two-edged sword, with no vendor support available. Critical applications would be wise to stay away from any unsupported software.

References


David Stephens



LongEx Quarterly is a quarterly eZine produced by Longpela Expertise. It provides Mainframe articles for management and technical experts. It is published every November, February, May and August.

The opinions in this article are solely those of the author, and do not necessarily represent the opinions of any other person or organisation. All trademarks, trade names, service marks and logos referenced in these articles belong to their respective companies.

Although Longpela Expertise may be paid by organisations reprinting our articles, all articles are independent. Longpela Expertise has not been paid money by any vendor or company to write any articles appearing in our e-zine.

Inside This Month

Printer Friendly Version

Read Previous Articles


Longpela Expertise understand z/OS. We can help administer your systems, train your staff, and provide locum Systems Programmers for short periods. Contact us to get your own z/OS administration expert.
© Copyright 2010 Longpela Expertise  |  ABN 55 072 652 147
Legal Disclaimer | Privacy Policy Australia
Website Design: Hecate Jay