IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  How to Unzip files

    Posted 02/21/11 12:07 AM

    Originally posted by: hemaC


    Hi,

    My requirement is to unzip a file to further process it. Please let me know how this could be achieved using WTX. From the help doc i got the syntax for data source. But when i tried it, it throwed me the error "Source not available". But i placed the file at the correct directory.

    Please let me know the commands to unzip the file.

    Thanks in advance.
    Regards,
    Hema
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: How to Unzip files

    Posted 02/21/11 11:16 AM

    Originally posted by: jvanboga


    Do you have a decompresion tool, like winzip, available? If so make sure the tools cmd line APIs are installed. If in windows you need to make sure the path to Winzip is define as an environmental variable.

    From there, look for an example map that should be installed with the tool.....

    You can also try this command....

    Run ("Unzip_Files.mmc", " -iazip1 path\filename.zip,compressed_file_name -of1 unzipped_file_name")

    the input and output are defined as text-blobs.

    You can also have your map create an unzip batch file and use a rule like this to execute it:

    VALID(GET("BAT","-CMD .\UNZIP_FILE.BAT"+ " -TRACE -AUDIT"), FAIL("EXECUTING_BATCH " + LASTERRORMSG()))
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender