Uniface Underground -> Undocumented.Features.Only. Go Home

icomp

    The icomp perform enables you to use some uniface functions available only from the IDF environment (up to Uniface 8; in Uniface 9 ICOMP will be replaced by the officially documented proc function $ude). Using this functionality you can write your own installation programs in Uniface.

Click here for download a basic sample program of the icomp functions.

Article updated on
Updated on Jan-2003
Updated on May-2003
Updated on Nov-2004
Updated on June-2005
Updated on Feb-2007
Updated on March-2007 (corrections and new information in Export uniface objects $99=192 and Export data (copy) $99=300 by Dr. Eric Müller)
 
 
 

 

USE : idf /tst icomp

The normal use of the icomp is :

    - The parameters are passed in the $9x global registers

    - The function to perform is codified in $99

    - Perform "icomp"

    - $status < 0 if any error occurs
 

Functions described in this document

Function table
 
Compile components. Function 0
Register Description Values
$99 Function code 0
$98 Component name  
$97 Component type 0 (form) 1 (service) 2 (report)
$96 Skeleton 0 (no) 1 (yes)
$95 Proc listing 0 (no) 1 (yes)
$94 Info 0 (no) 1 (yes)

Generating a zip component requires previous initializations....
 
Clear component. Function 3
Register Description Values
$99 Function code 3

 
 
Compile objects to UOBJECT. Function 70
Register Description Values
$99 Function code 70
$98 Object name
$97 Library
$96 Language

 
Analyze model. Function 99
Register Description Values
$99 Function code 99
$98 Model name  
$94 Fixed value 0

 
Check if a driver is installed. Function 110
Register Description Values
$99 Function code 110
$98 Driver code eg. INF, SYN, UWE, ORA... 
When the driver is installed the value returned in $status is 0 (zero)

 
Build the URR files (uana.urr and udesc.urr). Function 188
Register Description Values
$99 Function code 188
$98 Nil ""
Will build the UDESC.URR
$99 Function code 188
$98   "udesc"
Will build UANA.URR from UDESC.URR

 
Get information about the current  DOL file. Function 189
Register Description Values
$99 Function code 189
After perform this function the $result register will contains a list with two items :
CREATE=<creation_date>;NAME=<dol_file_name>
Eg. CREATE=19990126000000;NAME=uobj.dol

 
Update the DOL file. Function 190
Register Description Values
$99 Function code 190

 
Import objects from a trx file. Function 191
Register Description Values
$99 Function code 191
$98 Source file name  
$97 Fixed value 1
Export object in a trx file. Function 192 (common parameters)
Register Description Values
$99 Function code 192
$98 Target File name   
$97 Supersede 0 (no) 1 (yes) 

Depending of the object you will export the registers you will need are:
 
Object $92 $93 $94 $95 $96
Component 1       Component name 16
Start Up shell       Application name 18
Model       Model name 38
Library       Library name 58
Global registers "" Library name 50
Global procs "P" Proc name Library name "P" 26
Includes "P" Include name2 Library name "I" 26
Messages Language Text name Library name "M" 26
Panels "C" Panel name Library name "C" 26
Devices T.T. "T" Device name Library name "D" 26
Keyboard T.T. "T" Keyboard name Library name "T" 26
Menus Language Menu name Library name   88
Glyph Language Library name Glyph name "I" 92
Entity I. Template        EIT name 42
Field I. Template        FIT name 44
Field S. Template        FST name 46
Field L. Template        FLT name 48
Field Template        FT name 80
Signatures   Subsystem name ("" works for all subsystems) Signature name "SYSTEM_LIBRARY" 100
Constants "P" "DEFPARAM" Library name "I" 26

1To complete the component export operation you should do after the icomp :

$96 = 26
$94 = <componentname>
$95 = "I"
93 = "!DEFPARAM" ; ! is <gold>!
$92 = "P"
perform "icomp"

