CNV_NAMES

This procedure returns a list of convention names and the total number of conventions that are available on the system. This list includes any conventions that are defined.

Example

This example obtains the names of conventions currently available on the system. The result shows an arbitrary list of selected convention names.

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/CNVNAMES.");
  DEFINE MAX_NUM_NAMES       = 45#,    % Maximum number of names
         MAX_NAME_LEN        = 17#;    % Maximum length of convention
                                       % name
  ARRAY LINEOUT[0:14];
  EBCDIC ARRAY NAMES_ARY[0:MAX_NUM_NAMES*MAX_NAME_LEN - 1];
  INTEGER I, RESULT, TOTAL;

  RESULT := CNV_NAMES(TOTAL, NAMES_ARY);
  WRITE(OUT,<"RESULT = ",J4>,RESULT);
  IF RESULT EQL CS_DATAOKV THEN
    BEGIN
    REPLACE LINEOUT BY " " FOR 80;
    WRITE(OUT,80,LINEOUT);
    WRITE(OUT,<"Convention Names">);
    WRITE(OUT,<"----------------">);
    WHILE I <= TOTAL DO
      BEGIN
      WRITE(OUT,<C17>,NAMES_ARY[I*17]);
      I := * + 1;
    END;
  END;
  CLOSE(OUT,LOCK);
END.

Output

RESULT = 1

Convention Names
----------------
ASERIESNATIVE
Netherlands
Denmark
UnitedKingdom1
Turkey
Norway
Sweden
Greece
FranceListing
FranceBureautique
EuropeanStandard

In this call, the parameters have the following meanings:

TOTAL is an integer returned by the procedure. It contains the total number of conventions that reside on the system being used.

NAMES_ARY is an EBCDIC array returned by the procedure. It contains the convention definition names. Each name uses one element of NAMES_ARY. Each name can be up to 17 characters long and is left justified in the field. Any parts of the array that are not used are filled with blanks.

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_DATAOKV (1)

CS_FAULTV (1001)