Functions Documentation

    The functions listed below are in alphabetical order. Scroll down to the desired function or access a function using the Function Index links. At the bottom of each function's Possible uses table are Error Reports that provide possible meanings to the -99999999 error codes. To find out more about troubleshooting the error codes go to Troubleshooting Functions.

     

    ABS( ) Function

    Example          See Also

     

     

    Returns the absolute value of the specified numeric expression.

     

     

    Syntax

    ABS( nExpression )

     

    Returns

    Numeric (double)

     

    Arguments

                            nExpression                                                 Specifies the numeric expression whose absolute value ABS( ) returns.

     

    Examples

                            ABS(-45)                                                        Returns 45

                            ABS(10-30)                                                   Returns 20

                            ABS(30-10)                                                   Returns 20

     

                            {NUMBER1} = 40

                            {NUMBER2} = 2

                            ABS({NUMBER2} – {NUMBER1})            Returns 38

     

     

    Possible uses

     

    Function

    Result

    Error report

    ABS({NPOS})}

    50

     

    ABS({NNEG})

    50

     

    ABS([QNPOS])

    20

     

    ABS([QNEG])

    20

     

    ABS(46)

    46

     

    ABS(-26)

    26

     

    ABS({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ABS([NOQUESTION])

    -999999999

    Missing variable : [NOQUESTION]

    ABS({LINTDATE})

    -999999999

    Incompatible types in Abs.value.  Found :DATE, required: NUMERIC.

    ABS({NAME})

    -999999999

    Incompatible types in Abs.value.  Found :STRING, required: NUMERIC.

     


    ACOS( ) Function

    Example          See Also

     

     

    ACOS( ) returns the arc cosine of a specified numeric expression. The arccosine is the angle whose cosine is number.  The returned angle is given in radians in the range 0 (zero) to pi (3.141592).

     

    Syntax

    ACOS( nExpression )

     

    Returns

    Numeric

     

    Arguments

                            nExpression                                                 Specifies a numeric expression whose arc cosine ACOS( ) returns. The value of nExpression can range from –1 through +1.

     

    Examples

                            ACOS(0.5)                                                     Returns 1.05

                            ACOS (1)                                                       Returns 0

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ACOS({ANGLE})

    2.094395102

     

    ACOS([QANGLE])

    2.094395102

     

    ACOS(-0.5)

    2.094395102

     

    ACOS({TODAY})

    -999999999

    Incompatible types in ACos.nExpression.  Found :DATE, required: NUMERIC.

    ACOS({FULLNAME})

    -999999999

    Incompatible types in ACos. nExpression.  Found :STRING, required: NUMERIC.

    ACOS({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ACOS({CTIME})

    -999999999

    Incompatible types in ACos. nExpression.  Found :TIME, required: NUMERIC.

    ACOS({*JOBS*})

    -999999999

    Incompatible types in ACos. nExpression.  Found :ROSTER, required: NUMERIC.

    ACOS({^ANAMES^})

    -999999999

    Incompatible types in ACos. nExpression.  Found :ARRAY, required: NUMERIC.

    ACOS([QSALL])

    -999999999

    Incompatible types in ACos. nExpression.  Found :MATRIX, required: NUMERIC.

     


    + (addition)

     

     

    Example          See Also

     

     

    Returns the addition of two values.

     

     

    Syntax

    cExpression1 + cExpression2

    nExpression1 + nExpression2

     

    Returns

    Numeric (double)

    String

     

    Arguments

                            nExpression                                                 Specifies a numeric expression.

                            cExpression                                                  Specifies a character expression.

     

     

    Examples

                            12 + 13                                                           Returns 25

                            10 + 30                                                           Returns 40

     

                            {NUMBER1} = 40

                            {NUMBER2} = 2

                            {NUMBER2} + {NUMBER1}                       Returns 42

     

                            {NAME} = Julia

                            “Good morning “ + {NAME}                        Returns “Good morning Julia”

     

                            [Q24] = Good afternoon

                            [Q24] + “ doctor”                                            Returns “Good afternoon doctor”

     

                           

     


    Possible uses

     

    Function

    Result

    Error report

    {TIMEOFDAY} + {NAME}

    Good morningLinda

     

    [Q24] + {NAME}

    Good morningLinda

     

    “Good morning “ + {NAME}

    Good morning Linda

     

    {TIMEOFDAY} + [Q50]

    Good morningLouis

     

    [Q24] + [Q50]

    Good morningLouis

     

    “Good morning “ + [Q50]

    Good morning Louis

     

    [Q24] + [Q50]

    Good morningLouis

     

    “Good morning “ + [Q50]

    Good morning Louis

     

    {TIMEOFDAY} + “ doctor

    Good morning doctor

     

    [Q24] + “ doctor “

    Good morning doctor

     

    “Good morning “ + “ doctor “

    Good morning doctor

     

    {SALARY} + {TIPS}

    308.33

     

    {SALARY} + [Q243]

    308.33

     

    {SALARY} + 100

    308.33

     

    [Q100] + {TIPS}

    308.33

     

    [Q100] + [Q243]

    308.33

     

    [Q100] + 100

    308.33

     

    208.33 + {TIPS}

    308.33

     

    208.33 + [Q243]

    308.33

     

    208.33 + 100

    308.33

     

    {NONEXISTANT} + “ doctor”

    -999999999

    Missing variable : {NONEXISTANT}

    {*HHI*} + “ doctor”

    -999999999

    Incompatible types in the first value of the addition function.  Found : ROSTER, required: STRING or NUMERIC.

    “Hi “ + {NONEXISTANT}

    -999999999

    Missing variable : {NONEXISTANT}

    “Hi “ + {*HHI*}

    -999999999

    Incompatible types in the second value of the addition function.  Found : ROSTER, required: STRING or NUMERIC.

    “Hi “ + 259

    -999999999

    Incompatible operands in the addition function.

     


    ADDYEARS( ) Function

    Example          See Also

     

     

    Adds n years to a date.

     

     

    Syntax

    ADDYEARS( dExpression, nExpression )

     

    Returns

    Date

     

    Arguments

                            dExpression                                                  Date to which the number of year(s) will be added. The date must be a complete and valid date in the format: yyyymmdd.

                            nExpression                                                 Integer number of years to add. May be a variable or an integer.

     

    Examples

                            {LDATE} = 20010828

                            {ADDYEARS} = 2

                            ADDYEARS({LDATE},{ADDYEARS})     Returns 20030828

     

     

    Possible uses

     

    Function

    Result

    Error report

    ADDYEARS({LINTDATE}, 3)

    20040828

     

    ADDYEARS({LINTDATE}, [QYEARS3])

    20040828

     

    ADDYEARS({LINTDATE}, {THREE})

    20040828

     

    ADDYEARS([NOWDATE], 3)

    20050120

     

    ADDYEARS([NOWDATE], [QYEARS3])

    20050120

     

    ADDYEARS([NOWDATE], {THREE})

    20050120

     

    ADDYEARS({NAME}, 3)

    -999999999

    Incompatible types in AddYears.originalDate.  Found :STRING, required: DATE.

    ADDYEARS({NPOS}, 3)

    -999999999

    Incompatible types in AddYears.originalDate.  Found :NUMERIC, required: DATE.

    ADDYEARS({NONEXISTANT}, 3)

    -999999999

    Missing variable : {NONEXISTANT}

    ADDYEARS({LINTDATE}, [NOQUESTION])

    -999999999

    Missing variable : [NOQUESTION]

    ADDYEARS({LINTDATE}, {NAME})

    999999999

    Incompatible type in AddYears.yearsToAdd.  Found :STRING, required: NUMERIC.

    ADDYEARS({LINTDATE}, [NOWDATE])

    999999999

    Incompatible type in AddYears.yearsToAdd.  Found :DATE, required: NUMERIC.

     


    AGE( ) Function

    Example          See Also

     

     

    Calculates the difference between two sets of dates in terms of days, months or years.

     

     

    Syntax

    AGE( dExpression1, dExpression2, "DAY"|"MO"|"YR" )

     

    Returns

    Integer

     

    Arguments

                            dExpression1                                                Beginning date for the age calculation. The date must be a complete and valid date in the format: yyyymmdd.

                            dExpression2                                                Terminating date for the age calculation. The date must be a complete and valid date in the format: yyyymmdd.

                            "DAY"|"MO"|"YR"                                         Specifies what resultant calculation will represent: days, months (30 days) and years (365 days).

     

    Examples

                            {CURDATE} = 20020909

                            {BDATE} = 19970122

                            AGE({CURDATE}, {BDATE}, "YR")          Returns 5

     

     


    Possible uses

     

    Function

    Result

    Error report

    AGE ({TODAY}, {DOB}, "DAY")

    1649

     

    AGE({TODAY}, {DOB}, "MO")

    54

     

    AGE({TODAY}, {DOB}, "YR")

    4

     

    AGE({TODAY}, [Q1], "DAY")

    1649

     

    AGE({TODAY}, [Q1], "MO")

    54

     

    AGE({TODAY}, [Q1], "YR")

    4

     

    AGE({TODAY}, "19970122", "DAY")

    1649

     

    AGE({TODAY}, "19970122", "MO")

    54

     

    AGE({TODAY}, "19970122", "YR")

    4

     

    AGE([Q1], {DOB}, "DAY")

    0

     

    AGE([Q1], {DOB}, "MO")

    0

     

    AGE([Q1], {DOB}, "YR")

    0

     

    AGE([Q1], [Q1], "DAY")

    0

     

    AGE([Q1], [Q1], "MO")

    0

     

    AGE([Q1], [Q1], "YR")

    0

     

    AGE([Q1], "19970122", "DAY")

    0

     

    AGE([Q1], "19970122", "MO")

    0

     

    AGE([Q1], "19970122", "YR")

    0

     

    AGE("20010730", {DOB}, "DAY")

    1649

     

    AGE("20010730", {DOB}, "MO")

    54

     

    AGE("20010730", {DOB}, "YR")

    4

     

    AGE("20010730", [Q1], "DAY")

    1649

     

    AGE("20010730", [Q1], "MO")

    54

     

    AGE("20010730", [Q1], "YR")

    4

     

    AGE("20010730", "19970122", "DAY")

    1649

     

    AGE("20010730", "19970122", "MO")

    54

     

    AGE("20010730", "19970122", "YR")

    4

     

    AGE("20010730", "19970122", "XX")

    -999999999

    Invalid format 'XX' in Age function. DAY|MO|YR format is required.

    AGE("20010730", "19970122", 3)

    -999999999

    Incompatible types in Age.resultFormat.  Found :NUMERIC, required: STRING.

    AGE("20010730", [QYEARS3], "YR")

    -999999999

    Incompatible types in Age.endDate.  Found :NUMERIC, required: DATE.

    AGE("20010730", {NONEXISTANT}, "YR")

    -999999999

    Missing variable : {NONEXISTANT}

    AGE("20010730", "LUCIA", "DAY")

    -999999999

    Invalid date in Age.endDate

    AGE([QYEARS3], {DOB}, "DAY")

    -999999999

    Incompatible types in Age.startDate.  Found :NUMERIC, required: DATE.

    AGE({NONEXISTANT}, {DOB}, "MO")

    -999999999

    Missing variable : {NONEXISTANT}

    AGE("MARIA", {DOB}, "YR")

    -999999999

    Invalid date in Age.startDate

     


    ALEN( ) Function

    Example          See Also

     

     

    ALEN( ) counts the number of elements in an array.

     

    Syntax

    ALEN( {^ArrayName^} )

     

    Returns

    Numeric (integer)

     

    Arguments

                            {^ArrayName^}                                              Name of the array of the elements to be counted.

     

    Examples

                            ALEN ({^ANAMES^})                                   Returns 2

     

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ALEN ({^ANAMES^})

    2

     

    ALEN ({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ALEN ({X})

    -999999999

    Incompatible types in ALEN.array.  Found :NUMERIC, required: ARRAY.

    ALEN ({TODAY})

    -999999999

    Incompatible types in ALEN.array.  Found :DATE, required: ARRAY.

    ALEN ({CTIME})

    -999999999

    Incompatible types in ALEN.array.  Found :TIME, required: ARRAY.

    ALEN ("Miguel")

    -999999999

    Incompatible types in ALEN.array.  Found :STRING, required: ARRAY.

     


    ALLTRIM( ) Function

    Example          See Also

     

     

    Removes leading and trailing blanks from the specified character expression and returns the trimmed expression as a character string.

     

    ALLTRIM( ) can be used to ensure that blanks are removed from data entered by a user.

     

    Syntax

    ALLTRIM( cExpression )

     

    Returns

    String

     

    Arguments

                            cExpression                                                  Specifies the character expression from which leading and trailing blanks are removed.

     

    Examples

                            ALLTRIM(“ Trim strings     “)                       Returns “Trim strings”

                            ALLTRIM ({FULLNAME})                            Returns “Luisa Lane

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ALLTRIM({FULLNAME})

    Luisa Lane

     

    ALLTRIM([QFNAME])

    Pete Rivers

     

    ALLTRIM([QYEARS3])

    -999999999

    Incompatible types in AllTrim.SourceString.  Found :NUMERIC, required: STRING.

    ALLTRIM({TODAY})

    -999999999

    Incompatible types in AllTrim.SourceString.  Found :DATE, required: STRING.

    ALLTRIM({CTIME})

    -999999999

    Incompatible types in AllTrim.SourceString.  Found :TIME, required: STRING.

    ALLTRIM({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ALLTRIM(" Hi, how are you? ")

    -999999999

    “Hi, how are you?”

     


    ANGLE( ) Function

    Example          See Also

     

     

    Returns the arc tangent in all four quadrants from specified values.

     

    ANGLE( ) returns the angle between the line y = 0 and the line connecting the specified coordinates and the origin (0, 0) of the coordinate system.

     

    Syntax

    ANGLE( nYCoordinate, nXCoordinate )

     

    Returns

    Numeric

     

    Arguments

                            nYCoordinate                                               Specifies the y coordinate.

                            nXCoordinate                                               Specifies the x coordinate.

     

    Examples

                            ANGLE(10, 10)                                             Returns 45

                            ANGLE(0, -10)                                              Returns 180

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ANGLE({X1}, {Y1})

    0.785398163

     

    ANGLE({X1}, [QYCORD])

    0.785398163

     

    ANGLE({X1}, 10)

    0.785398163

     

    ANGLE([QYCORD], {Y1})

    0.785398163

     

    ANGLE([QYCORD], [QYCORD])

    0.785398163

     

    ANGLE([QYCORD], 10)

    0.785398163

     

    ANGLE(10, {Y1})

    0.785398163

     

    ANGLE(10, [QYCORD])

    0.785398163

     

    ANGLE(10, 10)

    0.785398163

     

    ANGLE({FULLNAME}, {Y1})

    -999999999

    Incompatible types in Angle.nYCoordinate.  Found :STRING, required: NUMERIC.

    ANGLE({TODAY}, {Y1})

    -999999999

    Incompatible types in Angle. nYCoordinate.  Found :DATE, required: NUMERIC.

    ANGLE({CTIME}, {Y1})

    -999999999

    Incompatible types in Angle. nYCoordinate.  Found :TIME, required: NUMERIC.

    ANGLE({NONEXISTANT}, {Y1})

    -999999999

    Missing variable : {NONEXISTANT}

    ANGLE({X1}, {FULLNAME})

    -999999999

    Incompatible types in Angle. nXCoordinate.  Found :STRING, required: NUMERIC.

    ANGLE({X1}, {TODAY})

    -999999999

    Incompatible types in Angle. NXCoordinate.  Found :DATE, required: NUMERIC.

    ANGLE({X1}, {CTIME})

    -999999999

    Incompatible types in Angle. NXCoordinate.  Found :TIME, required: NUMERIC.

    ANGLE({X1}, {NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

     


    APACK( ) Function

    Example          See Also

     

     

    Packs an array.

     

    APACK( ) removes empty elements in an array.

     

    Syntax

    APACK( {^ArrayName^} )

     

    Returns

    Array

     

    Arguments

                            {^ArrayName^}                                              Name of the array of the elements to be packed.

     

    Examples

                            {^ANAMES(1)^} = “Thomas”

                            {^ANAMES(2)^} = “Susan”

                            {^ANAMES(3)^} =

                            {^ANAMES(4)^} = “Louis”

                            APACK({^ANAMES^})                                {^ANAMES^}

                                                                                                    {^ANAMES(1)^} = “Thomas”

                                                                                                    {^ANAMES(2)^} = “Susan”

                                                                                                    {^ANAMES(3)^} = “Louis”

     

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    APACK({^ANAMES^})

    array

     

    APACK({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    APACK({X})

    -999999999

    Incompatible types in APACK.array.  Found :NUMERIC, required: ARRAY.

    APACK({TODAY})

    -999999999

    Incompatible types in APACK.array.  Found :DATE, required: ARRAY.

    APACK({CTIME})

    -999999999

    Incompatible types in APACK.array.  Found :TIME, required: ARRAY.

    APACK("Miguel")

    -999999999

    Incompatible types in APACK.array.  Found :STRING, required: ARRAY.


    APPEND Command

    Example          See Also

     

     

    This command will append all the records from a source roster that match a logical expression (ExprL) to the target roster. If a list of fields is included, the function will append only those fields. If * is specified all fields will be appended.

     

     

    Syntax

    APPEND *|Field1, ...Fieldn FROM {*SourceRosterName*} INTO {*TargetRosterName*} [WHERE <ExprL>]

     

    Arguments

                            Field1, ...Fieldn                                              List of fields that restrict what items in the roster will be appended.

                            *                                                                       All fields will be appended.

     

                            {*SourceRosterName*}                               Roster name from which the records will be appended.

                            {*TargetRosterName*}                                 Roster name to which the records will be appended.

                            ExprL                                                              Logical expression that if matched controls what records will be appended to the target roster.

    Examples

                            APPEND * FROM {*OLDHHI*} INTO {*HHI*}


    APPENDTOFILE( ) Function

    Example          See Also

     

     

    Writes (append) the contents of a character string to a file. 

     

    APPENDTOFILE returns the number of bytes written to the file.

     

    Syntax

    APPENDTOFILE( cFileName, cExpression )

     

    Returns

    Numeric

     

    Arguments

                            cFileName                                                    Specifies the name of the file to which the character string is written. Include a path with the file name if the file is in a directory other than the current default directory. If the specified file does not exist, it will be created automatically.

    cExpression                                                  Specifies the character string that is written to the file. cExpression can be a literal character string, an expression that evaluates to a character string, or a character type symbol, array element, or question.

     

    Examples

                            APPENDTOFILE([QFNAME], "INFSHEET")       Returns 17

     

     

     


    Possible uses

     

    Function

    Result

    Error report

    APPENDTOFILE({FILENAME1}, {FULLNAME})

    13

     

    APPENDTOFILE({FILENAME2}, [INFO])

    12

     

    APPENDTOFILE({FILENAME3}, "INFORMATION SHEET")

    17

     

    APPENDTOFILE([QFILENAME1], {FULLNAME})

    13

     

    APPENDTOFILE([QFILENAME2], [INFO])

    12

     

    APPENDTOFILE([QFILENAME3], "INFORMATION SHEET")

    17

     

    APPENDTOFILE({NONEXISTANT}, [INFO])

    3

    Missing variable : {NONEXISTANT}

    APPENDTOFILE({TODAY}, [INFO])

    3

    Incompatible types in AppendToFile.cFileName.  Found :DATE, required: STRING.

    APPENDTOFILE({CTIME}, [INFO])

    3

    Incompatible types in AppendToFile.cFileName.  Found :TIME, required: STRING.

    APPENDTOFILE({AGE}, [INFO])

    3

    Incompatible types in AppendToFile.cFileName.  Found :NUMERIC, required: STRING.

    APPENDTOFILE({FILENAME1}, [NOQUESTION])

    -999999999

    Missing variable : [NOQUESTION]

    APPENDTOFILE({FILENAME1}, [Q1])

    -999999999

    Incompatible types in AppendToFile.cExpression.  Found :DATE, required: STRING.

    APPENDTOFILE({FILENAME1}, {CTIME})

    -999999999

    Incompatible types in AppendToFile. cExpression.  Found :TIME, required: STRING.

    APPENDTOFILE({FILENAME1}, [QYEARS3])

    -999999999

    Incompatible types in AppendToFile. cExpression.  Found :NUMERIC, required: STRING.

     


    ASIN( ) Function

    Example          See Also

     

     

    ASIN( ) returns in radians the arc sine of a numeric expression. The arcsine is the angle whose sine is number. The returned angle is given in radians in the range -pi/2 to pi/2 where pi = 3.141592.

     

    Syntax

    ASIN( nExpression )

     

    Returns

    Numeric

     

    Arguments

                            nExpression                                                 Specifies the numeric expression whose arc sine ASIN( ) returns. The value of nExpression can range from +1 through –1, and the value ASIN( ) returns can range from  -pi/2 through +pi/2 ( –1.57079 to 1.57079).

     

    Examples

                            ASIN(0.5)                                                       Returns 0.52

                            ASIN (1)                                                         Returns 1.57

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ASIN ({ANGLE})

    -0.523598776

     

    ASIN ([QANGLE])

    -0.523598776

     

    ASIN (-0.5)

    -0.523598776

     

    ASIN ({TODAY})

    -999999999

    Incompatible types in ASin.nExpression.  Found :DATE, required: NUMERIC.

    ASIN ({FULLNAME})

    -999999999

    Incompatible types in ASin. nExpression.  Found :STRING, required: NUMERIC.

    ASIN ({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ASIN ({CTIME})

    -999999999

    Incompatible types in ASin. nExpression.  Found :TIME, required: NUMERIC.

    ASIN ({*JOBS*})

    -999999999

    Incompatible types in ASin. nExpression.  Found :ROSTER, required: NUMERIC.

    ASIN ({^ANAMES^})

    -999999999

    Incompatible types in ASin. nExpression.  Found :ARRAY, required: NUMERIC.

    ASIN ([QSALL])

    -999999999

    Incompatible types in ASin. nExpression.  Found :MATRIX, required: NUMERIC.

     


    AT( ) Function

    Example          See Also

     

     

    Returns the beginning numeric position of the first occurrence of a character expression within another character expression, counting from the leftmost character.  If the character expression isn't found, AT( ) returns 0.  The search performed by AT( ) is case-sensitive.

     

    Syntax

    AT( cExpression1, cExpression2, nExpression )

     

    Returns

    Numeric

     

    Arguments

                             cExpression1                                               Specifies the character expression that AT( ) searches in.

     

                            cExpression2                                                Specifies the character expression that AT( ) searches for.

     

                            nExpression                                                 Integer value that specifies which occurrence (first, second, third, and so on) of cExpression2 is searched for in cExpression1.

     

    Examples

                            AT({FULLNAME}, {LNAME}, 1)                  Returns 7

                            AT(“Lucia Herrera”, “Herrera”, 1)               Returns 7

     

     

     


    Possible uses

     

    Function

    Result

    Error report

    AT({FULLNAME}, {LNAME}, {X})

    7

     

    AT({FULLNAME}, {LNAME},[Q20])

    7

     

    AT({FULLNAME}, {LNAME}, 1)

    7

     

    AT({FULLNAME}, [QLNAME], {X})

    7

     

    AT({FULLNAME}, [QLNAME], [Q20])

    7

     

    AT({FULLNAME}, [QLNAME], 1)

    7

     

    AT({FULLNAME}, "Herrera", {X})

    7

     

    AT({FULLNAME}, "Herrera", [Q20])

    7

     

    AT({FULLNAME}, "Herrera", 1)

    7

     

    AT([QFULLNAME], {LNAME}, {X})

    21

     

    AT([QFULLNAME], {LNAME},[Q20])

    21

     

    AT([QFULLNAME], {LNAME}, 1)

    21

     

    AT([QFULLNAME], [QLNAME], {X})

    21

     

    AT([QFULLNAME], [QLNAME], [Q20])

    21

     

    AT([QFULLNAME], [QLNAME], 1)

    21

     

    AT([QFULLNAME], "Herrera", {X})

    21

     

    AT([QFULLNAME], "Herrera", [Q20])

    21

     

    AT([QFULLNAME], "Herrera", 1)

    21

     

    AT("Natalia Isabel Herrera Baker", {LNAME}, {X})

    16

     

    AT("Natalia Isabel Herrera Baker", {LNAME},[Q20])

    16

     

    AT("Natalia Isabel Herrera Baker", {LNAME}, 1)

    16

     

    AT("Natalia Isabel Herrera Baker", [QLNAME], {X})

    16

     

    AT("Natalia Isabel Herrera Baker", [QLNAME], [Q20])

    16

     

    AT("Natalia Isabel Herrera Baker", [QLNAME], 1)

    16

     

    AT("Natalia Isabel Herrera Baker", "Herrera", {X})

    16

     

    AT("Natalia Isabel Herrera Baker", "Herrera", [Q20])

    16

     

    AT("Natalia Isabel Herrera Baker", "Herrera", 1)

    16

     

    AT({NONEXISTANT}, {LNAME}, {X})

    -999999999

    Missing variable : {NONEXISTANT}

    AT({TODAY}, {LNAME},[Q20])

    -999999999

    Incompatible types in At.cExpression1.  Found :DATE, required: STRING.

    AT({X}, {LNAME}, 1)

    -999999999

    Incompatible types in At.cExpression1.  Found :NUMERIC, required: STRING.

    AT([QFULLNAME], {NONEXISTANT}, {X})

    -999999999

    Missing variable : {NONEXISTANT}

    AT([QFULLNAME], {TODAY},[Q20])

    -999999999

    Incompatible types in At.cExpression2.  Found :DATE, required: STRING.

    AT([QFULLNAME], {X}, 1)

    -999999999

    Incompatible types in At.cExpression2.  Found :NUMERIC, required: STRING.

    AT("Natalia Isabel Herrera Baker", {LNAME}, {FULLNAME})

    -999999999

    Incompatible types in At.nExpression.  Found :STRING, required: NUMERIC.

    AT("Natalia Isabel Herrera Baker", {LNAME}, [Q1])

    -999999999

    Incompatible types in At. nExpression.  Found :DATE, required: NUMERIC.

    AT("Natalia Isabel Herrera Baker", {LNAME}, {NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

     


    ATAN( ) Function

    Example          See Also

     

     

    ATAN( ) returns in radians the arc tangent of a numeric expression. The value returned by ATAN( ) can range from –pi/2 through +pi/2 (–1.57079 to 1.57079) where pi = 3.141592.

     

    Syntax

    ATAN( nExpression )

     

    Returns

    Numeric

     

    Arguments

                            nExpression                                                 Specifies a numeric expression whose arc tangent ATAN( ) returns. nExpression can be any value, and the value ATAN( ) returns can range –pi/2 through +pi/2 (–1.57079 to 1.57079).

     

    Examples

                            ATAN(0.5)                                                     Returns 0.46

                            ATAN(1)                                                         Returns 0.79

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    ATAN({X})

    0.785398163397448

     

    ATAN([Q20])

    0.785398163397448

     

    ATAN(1)

    0.785398163397448

     

    ATAN({TODAY})

    -999999999

    Incompatible types in ATan. nExpression.  Found :DATE, required: NUMERIC.

    ATAN({FULLNAME})

    -999999999

    Incompatible types in ATan. nExpression.  Found :STRING, required: NUMERIC.

    ATAN({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    ATAN({CTIME})

    -999999999

    Incompatible types in ATan. nExpression.  Found :TIME, required: NUMERIC.

    ATAN({*JOBS*})

    -999999999

    Incompatible types in ATan. nExpression.  Found :ROSTER, required: NUMERIC.

    ATAN({^ANAMES^})

    -999999999

    Incompatible types in ATan. nExpression.  Found :ARRAY, required: NUMERIC.

    ATAN([QSALL])

    -999999999

    Incompatible types in ATan. nExpression.  Found :MATRIX, required: NUMERIC.


     BLANK Command

     

    Example          See Also

     

     

    This command blanks out one symbol or multiple symbols. The contents of the specified variable(s) is purged.

     

     

    Syntax

    BLANK Var1, Var2, Var3, ..., Varn

     

    Arguments

                            Varx                                                                 Variable to be blanked. A variable can be a {Symbol}, {^ArrayElement(({Symbol}|[QName]|Number)^}or {^ArrayName^}

     

     

    Examples

                            BLANK {NAME}, {^ANAMES({INDEX})^}, {^AAGES^}


    CDOW( ) Function

    Example          See Also

     

     

    Converts a date (YYYYMMDD) into a text day-of-the-week value.

     

     

    Syntax

    CDOW( dExpression )

     

    Returns

    String

     

    Arguments

                            dExpression                                                  Specifies the date from which CDOW() returns the day.

     

    Examples

                            CDOW({DOM})                                             Returns Wednesday

     

     

    Possible uses

     

    Function

    Result

    Error report

    CDOW({DOM})

    Wednesday

     

    CDOW ([Q2])

    Wednesday

     

    CDOW ({NAME})

    -999999999

    Incompatible types in CDow.dateExpression.  Found :STRING, required: DATE.

    CDOW ({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    CDOW ({*JOBS*})

    -999999999

    Incompatible types in CDow.dateExpression.  Found :ROSTER, required: DATE.

    CDOW ({^ANAMES^})

    -999999999

    Incompatible types in CDow.dateExpression.  Found :ARRAY, required: DATE.

    CDOW ([Q6])

    -999999999

    Incompatible types in CDow.dateExpression.  Found :NUMERIC, required: DATE.

    CDOW ({CTIME})

    -999999999

    Incompatible types in CDow.dateExpression.  Found :TIME, required: DATE.

     


    CLEAN ROSTER Command

    Example          See Also

     

     

    Cleans a Roster. Deletes everything in the Roster and there is no way to recover that information.

     

     

    Syntax

    CLEAN ROSTER {*SourceRosterName*}

     

    Arguments

                            {*SourceRosterName*}                               Name of the Roster to be cleaned.

     

    Examples

                            CLEAN ROSTER {*HHI*}


    CLONE ROSTER Command

    Example          See Also

     

     

    This command creates an exact duplicate of a roster.

     

     

    Syntax

    CLONE ROSTER {*SourceRosterName*} TO {*TargetRosterName*}

     

    Arguments

                            {*SourceRosterName*}                               Name of the Roster to be duplicated.

                            {*TargetRosterName*}                                 Roster name of the new duplicate roster.

     

    Examples

                CLONE ROSTER {*HHI*} TO {*TEMPHHI*}
    CODE( ) Function

    Example          See Also

     

     

    CODE( ) returns the numeric code for a specific character expression in a specific distribution code (DCode). 

     

    Syntax

    CODE( cExpression, {%DcodeName%}, nExpression )

     

    Returns

    Numeric

     

    Arguments

                            cExpression                                                  Specifies the character expression that will be searched in the specified distribution code.

                            {%DcodeName%}                                        Name of the distribution code.

                            nExpression                                                 Integer number that specifies the language to use in the distribution code.

     

    Examples

                            CODE(“Mother”, {%RELATIONSHIPS%}, 1)       Returns 3

     

     

    Possible uses

     

    Function

    Result

    Error report

    CODE({STATUSTXT}, {%MARSTATUS%}, {LANGNO})

    2

     

    CODE({STATUSTXT}, {%MARSTATUS%}, [Q20])

    2

     

    CODE({STATUSTXT}, {%MARSTATUS%}, 1)

    2

     

    CODE([QSTATUS], {%MARSTATUS%}, {LANGNO})

    2

     

    CODE([QSTATUS], {%MARSTATUS%}, [Q20])

    2

     

    CODE([QSTATUS], {%MARSTATUS%}, 1)

    2

     

    CODE("Married", {%MARSTATUS%}, {LANGNO})

    2

     

    CODE("Married", {%MARSTATUS%}, [Q20])

    2

     

    CODE("Married", {%MARSTATUS%}, 1)

    2

     

    CODE({STATUSTXT}, {%MARSTATUS%}, {NAME})

    -999999999

    Incompatible types in Code.nExpression.  Found:STRING, required: NUMERIC.

    CODE({STATUSTXT}, {NONEXISTANT}, 1)

    -999999999

    Missing variable : {NONEXISTANT}

    CODE({STATUSTXT}, {NAME}, 1)

    -999999999

    Incompatible types in Code.DCodeName.  Found:STRING, required: DCode.

    CODE({NONEXISTANT}, {%MARSTATUS%}, {LANGNO})

    -999999999

    Missing variable : {NONEXISTANT}

    CODE({AGE}, {%MARSTATUS%}, [Q20])

    -999999999

    Incompatible types in Code.cExpression.  Found: NUMERIC, required: STRING.

    CODE(“Single”, {%MARSTATUS%}, {NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

     


    >   >=   <   <=   ==   !=      Comparative Functions

    Example          See Also

     

     

    Relational operators work with all numeric, character and date data types.  The function returns a logical value, 1 is true, and 0 is false. The following table lists the comparative operators.

     

    Operator

    Action

    Examples

    < 

    Less than

    23 < 54
    > 

    Greater than

    1 > 2 
    ==

    Equal to

     cVar1 == cVar
    !=

    Not equal to

    5 != 3
    <=

    Less than or equal to

    16 <= 216
    >=

    Greater than or equal to

    32 >= nHisAge

     

     

    Syntax

    nExpression1  > | >= | < | <= | == | !=  nExpression2

    cExpression1  > | >= | < | <= | == | !=  cExpression2

    dExpression1  > | >= | < | <= | == | !=  dExpression2

     

     

    Returns

    Numeric (double)

     

    Arguments

                            Expression1                                                  Specifies the first numeric, character or date expression that will be compared.

                            Expression2                                                  Specifies the second numeric, character or date expression that will be compared.

     


    Examples

                            23 < 54                                                           Returns 1

                            1 > 2                                                               Returns 0

                            cVar1 = “Mary”

                            cVar2 = “Josh”

                            cVar1 == cVar                                              Returns 0

                            5 != 3                                                              Returns 1

                            16 <= 216                                                      Returns 1

                            nHisAge = 20

                            32 >= nHisAge                                             Returns 1

                            d1 = 12/30/1992

                            d2 = 03/19/2001

                            d1 >= d2                                                        Returns 0

                           

     

     

    Possible uses

     

    Function

    Result

    Error report

    {NPOS} < {NNEG}

    0

     

    {NPOS} < 30

    1

     

    {NPOS} < {NONEXISTANT}

    -999999999

    Missing variable : {NONEXISTANT}

    {NPOS} < {TODAY}

    -999999999

    Incompatible types in Abs.value.  Found :DATE, required: NUMERIC.

    {NPOS} < {LNAME}

    -999999999

    Incompatible types in Abs.value.  Found :STRING, required: NUMERIC.

    {NPOS} < {TIME}

    -999999999

    Incompatible types in Abs.value.  Found :TIME, required: NUMERIC.

    {NPOS} < {*HHI*}

    -999999999

    Incompatible types in Abs.value.  Found :ROSTER, required: NUMERIC.

    {NPOS} < {^ANAMES^}

    -999999999

    Incompatible types in Abs.value.  Found :ARRAY, required: NUMERIC.

    ABS({LINTDATE})

    -999999999

    Incompatible types in Abs.value.  Found :DATE, required: NUMERIC.

    ABS({NAME})

    -999999999

    Incompatible types in Abs.value.  Found :STRING, required: NUMERIC.

     


    COMPRESS ROSTER Command

    Example          See Also

     

     

    Deletes lines from the roster {*RosterName*} if the field FieldName is empty.

    This command will compress lines out of a specified roster, if a specified field in that roster is blank. If the field specified is blank for a line that line will be deleted and the other lines moved up. CAUTION: Once a roster is compressed, there is no way to recover the compressed lines.

     

    Syntax

    COMPRESS ROSTER {*RosterName*} ON FieldName

     

    Arguments

                            {*SourceRosterName*}                               Name of the Roster to be searched for compression.

                            {*TargetRosterName*}                                 Field name in the roster to be tested for blank.

     

    Examples

                            COMPRESS ROSTER {*HHI*} ON ID

     


    COS( ) Function

    Example          See Also

     

     

    COS( ) returns the cosine of a specified numeric expression in radians. The returned angle is given in radians in the range -1 to 1.

     

    Syntax

    COS( nExpression )

     

    Returns

    Numeric

     

    Arguments

                            nExpression                                                 Specifies a numeric expression whose cosine COS( ) returns. nExpression can be any value.

     

    Examples

                            COS(0.5)                                                       Returns .88

                            COS (0)                                                          Returns 1

     

     

     

    Possible uses

     

    Function

    Result

    Error report

    COS({ANGLE})

    0.88

     

    COS([QANGLE])

    0.88

     

    COS(-0.5)

    0.88

     

    COS({TODAY})

    -999999999

    Incompatible types in Cos.nExpression.  Found :DATE, required: NUMERIC.

    COS({FULLNAME})

    -999999999

    Incompatible types in Cos.nExpression.  Found :STRING, required: NUMERIC.

    COS({NONEXISTANT})

    -999999999

    Missing variable : {NONEXISTANT}

    COS({CTIME})

    -999999999

    Incompatible types in Cos.nExpression.  Found :TIME, required: NUMERIC.

    COS({*JOBS*})

    -999999999

    Incompatible types in Cos.nExpression.  Found :ROSTER, required: NUMERIC.

    COS({^ANAMES^})

    -999999999

    Incompatible types in Cos.nExpression.  Found :ARRAY, required: NUMERIC.

    COS([QSALL])

    -999999999

    Incompatible types in Cos.nExpression.  Found :MATRIX, required: NUMERIC.


    COUNT( ) Function

    Example          See Also

     

     

    COUNT( ) returns the number of times a specified string occurs in an array.

     

    Syntax

    COUNT( {^ArrayName^}, nExpression1, nExpression2, cExpression )

     

    Returns

    Numeric

     

    Arguments

                            {^ArrayName^}                                              Name of the array of the elements to be searched.

                            nExpression1                                                Starting integer index of the array.

                            nExpression2                                                Ending integer index of the array.

                            cExpression                                                  Alpha-numeric string to search for. It can be a literal or the contents of a symbol.  If a literal, quotation marks are needed.

     

    Examples

                            COUNT ({^ANAMES^}, 1, 21, "Miguel")   Returns 2

     

     

     

     


    Possible uses

     

    Function

    Result

    Error report

    COUNT ({^ANAMES^}, {X}, {Y}, "Miguel")

    2

     

    COUNT ({^ANAMES^}, {X}, {Y}, {^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, {X}, {Y}, [QFER])

    2

     

    COUNT ({^AAGES^}, {X}, {Z}, "33")

    3

     

    COUNT ({^ANAMES^}, {X}, [Q21], "Miguel")

    2

     

    COUNT({^ANAMES^},{X},[Q21],{^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, {X}, [Q21], [QFER])

    2

     

    COUNT ({^AAGES^}, {X}, [Q5], "33")

    3

     

    COUNT ({^ANAMES^}, {X}, 21, "Miguel")

    2

     

    COUNT ({^ANAMES^}, {X}, 21, {^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, {X}, 21, [QFER])

    2

     

    COUNT ({^AAGES^}, {X}, 5, "33")

    3

     

    COUNT ({^ANAMES^}, [Q20], {Y}, "Miguel")

    2

     

    COUNT({^ANAMES^},[Q20],{Y},{^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, [Q20], {Y}, [QFER])

    2

     

    COUNT ({^AAGES^}, [Q20], {Z}, "33")

    3

     

    COUNT({^ANAMES^},[Q20],[Q21],"Miguel")

    2

     

    COUNT({^ANAMES^},[Q20],[Q21],{^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, [Q20], [Q21], [QFER])

    2

     

    COUNT ({^AAGES^}, [Q20], [Q5], "33")

    3

     

    COUNT ({^ANAMES^}, [Q20], 21, "Miguel")

    2

     

    COUNT({^ANAMES^},[Q20], 21,{^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, [Q20], 21, [QFER])

    2

     

    COUNT ({^AAGES^}, [Q20], 5, "33")

    3

     

    COUNT ({^ANAMES^}, 1, {Y}, "Miguel")

    2

     

    COUNT ({^ANAMES^}, 1, {Y}, {^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, 1, {Y}, [QFER])

    2

     

    COUNT ({^AAGES^}, 1, {Z}, "33")

    3

     

    COUNT ({^ANAMES^}, 1, [Q21], "Miguel")

    2

     

    COUNT({^ANAMES^},1,[Q21],{^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, 1, [Q21], [QFER])

    2

     

    COUNT ({^AAGES^}, 1, [Q5], "33")

    3

     

    COUNT ({^ANAMES^}, 1, 21, "Miguel")

    2

     

    COUNT ({^ANAMES^}, 1, 21, {^ANAMES(2)^})

    2

     

    COUNT ({^ANAMES^}, 1, 21, [QFER])