:CAT_PROCESS, CAT_PROCESS

Use CAT_PROCESS to concatenate text containers (data sequences) and to reverse the lines in a text container. You can use this scripting element only with process handles.

Note: The terms Data Sequences and Text Containers are used interchangeably.

This scripting element can be used as both, a script statement and a script function:

  • When used as a script statement, it modifies the text container of the input handle and provides the result in that text container. This is useful for stacking commands to modify text containers, thus avoiding reallocating new process handles.

  • When used as a script function, the text container of the process handle is provided read-only, and the result is provided in a new text container as a return value of the function.

Syntax

When used as a script statement:

:CAT_PROCESS Handle1[, Handle2[, Flags]]

When used as a script function:

CAT_PROCESS (Handle1[, Handle2[, Flags]])

Parameters

Parameter Description Format
Handle1 Process handle of text container 1. Script literal or script variable
Handle2

(Optional)

Process handle of text container 2. Script literal or script variable
Flags

(Optional)

Use flags to modify the operation. The available flag is:

  • r — Reverse the order of lines

n.a.

Examples

The following examples combine CAT_PROCESS, CUT_PROCESS, HEAD_PROCESS, TAIL_PROCESS, and SWAP_PROCESS in an Include Job (JOBI) and a Job (JOBS) to retrieve different information from a financial report.

Include object (081.INC.PRINT_AND_SUM_NUMBERS) Process page definition:

!* Input:

!* &YEAR# ... year

!* &HND_NUMBERS# ... text container with numbers

!* Get revenue numbers in the second column from character position 12 to 35

:SET &HND_COL2# = CUT_PROCESS(&HND_NUMBERS# ,, "12-35")

!* Cut to column 1 using space as delimiter

:CUT_PROCESS &HND_COL2# , 1,, "d/ /"

!* Output

:PRINT Quarterly results of year &YEAR#:

:DEFINE &TOTAL#, FLOAT

:SET &TOTAL# = 0

:PROCESS &HND_COL2#

   :SET &REP_NUMBER# = GET_PROCESS_LINE(&HND_COL2#)

   :PRINT &REP_NUMBER#

   :SET &TOTAL# = &TOTAL# + &REP_NUMBER#

:ENDPROCESS

:DEFINE &TOTAL_STRING#, STRING

:SET &TOTAL_STRING# = FORMAT(&TOTAL#, "00.0")

:PRINT Total revenue of year &YEAR#: &TOTAL_STRING#

:CLOSE_PROCESS &HND_COL2#

Job Post Process page definition:

!* Get numbers from report

!* Load report to text container

:SET &HND_REPORT# = PREP_PROCESS_REPORT ()

!* Cut off job messenger header

:SET &HND_TABLE# = TAIL_PROCESS(&HND_REPORT#, -9)

!* Cut off job messenger trailer

:HEAD_PROCESS &HND_TABLE#, -11

!* Cut off table header

:SET &HND_NUMBERS# = TAIL_PROCESS(&HND_TABLE#, -2)

!* Get numbers of 2022 only and put them into a separate text container &HND_NUMBERS_2022#

:SET &YEAR# = "2022"

:SET &REGEX_QSYEAR# = "Q. &YEAR#"

:SET &HND_NUMBERS_2022# = GREP_PROCESS(&HND_NUMBERS#, &REGEX_QSYEAR#)

!* Get numbers of 2023 only and filter for them in the same text container &HND_NUMBERS#

:SET &YEAR# = "2023"

:SET &REGEX_QSYEAR# = "Q. &YEAR#"

:GREP_PROCESS &HND_NUMBERS#, &REGEX_QSYEAR#

!* Print and sum numbers of &YEAR# 2022 in text container &HND_NUMBERS_2022#

!* As output routine in include works with script variable &HND_NUMBERS#, we have to swap the containers first

:SWAP_PROCESS &HND_NUMBERS#, &HND_NUMBERS_2022#

:INC 081.INC.PRINT_AND_SUM_NUMBERS

!* Print and sum numbers of &YEAR# 2023 that have been swapped to text container &HND_NUMBERS_2022#

!* As output routine in include works with script variable &HND_NUMBERS#, we have to swap the containers first

:SWAP_PROCESS &HND_NUMBERS#, &HND_NUMBERS_2022#

:PRINT

:INC 081.INC.PRINT_AND_SUM_NUMBERS

!* Combine both text containers to &HND_NUMBERS# in reverse order:

:CAT_PROCESS &HND_NUMBERS#, &HND_NUMBERS_2022#, "r"

!* Summarize both years and print numbers in reverse order

:SET &YEAR# = "2023 + 2022"

:PRINT

:PRINT Both years combined in reverse order:

:INC 081.INC.PRINT_AND_SUM_NUMBERS

After executing the job, the Post Process report (POST) shows the following information:

2025-08-07 14:35:21 - U00020408 Quarterly results of year 2023:
2025-08-07 14:35:21 - U00020408 7.7
2025-08-07 14:35:21 - U00020408 8.1
2025-08-07 14:35:21 - U00020408 8.5
2025-08-07 14:35:21 - U00020408 8.9
2025-08-07 14:35:21 - U00020408 Total revenue of year 2023: 33.2
2025-08-07 14:35:21 - U00020408 
2025-08-07 14:35:21 - U00020408 Quarterly results of year 2023:
2025-08-07 14:35:21 - U00020408 8.9
2025-08-07 14:35:21 - U00020408 8.7
2025-08-07 14:35:21 - U00020408 8.8
2025-08-07 14:35:21 - U00020408 9.3
2025-08-07 14:35:21 - U00020408 Total revenue of year 2023: 35.7
2025-08-07 14:35:21 - U00020408 
2025-08-07 14:35:21 - U00020408 Both years combined in reverse order:
2025-08-07 14:35:21 - U00020408 Quarterly results of year 2023 + 2022:
2025-08-07 14:35:21 - U00020408 9.3
2025-08-07 14:35:21 - U00020408 8.8
2025-08-07 14:35:21 - U00020408 8.7
2025-08-07 14:35:21 - U00020408 8.9
2025-08-07 14:35:21 - U00020408 8.9
2025-08-07 14:35:21 - U00020408 8.5
2025-08-07 14:35:21 - U00020408 8.1
2025-08-07 14:35:21 - U00020408 7.7
2025-08-07 14:35:21 - U00020408 Total revenue of year 2023 + 2022: 68.9

The Job report (REP) shows the following information:

See also: