NET/MASTER Network Control Language (NCL) Reference Manual

INSERT
Built-in Functions
106126 Tandem Computers Incorporated 4–45
In the following example, NCL inserts the string “123” into the string “abc” at
character position 5:
&A = 123
&B = ABC
&C = 5
&D = 6
&RESULT = INSERT(&A,&B,&C,&D)
In the previous example, NCL pads the string “abc” with default pad characters
(spaces) to a length of five characters. NCL pads the string “123” with spaces to a
length of six characters. The output string is “abc 123 ”. Two spaces follow “abc”
and three spaces follow “123”.
In the following example, NCL inserts the string “123” into the string “abc” at
character position 5 (“abc” is padded to five characters). The string “123” is padded to
a length of six characters. Both strings are padded with the specified pad character (+).
The output string is “abc++123+++”:
&A = 123
&B = ABC
&C = 5
&D = 6
&E = "+"
&RESULT = INSERT(&A,&B,&C,&D,&E)