IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
 View Only
  • 1.  Unzipping Archive files...

    Posted Mon March 01, 2004 12:39 PM

    Originally posted by: SystemAdmin


    An associate is trying to write a map that unzips archived data. I gave him a sample Archive map I wrote as a reference. But apparently unzipping is different enough from zipping that he hasn't found it useful.

    I looked at the documentation and its pretty vague on this point. The zipping process required two maps. Does it require two maps to unzip as well? Also, it looks like you need to know the name of the archived dataset. If datasets have variable names can you use wild cards in the rule?

    For now I suggested having a map kick off a batch file to get things moving but any input would be helpful.

    jvanboga
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Unzipping Archive files...

    Posted Tue March 02, 2004 12:08 AM

    Originally posted by: SystemAdmin


    Yes it's correct that you need two maps and you have to know the names of the zipped files.
    Solution:
    We have written an universal unzip map by creating a map that reads the zip file (zip analyse map).
    The content of all zip files is standard (always the same structure - in the web you can find a description of this structure) so that you can do this.
    The result of this first map is a list of all zipped files (name, size,....)
    This result is passed to the unzip map via ECHOIN function.
    _________________
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  RE: Unzipping Archive files...

    Posted Tue June 27, 2023 10:42 AM

    When using IBM Sterling Transformation Extender (STE) to unzip archived data, the process differs from zipping. Unzipping typically requires a single map instead of two maps used for zipping. You can handle variable names by using wildcards in the map's configuration. If needed, you can also have a map trigger a batch file for more flexibility. The documentation may be vague, but contacting support for this could be a good idea to make them clarify it better in the doc.
    Hope this helps !



    ------------------------------
    Youssef Sbai Idrissi
    Software Engineer
    ------------------------------



  • 4.  RE: Unzipping Archive files...

    Posted Wed July 05, 2023 04:39 PM

    Youssef, I've successfully built a single map that zipped (as well as unzip).  What are you doing that it requires 2 maps to complete?

    I have a blob tree on input and output with a single rule (I also have some error and logging cards but not necessary to the operation).  Here I am using the GZIP option but you can substitute with which ever version you need.  I am using the PUT function for more control over file name (named for input file) but using the DIRECTORY override for the output card when running the map all wrapped in a valid to be able to nicely report the error.

    =VALID(PUT("GZIP", "-FILE " + GETDIRECTORY(DataOut) + SUBSTITUTE(GETFILENAME(DataIn),GETDIRECTORY(DataIn),"") + " -ACTION COMPRESSTOGZIP", PACKAGE(DataIn)), "Failed GZIP")

    Hope this helps!



    ------------------------------
    Lisa Edwards
    Software Engineer / Subject Matter Expert
    Rainbow Data Systems, Inc
    ------------------------------