So, I was trying to help out a buddy in the land of IBM i today. He was trying to install the most recent Beta of Projex4i IBM i Powertools on a clients IBM i Server. The problem he was facing was two fold (a) the connection he was using was very slow so trying to FTP 120+MB onto the machine was taking an age and (b) the FTP setup had blocked access to libraries on the box.
After some serious head scratching, I came up with a way of copying a compressed ZIP upto the IBM i System, and placing this nice small ZIP straight into the IFS. It makes perfect sense to transfer the smallest size possible and then extract (unzip) the file on the IBM i box itself, converting it to a regular *SAVF and then restoring the library. *BOOM*
I gotta write this down before I forget it:
We actually have two problems here:
So, lets start out by taking the latest version of IBMi Powertool Library from https://software.projex.com/download
This downloads a ZIP file called PROJEX4I.ZIP which contains a PC version of an IBM i *SAVF – for this example we are assuming its called PROJEX4I.FILE
The ZIP file contains a compressed LIB(PROJEX4I) – thus reducing the 127MB file to a mere 27MB. This screenshot shows these files in a windows folder on our local PC:
We are going to do this:
So lets do it…
Log into your IBM i Server and lets create an IFS folder to hold the ZIP file that we are about to send to the IBM i Server:
MD DIR('\projex4i-install') DTAAUT(*RWX) OBJAUT(*ALL)
Now lets flick out into our Windows environment because we want to upload the ZIP file from our PC into the IBM i IFS
COPY/PASTE the ZIP to the IFS folder on your IBM i Server from windows.
NOTE: You can also use IBM i Navigator to do this. As long as you end up with the ZIP file living in to the IFS Folder that you just created, its not really important how you do it.
In all the screen shot examples here my IBM i Server name is \\your-ibm-i-server\
Log into your IBM i Server and lets use JAVA to unzip it locally:
Now we are going to use JAVA to *unzip* our distribution file into the same folder:
STRQSH CMD('jar -xf projex4i.zip')
now it an unzipped file and we can use the IBM i TP Server to extract it back into itself and also create a *SAVF along the way.
Check it unzipped OK
WRKLNK OBJ('/projex4i-install/*.*') OBJTYPE(*ALL) DETAIL(*EXTENDED) DSPOPT(*ALL)
now we gonna create a SAVE file for it
We are going to put this in a working library called LIB(PROJEXDST)
DLTLIB LIB(PROJEXDST) /* just in case it exists then delete the old one first */ CRTLIB LIB(PROJEXDST) TYPE(*TEST) TEXT('New installation Library for Projex4i') AUT(*ALL)
Lets use FTP to extract from IFS and create a SAVE FILE
ftp IBM-i-Server enter user/password namefmt 1 bin put /projex4i-install/projex4i.file /qsys.lib/PROJEXDST.lib/projex4i.savf
use QUIT to leave FTP mode
Now lets check that the SAVF was created OK
which should look like this:
now go out and restore the lib
RSTLIB SAVLIB(PROJEX4I) DEV(*SAVF) SAVF(PROJEXDST/PROJEX4I) RSTLIB(PROJEX4I)
now you need to just run PROJEX4I/@INSTALL
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
How to capture IBM-i job info for submitted jobs
How to Install IBM Access Client Solutions (ACS)
Funky IBM i Email Validation Program using SQL Regex
How to Update IBM i ACS Access Client Solutions
#IBMi Java – Avoiding the QSH “Press ENTER to end terminal session” message
Windows Setup for IBM i Developers
Use RDi to make RPGLE lowercase
I remember the IBM AS400
What is JSON_TABLE on IBM i?