DBVALIDATE

Read syntax diagramSkip visual syntax diagram
>>-DBVALIDATE--(--string--+--------+--)------------------------><
                          '-,--'C'-'      

returns 1 if the string is a valid mixed string or SBCS string. Otherwise, returns 0. Mixed string validation rules are:
  1. Only valid DBCS character codes
  2. DBCS string is an even number of bytes in length
  3. EBCDIC only — Proper SO and SI pairing.
In EBCDIC, if C is omitted, only the leftmost byte of each DBCS character is checked to see that it falls in the valid range for the implementation it is being run on (that is, in EBCDIC, the leftmost byte range is from X'41' to X'FE').
Here are some EBCDIC examples:
z='abc<de'

DBVALIDATE('ab<.A.B>')          ->    1
DBVALIDATE(z)                   ->    0

y='C1C20E111213140F'X

DBVALIDATE(y)                   ->    1
DBVALIDATE(y,'C')               ->    0

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfhrxcj.html