DTW_WORDINDEX

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

Returns the character position of the first character in the nth word of a string.

Format

@DTW_WORDINDEX(stringIn, n, stringOut)

@DTW_rWORDINDEX(stringIn, n)

Parameters

Table 112. DTW_WORDINDEX Parameters
Data Type Parameter Use Description
string stringIn IN A variable or literal string.
integer n IN The word position of the word to index. If this value is greater than the number of words in the input string, 0 is returned.
string stringOut OUT A variable that contains the character position of the nth word of stringIn.

Return Codes

Table 113. DTW_WORDINDEX Return Codes
Return Code Explanation
-1001 The server could not process a Net.Data request to allocate memory.
1001 An input parameter contained a NULL value.
1003 An incorrect number of parameters were passed on a function call.
1005 A parameter passed on a function call, required to be a string variable, was of a different variable type.
1006 A literal string was passed on a function call for a parameter which was required to be an output parameter.
1007 A parameter contains a value which is not valid.

Examples

Example 1:

@DTW_WORDINDEX("Now is the time", "3", result)

Example 2:

@DTW_WORDINDEX("Now is the time", "6", result)

Example 3:

@DTW_rWORDINDEX("Now is the time", "2")


[ Top of Page | Previous Page | Next Page | Index ]