iInstall.cmd, version 3 – an PC/iSeries utility

iInstall.cmdiInstall.cmd is a utility for installing objects on an iSeries.

iInstall.cmd is a Windows Command script that takes care of all the steps needed to install your software on an iSeries.

What you need to do is, to create a savefile with the objects that is to be distributed and transfer the savefile to your pc. Then configure the script, and test it. When it is ‘ready to go’ you could place the savefile and the script in a Zip file, just like the tools on this site and then it is ready for distribution.

Download

You will get a ZIP file. Unpack it to a folder on your pc and copy iInstall scripts to another folder and change it to fit your needs.

By downloading this utility, you agree to the conditions written in the paragraph ‘Liability’.

» Download

Documentation

First, prepare a savefile on the iSeries. Issue the SAVOBJ command and fill out the needed fields. You can use SAVLIB in which case the script will restore all objects from the library.

Second, using an FTP client, an IFS tool or similar, transfer the savefile to your pc. You should create a folder to hold the software package that you are in the process of making.

Third, copy iInstall.cmd and iInstallParm.cmd scripts into the folder, and then change the configuration in the bottom of the script iInstallParm.cmd to fit your needs.

Fourth, test the package by running the script. Did all go well? Yes? Good, your are finished 🙂 No? Fix it, and test again :-\

Working princip

iInstall.cmd uses the Windows FTP client to do the hard work. In the cause of the iInstall.Cmd script, several text files are created and parsed as input to the Windows command line FTP client. The output is captured and parsed in order to figure out, if the step went as excected or not.

There are two prerequisite for making this script work painless:

  1. The user of the script must supply a iSeries user profile that do not have ‘Limited Capabilibies’ (userprofile keyword LIMIT(*NO) )
  2. The FTP server must allow commands to be issued by user profiles that do not have ‘Limited Capabilities’.

When you prepare the objects to be distributed, take into account, what userprofile that owns the objects. If you have compiled the objects and your userprofile is not connected to a Group profile or it is connected to a Group profile but the OWNER() keyword on your userprofile is set to *USRPRF, changes to the objects authority will occur when they are restored, and it will give return an error to the script. The easy way around this is to change the owner of the objects before you save them to a savefile, and let the objects be owned by, e.g., QPGMR. You can use my tool Change Owner by Object to do that easily.

If all this sounds like rubbish to you, you should search for articles on Adopted Authority.

Many shops have a kind of software installed, that will monitor usage of the FTP server, and the software will restrict the usage of commands issued by a FTP client. One such tool is ‘PC Security’ from IBM Denmark. Feel free to leave a comment, if you know of other such tools.

The script has been developed and tested on Window XP, Windows 7, Windows 8.x and Windows 10. Future and other versions of Windows might not work with the tool, as the syntax for the FTP client might change.

What’s new in version 3?

  • Coloring engine has been changed for a more robust one.
  • It is now possible to have a License Agreement text displayed to the user. See the file iInstallParm.cmd for further information.
  • A new Windows Command File is included, SavLib.cmd. This Command File allows you to save a iSeries library to a savefile on the PC, ready to use with iInstall.cmd.

What’s new in version 2?

  • The configuration has been separated into the script iInstallParm.cmd in order to make it more easy the edit the needed configuration parameters.
  • Text is now displayed in colour.
  • In case of error, a complete log file is created. It is normally called ‘iInstall.log’ and reside in the folder where you placed iInstall.cmd and iInstallParm.cmd.
  • The script now supports to be renamed. If you choose to rename iInstall.cmd to another name, e.g. SuperTool.cmd, you must also rename iInstallParm.cmd to SuperToolParm.cmd. If errors occur, the log file created will be named SuperTool.log.

Known issues

The tool is object based, that is, it will use the RSTOBJ command when restoring the content of the savefile. However, RSTOBJ OBJ(*ALL) and RSTLIB are same-same.

I have currently no plans to create a similar tool for Linux. If you know of one or have transformed this script into a Linux version, please leave a comment about that, and a link.

Liability

This utility is delivered ‘as is’. Neither Jesper Wachs nor anyone else who has been involved in the creation, production or delivery of this product shall be liable for any direct, indirect, consequential or incidental damages (including damages for loss of business profits, business interruption, loss of business information, and the like) arising out of the use or inability to use such product even if Jesper Wachs has been advised of the possibility of such damages.

© 2014 – 2016 by Jesper Wachs. All rights reserved.