Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CHECK-DATA-TYPE( ) Check operand value

&pagelevel(3)&pagelevel

Domain: String functions/checking functions

The CHECK-DATA-TYPE( ) function checks the data type of strings or operand values to determine whether they satisfy SDF data type requirements (for details, see “Data types” (SDF syntax representation) and “Suffixes for data types” (SDF syntax representation)).
CHECK-DATA-TYPE( ) is used to specify the data type which the input value 'INPUT' must satisfy. This data type conforms to the SDF data type rules, as specified in the //ADD-VALUE statement in the SDF-A program (see the “SDF-A” manual [16]). I.e. the operands of CHECK-DATA-TYPE( ) are fully compatible with those of //ADD-VALUE. Only operand combinations created in conformity with the syntax of //ADD-VALUE are considered. Other combinations will be ignored. Operand combinations are dependent on what is specified for DATA-TYPE. The following list contains a brief summary of all valid operand combinations.

DATA-TYPE=

Valid operand combinations

*NOCHECK

VALUE, PATTERN

*INTEGER

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*X-STRING

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH, ODD

*C-STRING

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*NAME

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH, UNDERSCORE

*ALPHANUMERIC-NAME

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*STRUCTURED-NAME

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*FILENAME
*PARTIAL-FILENAME
*POSIX-FILENAME
*POSIX-PATHNAME

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH, PATTERN,
CAT-ID, USER-ID, VERSION, GENERATION, WILDCARD

*TIME

VALUE

*DATE

VALUE

*COMPOSED-NAME

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*TEXT

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*CAT-ID

VALUE

*KEYWORD

VALUE, KEYSTAR

*KEYWORD-NUMBER

VALUE, KEYSTAR

*VSN

VALUE

*X-TEXT

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH

*FIXED

VALUE, SHORTEST-LENGTH, LONGEST-LENGTH,
DECIMAL-DIGITS-SHORTEST, DECIMAL-DIGITS-LONGEST

*DEVICE

ALIAS, VOLUME-ONLY, DEVICE-CLASS, EXCEPT-DISKS,
EXCEPT-TAPES

*PRODUCT-VERSION

VALUE, CORRECTION-STATE, USER-INTERFACE

Format

CHECK-DATA-TYPE( )

INPUT = string_expression

,DATA-TYPE = *NOCHECK / *INTEGER / *X-STRING / *C-STRING / *NAME / *ALPHANUMERIC-NAME/

*STRUCTURED-NAME / *FILENAME / *FULL-FILENAME / *PARTIAL-FILENAME /

*POSIX-FILENAME / *POSIX-PATHNAME / *TIME / *DATE / *COMPOSED-NAME / *TEXT /

*CAT-ID / *KEYWORD / *KEYWORD-NUMBER / *VSN / *X-TEXT / *FIXED / *DEVICE /

*PRODUCT-VERSION

,SHORTEST-LENGTH = *ANY / arithm_ausdruck

,LONGEST-LENGTH = *ANY / arithm_ausdruck

,LONGEST-LOGICAL-LENGTH = *NONE / arithm_ausdruck

,DECIMAL-DIGITS-SHORTEST = 0 / arithm_ausdruck

,DECIMAL-DIGITS-LONGEST = 0 / arithm_ausdruck

,VALUE = *NO / list-poss: string_expression

,PATTERN = *NO / string_expression

,CAT-ID = *YES / *NO

,USER-ID = *YES / *NO

,VERSION = *YES / *NO

,GENERATION = *YES / *NO

,WILDCARD = *NO / *YES

,KEYSTAR = *NO / *YES

,SEPARATORS = *YES / *NO

,UNDERSCORE = *NO / *YES

,ODD = *YES / *NO

,CORRECTION-STATE = *YES / *NO / *ANY

,USER-INTERFACE = *YES / *NO / *ANY

,ALIAS = *YES / *NO

,VOLUME-ONLY = *NO / *YES

,WILDCARD-TYPE = *SELECTOR / *CONSTRUCTOR

,LOWER-CASE = *NO / *YES

,QUOTES = *OPTIONAL / *MANDATORY

,TEMPORARY-FILE = *YES / *NO

,SCOPE = *ALL / *STD-DISK

,DEVICE-CLASS = *DISK / *TAPE / *DISK-OR-TAPE

,EXCEPT-DISKS = *NONE / list-poss: string_expression

,EXCEPT-TAPES = *NONE / list-poss: string_expression

Result type

BOOLEAN

Input parameters

INPUT = string_expression
Specifies the operand value to be checked.

DATA-TYPE =
Specifies the data type checking criterion.

DATA-TYPE = *NOCHECK
No check is carried out on the data type of the operand value. The only check will be for a match against the wildcard search pattern.
In this case, PATTERN = *NO must not be specified.

