Results 1 to 4 of 4

Thread: F98MODAT uncompress and save zutxft

  1. #1
    Member nkuebelbeck's Avatar
    Join Date
    Mar 2012
    Location
    Minnesota
    Posts
    535

    F98MODAT uncompress and save zutxft

    I'm trying to use jdeBufferUncompress in 9.2.1.2 tools to extract the blob field to the C:\ drive as proof of concept from my full client.

    Attached is the code I'm working with from Brian's example for extracting xml from F98630. I swapped out the call of xmlpUncompress with jdeBufferUncompress but it's crashing object browser when i execute it. I did some debugging and I believe jdeBufferUncompress is returning a -3?

    The file is written the F98MODAT with the correct filename so I know I've hit the database correctly. It's just 0 bytes.

    I searched the source directory for jde objects using jdeBufferUncompress and there were zero.

    Thanks in advance for any help

    SOLUTION
    couple things. need to open file with the wb switch. I also used jdeFwrite. Thanks craig for revealing the uncompressed nature of the data

    stream = jdeFopen(szFileName, _J("wb"));
    nReturn = jdeFwrite(dsF98MODAT.zutxft.lpValue, dsF98MODAT.zutxft.lSize, 1, stream);
    Attached Files Attached Files
    Last edited by nkuebelbeck; 06-12-2017 at 08:03 AM.
    Analyst/Developer
    E1: 9.2 | TR: 9.2.1.4 | JAS: WebLogic | ES: OS400
    DB: DB2 | WebDev Client: Win7Pro (64 bit), VS 2010

  2. #2
    Member craig_welton's Avatar
    Join Date
    Oct 2000
    Location
    Litchfield, CT
    Posts
    977
    Hi,

    I don't think the data is compressed in that blob. Just read it directly from lpValue

    Craig
    Craig Welton
    PatWel Group Inc.
    http://www.patwel.com
    Home of the FREE JDE Object Browser, JDETrace and NERDup Tools

    E1 9.0 8.98.4.2 Wintel SQL 2008
    E1 9.2 9.2.1.4 iSeries

  3. #3
    Member nkuebelbeck's Avatar
    Join Date
    Mar 2012
    Location
    Minnesota
    Posts
    535
    you are correct. Thanks!

    I can get the file written but it's still crashing object browser I suspect a buffer overrun? Is this binary data? Is this the best way to write to a file?

    I'm using nReturn = jdeFwriteConvert(lpBhvrCom, (JCHAR *)dsF98MODAT.zutxft.lpValue, sizeof(JCHAR), dsF98MODAT.zutxft.lSize, stream);

    solution found. see OP
    Last edited by nkuebelbeck; 06-12-2017 at 08:03 AM.
    Analyst/Developer
    E1: 9.2 | TR: 9.2.1.4 | JAS: WebLogic | ES: OS400
    DB: DB2 | WebDev Client: Win7Pro (64 bit), VS 2010

  4. #4
    Member
    Join Date
    Jul 2014
    Location
    Madrid, Spain
    Posts
    114
    Thanks a lot nkuebelbeck!!!! I had the same problem but with your bsfn and some adjustments (example 'jdeBufferUncompress' is not neccesary for pdf, docx and jpeg files) I can download files! (I can't use API's because we have tr 9.2.1.0)
    Regards.
    JDE E1 Senior Developer Consultant

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.