Something that was added to the SAVOBJ and SAVLIB commands in IBM i release
6.1 V5R4 was the ability to compress data more than before when saving to a save file. Previously the only options that were available for the Data Compression parameter was *DEV, *NO, and *YES. With 6.1 V5R4 three new compressions levels were added:
Note: These three values are not valid when saving to tape.
What is the benefit of using any of these Data Compression values?
On a quiet Sunday afternoon I decided to put this to the test. It does not matter the processor size of the IBM i I performed the testing upon as the numbers generated are purely comparable. If you perform a similar test on your IBM i you might get different numbers, but I am sure that the differences will be comparable.
I took a large physical file and saved it using the SAVOBJ command using the following parameters:
SAVOBJ OBJ(FILE) LIB(MYLIB) OBJTYPE(*FILE) DEV(*SAVF) SAVF(QTEMP/SAVEFILE) DTACPR(value)
I used all of the types of data compressions:
- *DEV - This only compresses if the save is to tape. Otherwise it should be the same as *NO.
- *NO - No compression is performed.
- *YES - As the save is being performed to a save file this should be the same as the *LOW.
The results were…
As expected the higher level of compression the smaller the file and the longer the save operation takes. What is interesting is the difference in size between the size of the compressed save file. By using the *HIGH compression the save file can be only 14.9% of the size of the original.
What would I do? As I have mentioned in previous posts I do spend time sending files and programs between 11 different IBM i partitions and servers. If I have a large number of objects or large (big) files to send to another IBM i server I would use the *HIGH compression level to create a smaller save file. It will then take less time for FTP to copy the save file from one IBM i to the other.
More information about these keywords can be found on the IBM website:
This article was written for IBM i 7.1, and it will work with
6.1 V5R4 and higher releases too.