ADAS Subroutine e1chkb
SUBROUTINE E1CHKB( IUNIT , NBSEL , IBSEL , & IZ0IN , IZIN , & IZ0 , IZ , & LOPEN , IRCODE & ) C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: E1CHKB ********************* C C PURPOSE: TO CHECK THE SELECTED BLOCK (IBSEL) OF DATA EXISTS IN THE C INPUT DATA SET. C C IF SO IT REPRESENTS THE ENTERED VALUES OF C 'IZ0IN' (NUCLEAR CHARGE OF EMITTING ION) & C 'IZIN' (CHARGE OF EMITTING ION) C C IT ALSO CLOSES THE INPUT DATA SET ALLOCATION IF OPEN. C C CALLING PROGRAM: SSXB 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 EMITTING ION C INPUT : (I*4) IZIN = REQUESTED: CHARGE OF EMITTING ION C C INPUT : (I*4) IZ0 = INPUT FILE: NUCLEAR CHARGE OF EMITTING ION C INPUT : (I*4) IZ = INPUT FILE: CHARGE OF EMITTING ION 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 CHARGES C AND THOSE 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 = NAME OF DATA FILE INCLUDING PATH. C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C E1FILE ADAS OPEN DATA SET FOR SELECTED EMITTER 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. 2520 C C DATE: 03/05/91 C C UPDATE: 23/04/93 - PE BRIDEN - ADAS91: ADDED I4UNIT FUNCTION TO WRITE C STATEMENTS FOR SCREEN MESSAGES C C UPDATE: 24/05/93 - PE BRIDEN - ADAS91: CHANGED I4UNIT(0)-> I4UNIT(-1) C UPDATE: 31/10/94 - LALIT JALOTA - INCREASED SIZE DSNAME TO *80 FOR C UNIX. C C----------------------------------------------------------------------- C C VERSION: 1.1 DATE: 02-05-95 C MODIFIED: UNKNOWN (SOMEONE FROM TESSELLA SUPPORT SERVICES PLC) C - PUT UNDER SCCS CONTROL C C VERSION: 1.2 DATE: 20-07-07 C MODIFIED: Allan Whiteford C - Small modification to comments to allow for automatic C documentation preparation. C C----------------------------------------------------------------------- C C----------------------------------------------------------------------- INTEGER IBSEL, IRCODE, IUNIT, IZ INTEGER IZ0, IZ0IN, IZIN, NBSEL LOGICAL LOPEN