This document discusses the use of functions that were not created by FoxPro but were specifically installed for TAM. For each function, a table is given that contains the purpose of the function, the syntax for using it, what is returned, parameters to use, additional remarks if applicable, and an example of how it could be used.
Functions included in this section are listed below. Click a link to jump to that function.
CODEDESCLOOKUP( )
CDLU( )
D8TO()
EIGHTTOD( )
MOCHR( )
MOVAL( )
SIXTOD( )
Purpose | Returns the name or description for a given code in TAM. It can also return address, phone and other information from the client screen for a given client. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax | CODEDESCLOOKUP(<expC1>,<expC2>)
CDLU(<expC1>,<expC2>) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns | Character | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters | <expC1> Specifies the type of lookup to be preformed. The character expression must be one of the options listed below. Quote marks MUST surround the lookup type.
<expC2> The code to lookup. This character expression may be a field name or a string in quotes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Remarks | On most lookups, the ’-N’ on the lookup type causes only the name or description to be returned. If the ‘-N’ is omitted, both the code and the name/description are returned.
In the "CLIENT" type lookups, a key of "P" returns Prospect information, a key of "p" returns Producer information. Other client keys work as defined. The client code may be substituted for "Key" in the following syntax: the letter code must be in upper case (except for producer) and in quotes, e.g., "C" for customer, "P" for prospect, "p" for Producer, etc. When working from the policy or transact databases for instance, Left(pol_idx,7) may be used to represent the customer code (rec in the lookup codes). Also be aware that the customer code or rec is sometimes named differently in the selections and could be identified as Rec or Customer or Cust, etc. If you use key as "Y", you need to use a company code as rec and if use key as "p", you need to use a producer code as rec. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples | Suggestions for use of "C" field:
Other Client Codes and offsets in the ‘c’ field in INS.DBF may be used for specific items contained in that field. |
Purpose |
Converts a TAM character date into a date expression. This is used for TAM dates that are formatted YYYYMMDD. |
Syntax |
D8TOD(<expC>) |
Returns |
Date |
Parameters |
<expC> Specifies a character date expression with format YYYYMMDD to be converted to a date expression. |
Remarks |
This function is the only function available to convert the YYYYMMDD into a date data type. |
Examples |
D8TOD(date) if date is ‘20030625’, it returns 6/25/2003 as a date type. D8TOD(‘19991203’) returns 12/3/1999 as a date type. |
Purpose | Converts a TAM character date into a date expression. This is used for TAM dates that are formatted MM/DD/YY. |
Syntax | EIGHTTOD(<expC>) |
Returns | Date |
Parameters | <expC> Specifies a character date expression with format MM/DD/YY to be converted to a date expression. |
Remarks | This function should be used instead of CTOD( ), because it handles TAM’s Y2K solution. |
Examples | EIGHTTOD(edate) if edate is ‘03/25/99’, it returns 3/25/1999 as a date type.
EIGHTTOD(‘12/03/95’) returns 12/3/1995 as a date type. |
Purpose | Converts a numeric expression into a TAM character accounting month. |
Syntax | MOCHR(<expN>) |
Returns | Character |
Parameters | <expN> Specifies a numeric expression to be converted into a TAM character accounting month. The last two digits of the numeric expression correspond to the month number. The first two or three digits are the number of years since 1900. |
Remarks | This function can be used in conjunction with MOVAL( ) when adding or subtracting months from the accounting month. |
Examples | MOCHR(9903) returns ‘9903’.
MOCHR(MOVAL(month)+iif(right(month,2)=’12’),89,1)) if month is ‘9812’, it returns ‘9901’. |
Purpose | Converts a TAM character accounting month into a numeric expression. |
Syntax | MOVAL(<expC>) |
Returns | Numeric |
Parameters | <expC> Specifies a character accounting month with format YYMM to be converted to a numeric expression. |
Remarks | This function should be used to add or subtract months from the accounting month and can be used in conjunction with MOCHR( ). |
Examples | MOVAL(month) if month is ‘9903’, it returns 9903.
MOCHR(MOVAL(month)+iif(right(month,2)=’12’),89,1)) if month is ‘9812’, it returns ‘9901’. |
Purpose | Converts a TAM character date into a date expression. This is used for TAM dates that are formatted YYMMDD. |
Syntax | SIXTOD(<expC>) |
Returns | Date |
Parameters | <expC> Specifies a character date expression with format YYMMDD to be converted to a date expression. |
Remarks | This function should be used instead of CTOD( ), because it handles TAM’s Y2K solution. |
Examples | SIXTOD(kdate) if kdate is ‘990325’, it returns 3/25/1999 as a date type.
SIXTOD(‘970430’) returns 4/30/1997 as a date type. |
|