Exporting via ICOMP

Author: christoffer.aronsson@ladok.umu.se (voltagecontrol)

 

Hi,

Since we're still at U8 and won't be upgrading to U9 in a while we've decided to build a service for repository management with ICOMP. I know that some think this is not the optimal way to go, but it's so much faster than idf.exe cpy.

I've read pretty much all there is to read at the UUU about ICOMP and have implemented all the exports. However, when we export menus, menubars, messages, helptexts, and gp/ip there's a small part of the source that seems to be left out, when compared to the normal uniface export.

 

What we're missing is this following xml, that should be copied from the ULIBR.DICT table:

<TABLE xmlns:ULIBR="ULIBR.DICT">
<DSC name="ULIBR" model="DICT" system="S" pseudo ="73" level="1" noupdate="0"
 rbk="0" ffsql="0" transnr="0" segsize="0" ufocc="0" charset=".U">
<FLD name="ULIBRARY" seqno="1" type="S" level="2" pack="0" scale="0" length="16"
 pointer="0" inum="1" ufocc="0" mandatory="yes" idxnum="1" idxsnr="101" />
<FLD name="UDESCR" seqno="2" type="U" level="2" pack="0" scale="0" length="25"
 pointer="0" inum="0" ufocc="0" />
<FLD name="UTIMESTAMP" seqno="3" type="E" level="2" pack="0" scale="0" length="15"
 pointer="0" inum="0" ufocc="0" />
</DSC>
<OCC>
<ULIBR:ULIBRARY>LIBRARY</ULIBR:ULIBRARY>
</OCC>
</TABLE>

 

Any ideas on how to append this to our exports via ICOMP so that they'll be exact replicas of the uniface exports?

 

FYI the current export code looks something like this:

call clearRegs()           ; Flush previous values
$99 = 192                  ; Function code 192 = Export
$98 = ls_expFileAndPath    ; Export path, including filename and filetype
$97 = 0                    ; Supersede = 0 (create new file) 1 (append file)
$96 = 26                   ; Code for message
$95 = "M"                  ; M for message
$94 = ls_library           ; Library Name
$93 = ls_componentName     ; Text name
$92 = ls_language          ; Language
perform "icomp"            ; Run the export

 

 

Best regards
Christoffer, Sweden

6 Comments

  1. Hi Christoffer,

     

    not really a solution but a question. If you are in U9 why you don't use the $ude("export") function.

    Disadvantage: It works only with in IDF (for expample in an own form run throudh additional menu)

    Advantage: It is official supported

    Best regards

    Thomas

    P.S. for using $ude have a look in the uniface library.


    Author: Thomas.Young (thomas.young@young-consulting.de)
  2. Perhaps my original post was a bit unclear - we're still using U8.4 at the moment, hence the need to use ICOMP.


    Author: voltagecontrol (christoffer.aronsson@ladok.umu.se)
  3. Hi Christoffer,

    the uniface export for does a little bit more than you expected:

    In the export form, you have to fill the "Library" field.
    In the consequence, IDF exports this ULIBRARY record as well.

    If you export messages using Icomp and want the library information as well,
    you have to export the library in a separate perform and append it to the output file.

    Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Sounds like a certain fix. Any ideas how to do this or should i just bash away at ICOMP using trial and error? :)


    Author: voltagecontrol (christoffer.aronsson@ladok.umu.se)
  5. Something like this:

    ; First create a new file containing the library
    call clearRegs()           ; Flush previous values
    $99 = 192                  ; Function code 192 = Export
    $98 = ls_expFileAndPath    ; Export path, including filename and filetype
    $97 = 0                    ; Supersede = 0 (create new file) 1 (append file)
    $96 = 58                   ; Code for library
    $95 = ls_library           ; Library Name
    perform "icomp"            ; Run the export

    ; Now append the message text
    call clearRegs()           ; Flush previous values
    $99 = 192                  ; Function code 192 = Export
    $98 = ls_expFileAndPath    ; Export path, including filename and filetype
    $97 = 1                    ; Supersede = 0 (create new file) 1 (append file)
    $96 = 26                   ; Code for message
    $95 = "M"                  ; M for message
    $94 = ls_library           ; Library Name
    $93 = ls_componentName     ; Text name
    $92 = ls_language          ; Language
    perform "icomp"            ; Run the export


    Author: ishankster (ishankster@yahoo.co.uk)
  6. Thanks and thumbs up :)


    Author: voltagecontrol (christoffer.aronsson@ladok.umu.se)