ADAS Subroutine e2chkb
SUBROUTINE E2CHKB( IUNIT , NBSEL , IBSEL , & IZ0IN , IZ0 , & LOPEN , IRCODE & ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: E2CHKB ********************* C C PURPOSE: TO CHECK THE SELECTED BLOCK (IBSEL) OF DATA EXISTS IN THE C INPUT DATA SET AND IF SO IT REPRESENTS THE ENTERED VALUES OF C 'IZ0IN' (NUCLEAR CHARGE OF SELECTED IONISING ION ELEMENT). C C IT ALSO CLOSES THE INPUT DATA SET ALLOCATION IF OPEN. C C CALLING PROGRAM: SSZD C C SUBROUTINE: C C INPUT : (I*4) IUNIT = UNIT TO WHICH INPUT DATA SET IS ALLOCATED C INPUT : (I*4) NBSEL = TOTAL NUMBER OF DATA-BLOCKS READ FROM INPUT C DATA SET. C INPUT : (I*4) IBSEL = INDEX OF DATA-BLOCK SELECTED FOR ANALYSIS C C INPUT : (I*4) IZ0IN = REQUESTED: NUCLEAR CHARGE OF ELEMENT C INPUT : (I*4) IZ0 = INPUT FILE: NUCLEAR CHARGE OF ELEMENT C C I/O : (L*4) LOPEN = INPUT : .TRUE. => INPUT DATA SET OPEN. C .FALSE. => INPUT DATA SET CLOSED. C OUTPUT: ALWAYS RETURNED AS .FALSE. C OUTPUT: (I*4) IRCODE = RETURN CODE FROM SUBROUTINE: C 0 => NO ERROR DETECTED. C 2 => DISCREPANCY BETWEEN REQUESTED ELEMENT C AND THAT IN INPUT DATA FILE. C 3 => SELECTED DATA-BLOCK OUT OF RANGE OR C DOES NOT EXIST. C C (I*4) I4UNIT = FUNCTION (SEE ROUTINE SECTION BELOW) C CA (c*80) DSNAME = DATA FILE NAME UNDER UNIX, INCLUDING PATH. C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C E2FILE ADAS OPEN DATA SET FOR SELECTED ELEMENT C I4UNIT ADAS FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES C C AUTHOR: PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC) C K1/0/37 C JET EXT. 2620 C C DATE: 06/06/91 C C UPDATE: 23/04/93 - PE BRIDEN - ADAS91: ADDED I4UNIT FUNCTION TO WRITE C STATEMENTS FOR SCREEN MESSAGES C C UPDATE: 24/06/93 - PE BRIDEN - ADAS91: CHANGED I4UNIT(0)-> I4UNIT(-1) C C UPDATE: 10/11/94 - L. JALOTA - UPDATED TO RUN UNDER UNIX. C----------------------------------------------------------------------- C----------------------------------------------------------------------- C C----------------------------------------------------------------------- INTEGER IBSEL, IRCODE, IUNIT, IZ0 INTEGER IZ0IN, NBSEL LOGICAL LOPEN