This procedure returns the default lines per page and default characters per line values from the specified convention. Each convention provides values for these items to be used by default with printed output.
Example
This example obtains default lines per page and characters per line from the Denmark convention.
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/CNVFORMSIZE.");
DEFINE MAX_NAME_LEN = 17#; % Maximum length of convention
% name
EBCDIC ARRAY CNV_NAME[0:MAX_NAME_LEN - 1];
INTEGER LPP, CPL, RESULT;
REPLACE CNV_NAME BY "DENMARK";
RESULT := CNV_FORMSIZE(CNV_NAME, LPP, CPL);
WRITE(OUT,<"RESULT = ",J4>,RESULT);
IF RESULT EQL CS_DATAOKV THEN
BEGIN
WRITE(OUT,<"Lines per Page = ",J2>,LPP);
WRITE(OUT,<"Characters per Line = ",J2>,CPL);
END;
CLOSE(OUT,LOCK);
END.Output
RESULT = 1 Lines per Page = 70 Characters per Line = 82
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 used to specify the printer form default sizes. 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.
LPP is an integer returned by the procedure. It contains the number of lines allowed per page for the specified convention.
CPL is an integer returned by the procedure. It contains the number of characters allowed per line for the specified convention.
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_BAD_ARRAY_DESCRIPTIONV (3000) |
CS_FAULTV (1001) |
|
CS_CONVENTION_NOT_FOUNDV (2002) |
CS_SOFTERRV (1002) |
|
CS_DATAOKV (1) |

