Automic Workload Automation

Line separators in the Automation Engine 

Feb 11, 2019 05:26 AM

The Automation Engine uses two different line separators, depending on context.

 

UC_CRLF script function

The AE script function UC_CRLF() returns an MS-DOS-style newline: a carriage return and a line feed (CR LF or \r \n).

Script

:SET &CRLF# = UC_CRLF()

:SET &CRLF_HEX# = HEX(&CRLF#)
:PRINT &&CRLF_HEX#: &CRLF_HEX#

Results

U00020408 &CRLF_HEX#: 0D0A

 

Multi-line object variables

In multi-line object variables, the line separator character is just a linefeed (LF or \n).

Script

:SET &NEWLINE_HEX# = HEX(&NEWLINE#)
:PRINT &&NEWLINE_HEX#: &NEWLINE_HEX#
Results

U00020408 &NEWLINE_HEX#: 0A

Keep this difference in mind when using string-handling functions such as STR_SPLIT and STR_FIND.
Note
In ASCII, hex 0A (decimal 10) is the linefeed character, and hex 0D (decimal 13) is the carriage return character.
This document is based on the following discussions:

Statistics
0 Favorited
8 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.