SUBROUTINE LOAD_COMMON_BLOCK ( IO_UNIT, FILE_NAME, STATUS ) C---------------------------------------------------------------------- C- C- Purpose and Methods : Initialize the common block for subsequent direct C- access or use of library routines. C- C- This subroutine opens the Lookup Management File, C- initializes the common block from the file, and C- then closes the file. C- C- Inputs : C- IO_UNIT Is the logical unit number to use for input file. C- C- FILE_NAME Is the name of the Lookup System Management file C- to use as input in filling the common block. C- C- Outputs : C- STATUS Is the number of messages generated. For error C- status, check the common block variable C- LSM_ERROR_SEVERITY C- C- filled common block : LEVEL1_LOOKUP. C- C- Controls: None C- C- Comments : C- C- The most useful status for the Lookup System Manager C- Program is the common block variable C- LSM_ERROR_SEVERITY. C- C- Defined 21-FEB-1990 MICHIGAN STATE UNIVERSTITY, TRIGGER CONTROL SOFTWARE C- Created 6-JUN-1990 MICHIGAN STATE UNIVERSITY, TRIGGER CONTROL SOFTWARE C- Updated 10-AUG-1990 MICHIGAN STATE UNIVERSITY, TRIGGER CONTROL SOFTWARE C- Updated 22-AUG-1990 MICHIGAN STATE UNIVERSITY, TRIGGER CONTROL SOFTWARE C- C---------------------------------------------------------------------- IMPLICIT NONE C---------------------------------------------------------------------- C C global declarations C INCLUDE 'LSMP$SOURCE:PARSE_TOKENS.PARAMS' INCLUDE 'LSMP$SOURCE:PARSE_TOKENS.INC' C C C Argument declarations C INTEGER IO_UNIT CHARACTER*(*) FILE_NAME INTEGER STATUS C C Local variables C LOGICAL OK, ERROR C C LSM_ERROR_SEVERITY = ERROR_NONE LSM_ERROR_LINE = 0 LSM_ERROR_CODE = 0 LSM_IOSTAT = 0 MESSAGE_COUNT = 0 CALL INIT_COMMON_BLOCK() CALL INIT_NEXT_WORD() CALL INIT_WIDTHS() CALL INIT_STRINGS() CALL INIT_CLASSES() CALL INIT_MESSAGES() C C open the Lookup System Management File CALL D0OPEN( IO_UNIT, FILE_NAME, 'IF', OK) C IF (VERBOSE) THEN IF ( OK .EQV. .TRUE. ) THEN WRITE (6,*) 'Lookup description file opened.' ELSE WRITE (6,*) 'Error opening description file.' ENDIF ENDIF IF ( OK .EQV. .TRUE. ) THEN C CALL DISPATCH( IO_UNIT, ERROR ) CALL CLOSE_MGMT_FILE( IO_UNIT ) IF (DIAGNOSTICS) CALL CHECK_COMMON_BLOCK() CALL DERIVED_QUANTITIES() ELSE CALL MESSAGE_OUT(MES_OPEN_FAILED , 0, ' ') ENDIF C STATUS = MESSAGE_COUNT C 999 CONTINUE END