Results 1 to 8 of 8

Thread: F98MODAT uncompress and save zutxft

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

    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 07: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
    Senior Member craig_welton's Avatar
    Join Date
    Oct 2000
    Location
    Litchfield, CT
    Posts
    1,008
    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, NERDup and BusBuild+ 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
    546
    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 07: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
    118
    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

  5. #5
    Member
    Join Date
    Jul 2014
    Location
    Madrid, Spain
    Posts
    118
    Sorry, but I have a big problem, in local works fine but in web doesn't work, the batch finished in error and by the log stopped in jdeFwrite function, why? what I could doing?

    Regards.
    JDE E1 Senior Developer Consultant

  6. #6
    Member
    Join Date
    Jul 2014
    Location
    Madrid, Spain
    Posts
    118
    Exactly error function is jdeFwrite, I tried with C native fwrite but the same problem with execute in server, the batch finished in error and provoce a zombie process. I 've done a internal BSSV doing the same in java, and it works fine in web server. why? we have all servers in linux (except Deploy of course), if jdeFwrite or fwrite is not window (I found this function in all bsfn c and all are Client only).

    Regards.
    JDE E1 Senior Developer Consultant

  7. #7
    Member nkuebelbeck's Avatar
    Join Date
    Mar 2012
    Location
    Minnesota
    Posts
    546
    what version of E1 are you using? there are new API's for 9.2 media objects
    Analyst/Developer
    E1: 9.2 | TR: 9.2.1.4 | JAS: WebLogic | ES: OS400
    DB: DB2 | WebDev Client: Win7Pro (64 bit), VS 2010

  8. #8
    Member
    Join Date
    Jul 2014
    Location
    Madrid, Spain
    Posts
    118
    Hi nkuebelbeck, I'm using 9.2.1.0 tools but the API's for media object are in 9.2.1.6, so I can't use. But I hope us migrate soon XD

    So, I made a workaround solution implementing a internal BSSV for save physical file in webserver with java file functions. Next, I'll call a proxy bssv for upload to webcenter content by RID (I already have it done for another process).

    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.