2 Specify &!DEFPARAMS in the include name profile (&! Are <gold>&<gold>!
 
 
Export data. Function 300
Register Description Values
$99 Function code 300
$98 Target in the format DRV:ENTITY.MODEL  
$97 Source in the format DRV:ENTITY.MODEL  
$96 Supersede 0 (yes) 3 (no)
$94 Map file
$93 Translation table
$92 append to TRX file (if driver DRV specified in target ($98) is "TRX:") 1 (yes) "" (no)
$91 where clause (see remark below)  

The where clause in $91 is specified as you would specify it after the "/whr=" subswitch of the IDF "/cpy" switch, but with <gold>* instead of * etc. Note that neither ";" nor <gold>; is allowed to separate multiple possible values of a single field (even <gold>!<gold>; does not work). The field names must be written in uppercase letters. Example: $91="FIELD1=Uniface;FIELD2=B*" where ; means <gold>; and * means <gold>*.
 
Create table (SQL Script). Function 400
Register Description Values
$99 Function code 400
$98 Table in format DRV:ENTITY.MODEL  
$96 Fixed valued 0
$97 The result script is returned in this register  

 
Dectect idf mode (Development/Deployment). Function 999
Register Description Values
$99 Function code 999
If the idf mode is deployment the value returned in $99 is 998, in other case is 999

Remarks at January 2003:

Changes are regarding the possibility to export other objects apart from Components.

Only components exported with $96 = 16, 18, 38, 58 and 50 can be exported at this time. What I did is to show a second dropdownlist when function 192 is selected. The user selects ths object type (again, the widgets shows a list of those included above only).

Then, the code in the Do It button has changed a little to get the value of the second dropdownlist. The message info regarding what object type can be exported has been updated.

The original code in the button did not include the export from USOURCE when a component is exported as mentioned in the ICOMP page in www.puuu.org but I added it. BTW, the page in www.puuu.org should state that $97 must be set to 1 so icomp appends this second export otherwise the file is overwritten.

Thanks to Luis M. Martinez


 

Remarks at May 2003:

I've discovered that the 'perform ICOMP' functions documented on your site will work in applications (outside of IDF!) if irtl.dll is included in the [USER_3GL] section of the applications assignment file (including the path). I have only tested it with:

$99 = 191 ; import file $98 = "component.trx" ; name of export file $97 = 1 perform icomp

This worked for me. I do not know if all the ICOMP functions will work this way. I also do not know which other support dll's you may have to deploy with your applications to get them to work outside the development environment.


 

Updated Nov-2004:

I'm 'playing' with icomp trying to reproduce the behavior of the export screen of Uniface (uuexpo49.frm) so that I can export a component with its signature into one xml export file.

From previous posts, I learned that $97=1 would allow to append information to an existing file but it is not exactly true.

If you try to export the component and the constants like this : ;p_label is the component name in uppercase $95=p_label $96=16 $97=0 $98="XML:.\%%p_label%%%.xml" $99=192 perform "icomp" $92="P" $93="!DEFPARAM" ; ! is +! $94=p_label $95="I" $96=26 $97=1 perform "icomp" the second perform will replace the file created by the first one.

To avoid this, before the second perform one should set $90 to "T" (=append to existing file) In the same manner, one could add the signature to the export file that way : $90="T" $92="F" $93="" $94=p_label $95="SYSTEM_LIBRARY" $96=100 $97=1 perform "icomp".

With these 3 performs, you have an xml export file strictly identical to the one Uniface generates through uuexpo49 when you check 'Include Signatures' checkbox on in that screen. Hope this would be useful, MaestroZ

 


Updated June-2005:

I have found out how to specify a where-clause when exporting data using ICOMP and how to manage case load/unload (Tested on U8.4).


1. Where-clause for export data (function 300 of icomp):

In addition to the register settings as already specified in icomp.html, set $92 = "" and put into $91 the where clause as you would specify it after the "/whr=" subswitch of the IDF "/cpy" switch, but with <gold>* instead of * etc.

2. case load/unload: unfortunately this is not a single icomp call, but you have to set certain global registers and then run the form usys:uucase99.

Here are the register settings ($$up_0, ... $$up_0 are global variables defined in library USYS. You can just add a new library "USYS" in the IDF, then library USYS is available, then you may specify this library in the component that calls usys:uucase99.

- case unload (see label texts on form "Unload CASE Definitions"):
$$up_0 Model Name
$$up_1 Entity Name
$$up_2 File Name
$$up_3 "UNLOAD"
$$up_4 Version, either "2.0" or "1.0"
$$up_5 "" for CIF version 2.0 and "ILYN" for CIF version "1.0"
$$up_6 "T"/"F" (include empty information codes)
$$up_7 "1"/"0" (export relationships)
$$up_8 profile for "One" entity
$$up_9 profile for "Many" entity
- case load (see label texts on form "Load CASE Definitions"):
$$up_0 Model Name
$$up_1 ""
$$up_2 File Name
$$up_3 "LOAD"
$$up_4 ""
$$up_5 ""

 

Here is an example for the case unload (the global variables are vailable when the code is started within the IDF):
$$up_0="MODEL"
$$up_1="ENT"
$$up_2="test.cif"
$$up_3="UNLOAD"
$$up_4="2.0"
$$up_5=""
$$up_6="T"
$$up_7="0"
run "usys:uucase99"

Thanks to Dr. Eric Müller

 


Updated Feb-2007:

Unload glyph to bmp with icomp.    


First read the UGLYPH entity.  

For each row do :  
  
 $97=filename.bmp   
 $98=7  
 $99=197  
 perform "icomp"

 

 


Copyright © 1999-2007 $UUU  All rights reserved.
Disclaimer. | Site Comments.