IBM Sterling Transformation Extender

 View Only
  • 1.  Unzipping zip file

    Posted Wed April 24, 2024 09:44 AM

    Hello,

    I use this function to unzip a file.

    =VALID(PUT("GZIP", " -FILE " + "C:\CIIV2_EESSI_RIRIO\CIIV2_EESSI_RIRIO_0000069876.txt" + " -STREAM GZIP " +" -ACTION DECOMPRESS -T C:\CIIV2_EESSI_RIRIO\CIIV2_EESSI_RIRIO_0000069876trace" , CPACKAGE(blob Items:input,"NATIVE") ), FAIL("Failed GZIP : "+ LASTERRORCODE() + " and message " + LASTERRORMSG()))

    I have an error :

    <ExecutionSummary MapStatus="Error" mapreturn="30" ElapsedSec="0.0071" BurstRestartCount="0">
        <Message>The FAIL function interrupted the map: Failed GZIP: -1 and message Failed to insert the function</Message>
        <CommandLine>'C:\IBM Workspace\TEST\map\NewMap1.mmc'</CommandLine>
        <ObjectsFound>2</ObjectsFound>
        <ObjectsBuilt>1</ObjectsBuilt>

    Can you help me ?

    Denis



    ------------------------------
    Denis Tomasi
    ------------------------------


  • 2.  RE: Unzipping zip file

    Posted Thu April 25, 2024 10:37 AM
    Edited by Jim Davee Thu April 25, 2024 10:37 AM

    In my use of the GZIP adapter I just use text for the FAIL part of the VALID() function.  You are using an entire FAIL() function there.  Not sure if this is your issue, but try this version:

    =VALID(PUT("GZIP", " -FILE " + "C:\CIIV2_EESSI_RIRIO\CIIV2_EESSI_RIRIO_0000069876.txt" + " -STREAM GZIP " +" -ACTION DECOMPRESS -T C:\CIIV2_EESSI_RIRIO\CIIV2_EESSI_RIRIO_0000069876trace" , CPACKAGE(blob Items:input,"NATIVE") ), "Failed GZIP : "+ LASTERRORCODE() + " and message " + LASTERRORMSG())

    Hope it helps!

    Jim



    ------------------------------
    Jim Davee
    ------------------------------