Import/export of forms in idf without logging into idf

Author: (lalitpct)

Hi all,

Is it possible to import/export form without logging into IDF.

i mean through some bat file




  1. there is no command line option to export a complete form (AFAIK).

    Best is to write a small homebrewed utility component which exports uniface components and started with

    .../idf.exe /TST myexporter

    It's a bit tricky because you can not pass parameters via the commandline,
    but there are other well developed ways to do so since a couple of years.


    Author: ulrich-merkel (
  2. Hi...

    Every night a small Uniface 9.4.01 application to export those components (forms, services...) modified / compiled
    during the day is automatically executed in my dev system... although probably this is not the best way... we have
    a daily export of our last modifications...

    Have a look to the $ude statement, $ude allows to export / import components, models, variables... my  small
    application  uses a ini file that allows me to define what is going to be exported...



    Author: mentor (
  3. Be sure to have "?" at the end of the command line c:\...\bin\idf.exe /asn.... "?" 1) /rma /imp to import repository objects 2) /rma /cpy /whr /append to export data from IDF ti Files. To export repo's object doesn't exists a specific uniface feature. You'd better develop a form using $UDE or ICOMP and execute it with /TST from command line

    Author: addice (
  4. adding a ? in the commandline is not recommended for automatic or scheduled execution.

    The "?" will open a modal window for interaction.


    Author: ulrich-merkel (
  5. Hi But doesnt that need manual intervention , if it doesnt need manual intervention can you please provide more detail on that .

    I need something like this only

    Author: lalitpct (
  6. if you do not have special settings which require manual log-in to the database or so, you can launch it with straight from a batch.

    .../idf.exe /TST mycomponent

    Even under these considerations, a special ASN file etc. will help.


    Author: ulrich-merkel (
  7. for the testing purpose I created a simple program which creates trx of only one file , and when we run it from IDF it doesn run successfully and creates a .trx file

    but when i use below dos command it doesnt seems to be working because as u mentioned it will not accept parameters

    "C:\usys8404gui\bin\idf.exe" /tst  backup /asn="C:\usys8404gui\adm\gui.asn"                       ; backup is the program name.

    is there other way to run this ?



    Author: lalitpct (
  8. at first, /tst backup should be the END of the command line, put the /asn= clause in front of the /tst to make it work:

    "C:\usys8404gui\bin\idf.exe" /asn="C:\usys8404gui\adm\gui.asn" /tst  backup                       ; backup is the program name

    To supply parameters, one option is to write it in a flat file and use fileload to process the information

    So your batch to backup component myform may look like:

    echo myform > backup.inp
    "C:\usys8404gui\bin\idf.exe" /asn="C:\usys8404gui\adm\gui.asn" /tst  backup                       ; backup is the program name

    You can even implement a little script-processor this way doing all kind of idf-internal automation.

    echo backup=myform > backup.inp
    echo backup-single=myform* >> backup.inp
    echo compile-with-list=myform* >> backup.inp
    "C:\usys8404gui\bin\idf.exe" /asn="C:\usys8404gui\adm\gui.asn" /tst  backup                       ; backup is the program name

    It's EASY


    Author: ulrich-merkel (
  9. .... just to demonstrate the concept:

    Trigger <LPMX> from Form: UME_SCRIPTDEMO

                  ; demo of a simple scriptengine implemented in UNIFACE 8.4.06
                  ; processes data line by line
                  ; command and arguments are separated by "=" (any character can do this)
                  ; demo implemented by
    ******        entry do_dispatch
                     string p_fieldname   : IN
                     string p_triggerabbr : IN
         1-1         selectcase ("%%$concat(p_fieldname,"-",p_triggerabbr)%%%")
         2-1            case 'p1-dtlf'
         3-1               call GEN_INPUTFILE()
         4-1               call GET_INPUTFILE(X_FILETEXT)
         5-1               call PROCESS_SCRIPT(X_FILETEXT)
         6-1         endselectcase
         7        end ; do_dispatch
    ******        entry PROCESS_SCRIPT
                     string p_scripttext : IN
                     string v_text_as_list, v_single_line, v_line_as_list, v_command, v_arg2
         1           v_text_as_list = $replace(p_scripttext,1,"%%^","·;",-1) ; replace CRNL with listseparator
         2-1         while (v_text_as_list != "")   ; a loop per input line
         3-1            getitem v_single_line,v_text_as_list,1
         4-1            delitem v_text_as_list,1
         5-1            call ADD2PROTOCOL("%%$concat("%%^a single line reads as","--",v_single_line)%%%")
         6-2            if (v_single_line != "")
         7-2               v_line_as_list = $replace(v_single_line,1,"=","·;",-1) ; replace "=" with listseparator
         8-2               getitem v_command,v_line_as_list,1
         9-2               delitem v_line_as_list,1
        10-2               call ADD2PROTOCOL("%%$concat("we have a command:",v_command,"and arguments: ",v_line_as_list)%%%")
        11-3               selectcase (v_command)
        12-3                  case 'dumpit'  ; in single quotes, so upper/lower case are found
        13-3                     call ADD2PROTOCOL("encountered the DUMPIT command, comes without arguments")
        14-3                  case 'showarg2'  ; in single quotes, so upper/lower case are found
        15-3                     getitem v_arg2,v_line_as_list,2
        16-3                     call ADD2PROTOCOL("%%$concat("encountered SHOWARG2, 2nd argument is:",v_arg2)%%%")
        17-3                  elsecase
        18-3                     call ADD2PROTOCOL("%%$concat("!!!!! command NOT IMPLEMENTED yet:",v_command)%%%")
        19-3               endselectcase
        20-2            endif
        21-1         endwhile
        22        end ; PROCESS_SCRIPT
    ******        entry GEN_INPUTFILE
         1        filedump $filetext,"UME_SCRIPTDEMO.INP"
         2        filetext:BLOCKDATA ~
         3        end ; GEN_INPUTFILE
    ******        entry GET_INPUTFILE
                     string p_loadfield : OUT
         1        fileload "UME_SCRIPTDEMO.INP",p_loadfield
         2        end ; GET_INPUTFILE
    ******        entry ADD2PROTOCOL
                     string p_text : IN
         1           X_PROTOCOL = $concat(X_PROTOCOL,p_text,"%%^")
         2        end ; ADD2PROTOCOL

    Author: ulrich-merkel (