Fri Jan 29 1999

ARMRCALC

Subject: ARMRCALC22

Function: concat(input1,input2, ... ,output)


concat(input1,input2, ... ,output)

Purpose

Concatenates any number of input fields into a single T-type output field, without intervening blanks.

Example

Assume that we need to generate a NAME field from the fields shown in the following table:

      input:    LAST         FIRST      output:     NAME
            ------------- -----------          -----------------
            Buckholt      Glenn                Buckholt,Glenn
            Cassarino     Tony                 Cassarino,Tony
            Hiestand      Dave                 Hiestand,Dave
            Kranz         Dan                  Kranz,Dan

The following calc bracket will generate the desired result:

      columns= last first

      calc_start=
         concat(last,",",first,name)
      calc_end=

Calling Procedure

The concat function will not execute unless you specify a data view as shown above; i.e. we expect a pure columnar view with fields corresponding in number and sequence to the input fields listed in the concat function.

Any number of input fields may be specified. Their data type can be any ARMR data type except R-type. The output field is assumed to be a tabular type.

Note

ARMRCALC will normally process a calc bracket for each data term of the data view. This is not the case with concat. When concat appears in a calc bracket, ARMRCALC performs a single pass. Therefore, the call to the concat function should be the only statement in the calc bracket. Any other statements in the same bracket would only be executed for the very first data term!