XML Export via AWI adds CR LF which leads to error via :IMPORT script
search cancel

XML Export via AWI adds CR LF which leads to error via :IMPORT script


Article ID: 205504


Updated On:


CA Automic Workload Automation - Automation Engine CA Automic One Automation


Export of an include object via AWI -> Transfer --> Export adds an extra CRLF between

<![CDATA[!set global variables based on contents of GLOBAL VARA object

If the object is imported via the AWI this does not have any impact.
If the object is imported via the script :IMPORT the CRLF remains and objects fail to run, i.e.

U00020325 Runtime error in include 'JOBI.32417915' (Object 'SCRI.32417915.INC'), line '00002'. A JCL line was found. This is only permitted in Jobs. Content: ' !set global variables based on contents of GLOBAL VARA object'

This does not occur if the script :EXPORT is used.


The following script of an include object is exported via AWI.


If this script is imported via script utilizing :IMPORT 

:SET &FILE#  = "C:\temp\export.xml"

The include object looks like this:

            !set global variables based on contents of GLOBAL VARA object

:set &DTExecPath64# = get_var(&GVarsObj#,"PATH_DTEXEC_X64")
:set &DTExecPath32# = get_var(&GVarsObj#,"PATH_DTEXEC_X86")

:SET &BASE_API_URL# = get_var(&GVarsObj#,"BASE_API_URL")
:SET &Config_API# = get_var(&GVarsObj#,"Config_API")
:SET &ENV# = get_var(&GVarsObj#,"ENV")
:SET &ID_Server# = get_var(&GVarsObj#,"ID_Server")
:SET &HOST# = get_var(&GVarsObj#,"HOST")

:SET &ElasicSearch_Password# = GET_VAR(&GVarsObj#, "ElasicSearch_Password")
:SET &ElasicSearch_UserName# = GET_VAR(&GVarsObj#, "ElasicSearch_UserName")



Release : 12.3

Component : Application Interface (JavaAPI)




Exporting objects with a script and then importing them again using the script function IMPORT() while using AWI with Java version 9 or higher (lower than 14) caused additional line breaks and spaces to be inserted in the script of the imported object.



Update to a fix version listed below or a newer version if available.

This bug is fixed in the following releases:

AE 21.0.1          :      released

AE 12.3.8       :      released

If you are using a JavaAPI to export/import the objects, make sure that the uc4.jar is on the fixed version (12.3.8+ or 21.0.1+).

Article title: How to register to Broadcom Software Product updates and Critical Alerts


Additional Information

This problem has particularly heavy impact when a Z/OS (MVS) JOBs  that has a  maximum return codes specified at the step-level, the AE includes '-1' in the body of the MaxRetCode element, see example below. The resulting XML export will be corrupted and cannot be important without applying the manual workaround.


Workaround: Modify the export.xml and remove the CR LF before importing it with :IMPORT:


Please note :

The bug that, during import of XML contained raised the following error messages :

"MaxRetCode : Function 'DS_XML_CHECK': Text 'MaxRetCode' is longer than '11'"

is also corrected in this fix version.