9.17 CHECKSTRING

Note: Built-In Function Rules     Usage Options

Checks a string contains only allowable characters.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

String to be checked

1

Unlimited

 

 

2

A

Req

List of allowable characters

1

256

 

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return okay code (Y/N)

Y = only contains specified characters

N = contains other characters

1

1

 

 

 

Technical Notes

Alpha fields always contain trailing blanks up to the length of the field. These trailing blanks need to be considered if you use Alpha fields when using this BIF. If trailing blanks are permitted in the String to be checked, then a blank must be provided in the list of allowable characters.

A literal may be used for the List of allowable characters.

If an Alpha field is used for the List of allowable characters, it may contain trailing blanks. For example

USE BUILTIN(CHECKSTRING) WITH_ARGS(#STRING #ALLOW) TO_GET(#YN)

If #ALLOW is Alpha(2) with a value of 'A ', then characters A and blank are checked for in #STRING.

If #ALLOW contains 'AB', only characters A and B are checked for in #STRING. Any trailing blanks in #STRING will result in a return code of N (contains other characters).

Reminder - in RDMLX you may: