Uniface Underground -> Undocumented.Features.Only. |
Click
here for download a basic sample program of the icomp
functions. 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
Generating a zip component requires
previous initializations.... Depending of the object you will
export the registers you will need are: 1To
complete the component export operation you should do after the icomp :
$96 = 26
2 Specify &!DEFPARAMS
in the include name profile (&! Are <gold>&<gold>!
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
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. 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 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 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). 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"):
Here is an example for the case unload (the global variables are vailable when
the code is started within the IDF): Thanks to Dr. Eric Müller
Article updated on
Function table
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
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)
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
$94 = <componentname>
$95 = "I"
93 = "!DEFPARAM"
; ! is <gold>!
$92 = "P"
perform "icomp"
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
1. Where-clause for export data (function 300 of icomp):
$$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 ""
$$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"
Unload glyph to bmp with icomp.
First read the UGLYPH entity.
For each row do :
$97=filename.bmp
$98=7
$99=197
perform "icomp"