$ude

Perform actions on Repository data and resources, including compiling, exporting, importing, and converting.

$ude(Action, Argument1, Argument2, Argument3 {, OptionList} )

Example: $result = $ude("copy", "misc", "myexportfile.xml", "def:")

Parameters

Parameters
Parameter Data Type Description
Action String Action to perform; one of:
  • "archive"—copy resources (compiled runtime objects) to a Uniface archive (UAR) file. For more information, see $ude ("archive").
  • "compile"—compile development objects in the Repository. For more information, see $ude ("compile").
  • "copy"—copy or convert data from one format to another. For more information, see $ude ("copy").
  • "delete"—delete a resource on the $RSO path, a symbol table, or a script listing. For more information, see $ude ("delete") .
  • "exist"—check whether a resource, symbol table, or script listing exists. For more information, see $ude ("exist").
  • "export"—export data from the Repository. For more information, see $ude ("export") .
  • "getReferenceList"—retrieve a list of all resources referenced by a specified object. For more information, see $ude ("getReferenceList").
  • "import" "misc"—import data into the Repository. For more information, see $ude ("import").
  • "import" "symboltable"—import symbol table files into the UXCROSS repository table. For more information, see $ude ("import", "symboltable").
  • "load"—load a symbol table or script listing from a file into a field or variable. For more information, see $ude ("load") .
  • "lookup"—get a list of resources, symbol tables, or script listing. For more information, see $ude ("load") .
Argument1-3 String Action-specific arguments.
OptionList String Associative list containing one or more options that are appropriate to the Action

Use

$ude requires a fully configured Repository to be available.

Note:  The $ude functions can only be used in components or applications that are run on Windows, and they rely on functionality that is provided in the ide.uar. To use $ude functions, run components and applications with ide.exe, or configure the application to include usys:ide.uar in its resources.

Allowed in all component types except self-contained Services.

Description

The $ude function enables you to create components that support your own development processes, for example, in automating exports and backups, managing sources, compiling and building applications, and so on.

Processing Information and Error Handling

$ude is usually used as a batch processing function, so it is possible for errors to occur either in executing $ude itself, or while processing an operation that it invokes. For example, if you specify an import file that does not exist, $ude itself returns an error -1718.

However, if $ude returns 0, this indicates the $ude executed successfully, but does not indicate that the operation itself succeeded. For example, the following instructions could all result in 0 being returned, but the reasons may vary:

  • vReturn = $ude("import", "misc", "myexport.xml","","supersede=false,"")

    Returns 0 if the contents of myexport.xml are already in the Repository.

  • vReturn  = $ude("export", "component", "myf*","")

    Returns 0 if no components matched the profile.

  • vReturn  = $ude("compile", "form", "my*","")

    Returns 0 if the forms matching the profile were compiled, but also if no forms were compiled.

For more information, see $procReturnContext.

For example, if $ude("compile") successfully compiled the forms, $procreturncontext returns the following (formatted for readability):

Context=UDE compile;
InputComponents=2;
OutputComponents=1;
Infos=32;
Warnings=2;
Errors=1;
Details=
 ID=1016!!;
  MESSAGE=(Fields for) entity DEBUG not found in application model, generating now...!!;
  SEVERITY=Warning!;
 ID=1301!!;
  MESSAGE=Component variable "LNR" is not referenced in the component.!!;
  SEVERITY=Info!;

However, if $ude("compile") executed successfully but no forms were compiled, $procreturncontext returns the following:

Context=UDE Compile

This could be because no forms matched the profile.

Version Change
10.3.02.38 Added actions "lookup" and "archive"
10.1.01 It is no longer possible to specify constants or field;template as an object type with $ude("export").
9.5.01 The option prcadditional=true no longer has any effect.
9.3.01 Added actions "delete", "exist", "load", "getReferenceList", "import" "symboltable"
9.1.01 Introduced

Related Topics