Previous Topic

Next Topic

Book Contents

Book Index

Exporting objects to separate files

This procedure describes how to extract each object to a separate file using the UC4 File Explorer.

To extract each object to a separate file:

  1. In the UC4 File Explorer click Search.

    The Search window appears.

  2. In the Name field, type *.
  3. In the Search For field, select the Objects and then from the dropdown list, select the object type you want to export (such as jobs).
  4. Click Start.

    A list of search results appears.

  5. Right click on one of the objects, and select Export.

    The Save dialog box appears.

  6. Save the file as .csv.
  7. Create a new directory and place the .csv file you saved in step 8 in the new directory.
  8. Run the following script:

    :SET &HOST# = "<name of Host>"

    :SET &CSV_FILE# = "<name of the file and full directory of the exported objects to csv>"

    :SET &EXPORT_PATH# = "<name of the target path directory>"

    :SET &HND#=PREP_PROCESS_FILE(&HOST#,&CSV_FILE#,,"COL=DELIMITER",'DELIMITER=";"')

    :PROCESS &HND#

    : SET &Line#=GET_PROCESS_LINE(&HND#,1)

    : PRINT "<&Line#>"

    : SET &OBJECT# = &Line#

    : SET &File# = "&EXPORT_PATH#&line#.xml"

    : SET &Ret# = EXPORT (&Object#, &File#)

    :ENDPROCESS

    For an example of the script, see Exporting each file to a separate file running the script example.

Parent Topic

Extracting UC4 data to XML using the UC4 Explorer