This procedure returns a display model for either the numeric date or the numeric time, whichever one is requested in the TYP parameter. A display model is a format that can be displayed to the user to show the form of the requested input. For example, YY/DD/MM is a display model that shows a user that the date must be entered in that form. The procedure creates the display model according to the convention and language specified.
Example
This example obtains a date display model from the ASERIESNATIVE convention. The display model is translated to English and returned in DM_ARY.
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/CNVDSPMODEL.");
DEFINE MAX_NAME_LEN = 17#; % Maximum length of convention
% name
EBCDIC ARRAY CNV_NAME[0:MAX_NAME_LEN - 1], DM_ARY[0:9],
LANG_NAME[0:MAX_NAME_LEN - 1];
INTEGER DM_LEN, RESULT;
REPLACE CNV_NAME BY "ASERIESNATIVE";
REPLACE LANG_NAME BY "ENGLISH";
RESULT := CNV_DISPLAYMODEL(CS_DATE_DISPLAYMODELV, CNV_NAME, LANG_NAME,
DM_LEN, DM_ARY);
WRITE(OUT,<"RESULT = ",J4>,RESULT);
IF RESULT EQL CS_DATAOKV THEN
WRITE(OUT,<"DM_ARY = ",C10>,DM_ARY);
CLOSE(OUT,LOCK);
END.Output
RESULT = 1 DM_ARY = mm/dd/yyyy
In this call, the parameters have the following meanings:
CS_DATE_DISPLAYMODELV represents an integer that requests that the display model for the numeric date be returned. It is one of two display model options:
|
Value |
Value Name |
Meaning |
|
0 |
CS_DATE_DISPLAYMODELV |
The display model is for a numeric date. |
|
1 |
CS_TIME_DISPLAYMODELV |
The display model is for a numeric time. |
CNV_NAME is an EBCDIC array passed to the procedure. It contains the name of the convention from which the date or time model is retrieved. If this parameter contains all blanks or zeros, the procedure uses the hierarchy to determine the convention to be used. Refer to the MultiLingual System Administration, Operations, and Programming Guide for the list of convention names and the explanation of the hierarchy.
LANG_NAME is an EBCDIC array passed to the procedure. It contains the language name to be used in formatting the date or time. If this parameter contains all blanks or zeros, the procedure uses the hierarchy to determine the language to be used. Refer to the MultiLingual System Administration, Operations, and Programming Guide for information about determining the valid language names and an explanation of the hierarchy.
DM_LEN is an integer that contains the number of characters in DM_ARY.
DM_ARY is an EBCDIC array returned to the procedure. It contains the requested display model.
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:
|
CS_ARRAY_TOO_SMALLV (3001) |
CS_FAULTV (1001) |
|
CS_BAD_ARRAY_DESCRIPTIONV (3000) |
CS_DATAOKV (1) |
|
CS_BAD_DATA_LENV (3002) |
CS_LANGUAGE_NOT_FOUNDV (2001) |
|
CS_BAD_TYPE_CODEV (3006) |
CS_SOFTERRV (1002) |
|
CS_CONVENTION_NOT_FOUNDV (2002) |

