This procedure returns a value in RESULT that indicates whether or not the convention name specified in CNV_NAME is currently defined on the system.
This procedure might be used to ensure that a convention used as an input parameter exists on the system on which the program is running.
Example
This example determines whether or not a convention named Sweden is currently available to CENTRALSUPPORT.
BEGIN
$ INCLUDE INTL="*SYMBOL/INTL/ALGOL/PROPERTIES." 10000000 - 49999999
FILE OUT(KIND=DISK,UNITS=CHARACTERS,MYUSE=IO,FILETYPE=0,NEWFILE,
MAXRECSIZE=80,TITLE="OUT/ALGOL/VALIDATENAME.");
DEFINE MAX_NAME_LEN = 17#; % Maximum length of convention
% name
EBCDIC ARRAY CNV_NAME[0:MAX_NAME_LEN - 1];
INTEGER RESULT;
REPLACE CNV_NAME BY "SWEDEN";
RESULT := CNV_VALIDATENAME(CNV_NAME);
WRITE(OUT,<"RESULT = ",J4>,RESULT);
CLOSE(OUT,LOCK);
END.Output
RESULT = 1
In this call, the parameters have the following meanings:
CNV_NAME is an EBCDIC array passed to the procedure. It contains the name of the convention to be checked. If this parameter contains all blanks or nulls, the RESULT parameter returns a value of 0 (zero) or FALSE. Refer to the MultiLingual System Administration, Operations, and Programming Guide for the list of convention names and the explanation of the hierarchy.
RESULT is an integer returned by the procedure. It indicates whether or not an error occurred during the execution of the procedure. An explanation of the error result values and messages can be found at the end of this section. The values returned by this procedure include:
|
Value |
Condition-Name |
Meaning |
|
0 |
CS_DATAOKV |
The convention name is valid. |
|
1 |
CS_FALSEV |
The convention name is not valid. |