DATA-TYPE = *INTEGER
The operand value will be checked to determine if it has the data type integer.

DATA-TYPE = *X-STRING
The operand value will be checked to determine if it has the data type x-string.

DATA-TYPE = *C-STRING
The operand value will be checked to determine if it has the data type c-string.

DATA-TYPE = *NAME
The operand value will be checked to determine if it has the data type name.

DATA-TYPE = *ALPHANUMERIC-NAME
The operand value will be checked to determine if it has the data type alphanumeric-name.

DATA-TYPE = *STRUCTURED-NAME
The operand value will be checked to determine if it has the data type structured-name.

DATA-TYPE = *FILENAME
The operand value will be checked to determine if it has the data type filename.

DATA-TYPE = *FULL-FILENAME
The outdated specification *FULL-FILENAME is still accepted for compatibility reasons. It has the same meaning as DATA-TYPE = *FILENAME.

DATA-TYPE = *PARTIAL-FILENAME
The operand value will be checked to determine if it has the data type partial-filename.

DATA-TYPE = *POSIX-FILENAME
The operand value will be checked to determine if it has the data type posix-filename.

DATA-TYPE = *POSIX-PATHNAME
The operand value will be checked to determine if it has the data type posix-pathname.

DATA-TYPE = *TIME
The operand value will be checked to determine if it has the data type time.

DATA-TYPE = *DATE
The operand value will be checked to determine if it has the data type date.

DATA-TYPE = *COMPOSED-NAME
The operand value will be checked to determine if it has the data type composed-name.

DATA-TYPE = *TEXT
The operand value will be checked to determine if it has the data type text.

DATA-TYPE = *CAT-ID
The operand value will be checked to determine if it has the data type cat-id.

DATA-TYPE = *KEYWORD
The operand value will be checked to determine if it has the data type keyword.

DATA-TYPE = *KEYWORD-NUMBER
The operand value will be checked to determine if it has the data type keyword-number.

DATA-TYPE = *VSN
The operand value will be checked to determine if it has the data type vsn.

DATA-TYPE = *X-TEXT
The operand value will be checked to determine if it has the data type x-text.

DATA-TYPE = *FIXED
The operand value will be checked to determine if it has the data type fixed.

DATA-TYPE = *DEVICE
The operand value will be checked to determine if it has the data type device.

DATA-TYPE = *PRODUCT-VERSION
The operand value will be checked to determine if it has the data type product-version.

SHORTEST-LENGTH = *ANY / arithm_expression
Irrelevant for the date, time, cat-id, keyword and keyword-number data types.
Determines whether the operand value has to satisfy a minimum length in terms of characters or number of bytes (for the x-string data type).
Irrelevant for data types date, time, cat-id, keyword and keyword-number.
For the data type integer, SHORTEST-LENGTH indicates its lowest value.
For the data type fixed, SHORTEST-LENGTH must be combined with DECIMAL-DIGITS-SHORTEST.

LONGEST-LENGTH = *ANY / arithm_expression
Irrelevant for the date, time, cat-id, keyword and keyword-number data types.
Determines whether the operand value has to satisfy a maximum length in terms of characters or number of bytes (for the x-string data type).
Irrelevant for data types date, time, cat-id, keyword and keyword-number.
For the data type integer, LONGEST-LENGTH indicates its highest value.
For the data type fixed, LONGEST-LENGTH must be combined with DECIMAL-DIGITS-LONGEST.

LONGEST-LOGICAL-LENGTH = *NONE / arithm_expression
Only relevant in conjunction with PATTERN = string_expression.
Determines the maximum length within the operand up to which a match is to be sought against a wildcard expression.

LONGEST-LOGICAL-LENGTH = *NONE
The maximum length for the specified data type will be set by SDF.

DECIMAL-DIGITS-SHORTEST = 0 / arithm_expression
Only relevant for the data type fixed.
Determines the minimum number of decimal places which the operand value must have.

DECIMAL-DIGITS-LONGEST = 0 / arithm_expression
Only relevant for the data type fixed.
Determines the maximum number of decimal places which the operand value may have.

VALUE =
Determines what values are permissible as inputs.

VALUE = *NO
Any values which correspond to the specified operand type are permissible. The only restrictions which will be applied are any identified in the operand type specification (e.g. length). *NO is not permitted for operand values of type keyword.

VALUE = list-poss: string_expression
The permitted values are restricted to the values listed. The user can abbreviate the specified values on input. A list of individual values cannot be used for values of type keyword (a specific CHECK-DATA-TYPE must be entered for each individual value).

PATTERN =
Wildcard search pattern, used in searching for the operand value.

PATTERN = *NO
There is no wildcard search pattern.

PATTERN = string_expression
The operand value will be searched to find the specified wildcard search pattern.

CAT-ID = *YES / *NO
Only relevant for filename and partial-filename.
Determines whether the catalog ID may be specified as part of a file name.

USER-ID = *YES / *NO
Only relevant for filename and partial-filename.
Determines whether the user ID may be specified as part of a file name.

VERSION = *YES / *NO
Only relevant for filename and partial-filename.
Determines whether the version designation may be specified as part of a file name.

GENERATION = *YES / *NO
Only relevant for filename and partial-filename.
Determines whether the generation designation may be specified as part of a file name.

WILDCARDS = *NO / *YES
Only relevant for filename, partial-filename, alphanum-name, composed-name and name.
Determines whether the operand value may contain wildcards or placeholder characters.
*YES may not be specified in conjunction with PATTERN = string_expression.

KEYSTAR = *NO / *YES
Only relevant for keyword and keyword-number.
Determines whether the operand value must contain a leading asterisk.

SEPARATORS = *YES / *NO
Only relevant for text.
Determines whether separators may be included.

UNDERSCORE = *NO / *YES
Only relevant for name and composed-name.
Determines whether the operand value may contain underscores.

ODD = *YES / *NO
Only relevant for x-text.
Determines whether an odd number of characters is acceptable.

CORRECTION-STATE = *YES / *NO / *ANY
Only relevant for product-version.
Determines whether the correction state must be specified.*
ANY: No check is made to see if the correction state was specified.

USER-INTERFACE = *YES / *NO / *ANY
Only relevant for product-version.
Determines whether the release state of the user interface may be specified. *ANY: No check is made to see if the release state was specified.

ALIAS = *YES / *NO
Only relevant for device.
Determines whether alias names may be specified.

VOLUME-ONLY = *NO / *YES
Only relevant for device.
Determines whether the volume type is accepted.

WILDCARD-TYPE = *SELECTOR / *CONSTRUCTOR
Only relevant for filename, name, alphanum-name and structured-name.
Determines whether the specified operand value is to be interpreted as a selection string or as a construction string.

LOWER-CASE = *NO / *YES
Only relevant for name.
Determines whether the operand value is allowed to contain small letters.

QUOTES = *OPTIONAL / *MANDATORY
Only relevant for posix-filename and posix-pathname.
Determines whether the operand value is allowed to contain quotes.

TEMPORARY-FILE = *YES / *NO
Only relevant for filename.
Determines whether the name of a temporary file is allowed as the operand value.

SCOPE = *ALL / *STD-DISK
Only relevant for device.
Determines whether the name of any disk device or of a standard disk device is allowed to be specified as the operand value.

SCOPE = *ALL
All the currently supported disk types appear in the list.

SCOPE = *STD-DISK
In addition to the currently supported disk types also older types appear in the list which are still accepted by DMS for compatibility reasons.

DEVICE-CLASS = *DISK / *TAPE / *DISK-OR-TAPE
Only relevant for device.
Determines which device class (disk and/or tape device) the specified device may belong to.

EXCEPT-DISKS = *NONE / list-poss(50): string_expression
Only relevant for device.
Determines which disk devices from the list of available devices must not be specified.

EXCEPT-TAPES = *NONE / list-poss(50): string_expression
Only relevant for device.
Determines which tape devices from the list of available devices must not be specified.

Result

TRUE
The specified operand value satisfies the check criteria.

FALSE
The specified operand value does not satisfy the check criteria.

Error messages

SDP0099    NO MORE VIRTUAL MEMORY AVAILABLE AT THIS MOMENT 
SDP0454    INVALID PARAMETER : '(&00)' 
SDP0459    PARAMETER ERROR OR INVALID PARAMETERS COMBINATION. ADDITIONAL 
           INFORMATION:  ‘(&00)‘ 

Example

/A = CHECK-DATA-TYPE(':CAT:$USER.MYFILE', DATA-TYPE=*FILENAME)
/SHOW-VARIABLE A
A = TRUE 

/A = CHECK-DATA-TYPE(':CAT:$USER.MYFILE', DATA-TYPE=*FILENAME, CAT-ID=*NO)
/SHOW-VARIABLE A
A = FALSE 

/A = CHECK-DATA-TYPE('PAR', DATA-TYPE=*KEYWORD,VALUE='PARAMETERS')
/SHOW-VARIABLE A
A = TRUE 

/A = CHECK-DATA-TYPE('PAR', DATA-TYPE=*KEYWORD, VALUE='PARAMETERS',-
/KEYSTAR=*YES)
/SHOW-VARIABLE A
A =FALSE