CENTRALSTATUS

This procedure returns the name and number of the system default ccsversion, the name of the system default convention, and the name of the system default language.

This procedure might be used to provide a means for application users to inquire about the default settings on the host computer.

Example

This example returns the current values for the system default ccsversion, language, and convention. These are arbitrary system values and might not be the same on every system.

BEGIN

 $ INCLUDE INTL="SYMBOL/INTL/ALGOL/PROPERTIES." 10000000 - 49999999

  FILE OUT(KIND=DISK,UNITS=CHARACTERS,FILEUSE=IO,FILETYPE=0,NEWFILE,
           MAXRECSIZE=80,TITLE="OUT/ALGOL/CENTRALSTATUS.");
  EBCDIC ARRAY SYS_INFO[0:50];
  INTEGER ARRAY CONTROL_INFO[0:7];
  ARRAY LINEOUT[0:14];
  INTEGER RESULT;

  RESULT := CENTRALSTATUS(SYS_INFO, CONTROL_INFO);
  WRITE(OUT,<"RESULT = ",J4>,RESULT);
  IF RESULT EQL CS_DATAOKV THEN
    BEGIN
      REPLACE LINEOUT BY " " FOR 80;
      WRITE(OUT,80,LINEOUT);
      WRITE(OUT,<"SYSTEM DEFAULTS">);
      WRITE(OUT,<"---------------">);
      WRITE(OUT,<"CCSVERSION:",T18,A17>,SYS_INFO[0]);
      WRITE(OUT,<"LANGUAGE:",T18,A17>,SYS_INFO[17]);
      WRITE(OUT,<"CONVENTION:",T18,A17>,SYS_INFO[34]);
      WRITE(OUT,80,LINEOUT);
      WRITE(OUT,<"CONTROL ARRAY">);
      WRITE(OUT,<"FIELD MEANING",T40,"LOCATION",T52,"VALUE">);
      WRITE(OUT,<"-------------",T40,"--------",T52,"-----">);
      WRITE(OUT,<"SYSTEM DEFAULT CCSVERSION NUMBER",T43,"[0]",T54,J4>,
                 CONTROL_INFO[0]);
    END;
  CLOSE(OUT,LOCK);
END.

Output

RESULT = 1

SYSTEM DEFAULTS
---------------
CCSVERSION:      ASERIESNATIVE
LANGUAGE:        ENGLISH
CONVENTION:      ASERIESNATIVE

CONTROL ARRAY FIELD MEANING            LOCATION    VALUE
---------------------------            --------    -----
SYSTEM DEFAULT CCSVERSION NUMBER          [0]        0

In this call, the parameters have the following meanings:

SYS_INFO is an EBCDIC array returned by the procedure. It contains the system default ccsversion, language, and convention name in that order. Each name is 17 characters long. Names shorter than 17 characters are padded on the right with blanks. SYS_INFO should 51 characters to hold 3 names of 17 characters each.

CONTROL_INFO is an integer array returned by the procedure. It should be 8 words long. It contains the following information:

Location

Information

Word[0]

System default ccsversion number

Word[1] through [7]

Reserved

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_SOFTERRV (1002)

CS_DATAOKV (1)