• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • IBM i and Zip Files

    January 11, 2012 Ted Holt

    You may have heard of the new zip file APIs–QZipZip and QZipUnzip–that IBM added to IBM i 7.1. I am looking forward to using them. But if your shop is like mine, that is, you’re not running 7.1, there’s another way to work with zip files, and it does a good job.

    The other way is the Java Archive utility, or jar. It’s an easy command to use, and it runs under Qshell. Here’s how it works.

    The jar command has several parameters. First is a case-sensitive list of options. You will always need a lowercase “f” option.

    Second is the name of the jar or zip file. Whether you need additional parameters or not depends on the list of options.

    I think the best way to show you how to use jar is to provide some examples. First, here’s how to create a zip file called “files.zip” to contain files “file01.txt” and “file02.txt”.

    jar cfM files.zip file01.txt file02.txt
    

    Option “c” means that the archive file is being created. Option “f” means that the second parameter contains the archive filename. Option “M” tells jar not to create a manifest file. Notice that “M” is uppercase. You don’t have to know what a manifest file is.

    The files to be zipped are named in the third and following parameters. These file names may include wildcards.

    Now view the contents of the archive.

    jar tf files.zip
    

    Option “t” means to view the list of files in the archive.

    Extract the files from (unzip) the archive.

    jar xf files.zip
    

    Option “x” stands for “extract”.

    Add another file, “file03.txt”, to the archive.

    jar ufM files.zip file03.txt
    

    Option “u” means to update the archive. Notice option “M” again.

    I assume you’ll be exchanging archive files with PCs. If so, be aware that you need to create IFS files with a code page that other systems can use, such as 819 (one of the ASCII code pages).

    For more information about the new zip APIs, visit IBM’s announcement letter. To learn more about jar, visit the Java Archive Tool page.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    ARCAD Software

    DevSecOps & Peer Review – The Power of Automation

    In today’s fast-paced development environments, security can no longer be an afterthought. This session will explore how DevSecOps brings security into every phase of the DevOps lifecycle—early, consistently, and effectively.

    In this session, you’ll discover:

    • What DevSecOps is and why it matters?
    • Learn how to formalize your security concerns into a repeatable process
    • Discover the power of automation through pull requests, approval workflows, segregation of duties, peer review, and more—ensuring your data and production environments are protected without slowing down delivery.

    Whether you’re just getting started or looking to enhance your practices, this session will provide actionable insights to strengthen your security posture through automation and team alignment to bring consistency to the process.

    Watch Now!

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    Databorough:  Get ready for modernization or upgrades with X-Analysis 9.5
    Guild Companies:  The All-Everything Operating System, by Brian Kelly, Price $35
    CCSS:  Achieving Lights Out Automation in an IBM i environment. Get the Best Practice guide

    IT Jungle Store Top Book Picks

    BACK IN STOCK: Easy Steps to Internet Programming for System i: List Price, $49.95

    The iSeries Express Web Implementer's Guide: List Price, $49.95
    The iSeries Pocket Database Guide: List Price, $59
    The iSeries Pocket SQL Guide: List Price, $59
    The iSeries Pocket WebFacing Primer: List Price, $39
    Migrating to WebSphere Express for iSeries: List Price, $49
    Getting Started with WebSphere Express for iSeries: List Price, $49
    The All-Everything Operating System: List Price, $35
    The Best Joomla! Tutorial Ever!: List Price, $19.95

    IBM Updates Software Inventory and Usage Tool Control Your Code, Control Your Costs And Destiny

    Leave a Reply Cancel reply

Volume 12, Number 1 -- January 11, 2012
THIS ISSUE SPONSORED BY:

WorksRight Software
ProData Computer Services
Twin Data Corporation

Table of Contents

  • New in DB2 for i 7.1: Use Global Variables to Track Environment Settings
  • IBM i and Zip Files
  • Admin Alert: Is It a Performance Issue or a Throughput Issue?

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Power Systems Grows Nicely In Q3, Looks To Grow For All 2025, Too
  • Beta Of MCP Server Opens Up IBM i For Agentic AI
  • Sundry IBM i And Power Stack Announcements For Your Consideration
  • Please Take The IBM i Marketplace Survey
  • IBM i PTF Guide, Volume 27, Number 43
  • IBM Pulls The Curtain Back A Smidge On Project Bob
  • IBM Just Killed Merlin. Here’s Why
  • Guru: Playing Sounds From An RPG Program
  • A Bit More Insight Into IBM’s “Spyre” AI Accelerator For Power
  • IBM i PTF Guide, Volume 27, Number 42

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle