Wordpos, Dbcs processing functions, Counting option – IBM SC34-5764-01 User Manual

Page 426: Function descriptions, Dbadjust, Dbbracket, Dbadjust dbbracket

Advertising
background image

WORDPOS

In EBCDIC:

WORDPOS('<.B.C> abc','<.A. .B.C> abc')

->

2

WORDPOS('<.A.B>','<.A.B. .A.B><. .B.C. .A.B>',3)

->

4

Applying the word extraction from a string and character comparison rules.

DBCS Processing Functions

This section describes the functions that support DBCS mixed strings. These functions handle mixed
strings regardless of the OPTIONS mode.

Note: When used with DBCS functions, length is always measured in bytes (as opposed to

LENGTH(string)

, which is measured in characters).

Counting Option

In EBCDIC, when specified in the functions, the counting option can control whether the SO and SI are
considered present when determining the length. Y specifies counting SO and SI within mixed strings. N
specifies not to count the SO and SI, and is the default.

Function Descriptions

The following are the DBCS functions and their descriptions.

DBADJUST

DBADJUST(string

)

,operation

In EBCDIC, adjusts all contiguous SI and SO (or SO and SI) characters in string based on the operation
specified. The following are valid operations. Only the capitalized and highlighted letter is needed; all
characters following it are ignored.

Blank changes contiguous characters to blanks (X'4040').

Remove

removes contiguous characters, and is the default.

Here are some EBCDIC examples:

DBADJUST('<.A><.B>a<>b','B')

->

'<.A. .B>a

b'

DBADJUST('<.A><.B>a<>b','R')

->

'<.A.B>ab'

DBADJUST('<><.A.B>','B')

->

'<. .A.B>'

DBBRACKET

DBBRACKET(string)

In EBCDIC, adds SO and SI brackets to a DBCS-only string. If string is not a BCS-only string, a SYNTAX
error results. That is, the input string must be an even number of bytes in length and each byte must be a
valid DBCS value.

Here are some EBCDIC examples:

DBBRACKET('.A.B')

->

'<.A.B>'

DBBRACKET('abc')

->

SYNTAX error

DBBRACKET('<.A.B>')

->

SYNTAX error

404

CICS TS for VSE/ESA: REXX Guide

Advertising