Search Site | Contact Details | FAQ

ADAS Subroutine e4file

      SUBROUTINE E4FILE( IUNIT , IZ0 , IRCODE , DSNAME )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: E4FILE *********************
C
C  PURPOSE: TO OPEN AN RADIATED POWER COEFFT 'IONELEC' DATA SET
C           BY DEFAULT, OR AN ALTERNATIVE DATA SET IF REQUIRED, FOR
C           RADIATING ELEMENT GIVEN BY IT NUCLEAR CHARGE 'IZ0'.
C           THIS WILL BE CONNECTED TO UNIT 'IUNIT'.
C
C  DATA SET OPENED: '$ADASUSER/DEFADF/<GROUP>/<TYPE>/
C			<GROUP>_<EXT>#<ELEMENT SYMBOL>'
C
C  CALLING PROGRAM: SPZD
C
C  SUBROUTINE:
C
C  INPUT : (I*4)   IUNIT   = UNIT TO WHICH DATA SET WILL BE CONNECTED
C  INPUT : (I*4)   IZ0     = NUCLEAR CHARGE OF ELEMENT REQUESTED
C
C  OUTPUT: (I*4)   IRCODE  = RETURN CODE FROM SUBROUTINE:
C                            0 => DATA SET SUCCESSFULLY CONNECTED
C                            1 => REQUESTED DATA  SET  MEMBER  DOES  NOT
C                                 EXISTS - DATA SET NOT CONNECTED.
C                            9 => REQUESTED DATA  SET  EXISTS BUT CANNOT
C                                 BE OPENED.
C  OUTPUT: (C*80)  DSNAME  = NAME OF OPENED DATA SET UNDER UNIX
C
C          (I*4)   IDLEN   = LENGTH, IN BYTES, OF FIXED 'DSNAME' PREFIX
C          (I*4)   LENF1   = FIRST NON-BLANK CHR OF 'DSNAME' GROUP PART
C          (I*4)   LENF2   = LAST  NON-BLANK CHR OF 'DSNAME' GROUP PART
C          (I*4)   LENF3   = FIRST NON-BLANK CHR OF 'DSNAME' TYPE PART
C          (I*4)   LENF4   = LAST  NON-BLANK CHR OF 'DSNAME' TYPE PART
C	   (I*4)   LENF5   = FIRST NON-BLANK CHR OF 'DSNAME' USERID PART
C          (I*4)   LENF6   = LAST  NON-BLANK CHR OF 'DSNAME' USERID PART
C          (I*4)   LENF7   = FIRST NON-BLANK CHR OF 'DSNAME' USREXT PART
C          (I*4)   LENF8   = LAST  NON-BLANK CHR OF 'DSNAME' USREXT PART
CA         (C*1)   HASH    = '#'   IF NON-BLANK EXT, ELSE ' '.
C          (C*2)   XFESYM  = FUNCTION - (SEE ROUTINES SECTION BELOW)
C          (C*2)   ESYM    = ELEMENT SYMBOL FOR NUCLEAR CHARGE 'IZ0'
C          (C*3)   USREXT  = ADAS SOURCE DATA FILE EXTENSION
C          (C*80)  USERID  = ADAS SOURCE DATA USER ID
C          (C*8)   USRGRP  = ADAS SOURCE DATA GROUPNAME
CA         (C*80)  USRTYP  = SUB-DIRECTORY NAME (OPTIONAL)
CA         (C*5)   DEFADF  = DEFAULT ADF DIRECTORY FOR THIS ROUTINE,I.E.
CA                           ADF19
C
C          (L*4)   LEXIST  = .TRUE.  => REQUESTED  DATA  SET  EXISTS.
C                            .FALSE. => REQUESTED  DATA  SET  DOES  NOT
C                                       EXIST.
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          XXUID      ADAS      FETCHES/SETS ADAS SOURCE DATA USER ID
C          XXSPZD     ADAS      FETCHES/SETS ADAS SOURCE DATA FILENAME
C                               AND FILE EXTENSION
C          XFESYM     ADAS      CHARACTER*2 FUNCTION -
C                               GATHERS ELEMENT SYMBOL FOR NUC. CHARGE
C
C AUTHOR:  PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/37
C          JET EXT. 5023
C
C DATE:    06/06/91
C UPDATE:  31/07/91 - PE BRIDEN: ADDED "ACTION='READ'" TO OPEN STATEMENT
C UPDATE:  08/08/91 - PE BRIDEN: ADDED "IRCODE=9" => OPEN ERROR
C UPDATE:  10/03/93 - PE BRIDEN: ADDED CALL TO XXUID AND USERID VARIABLE
C UPDATE:   2/09/93 - HPS      : ADDED CALL TO XXSPZD AND USRGRP, USRTYP
C                                  AND USREXT NAMES
C                                - NOW ALLOWS ANY INPUT DATASET FILENAME
C                                  AND EXTENSION
C                                - NOW ALLOWS ANY INPUT DATASET USER ID.
C UPDATE:  23/11/93 - PEB      : CORRECT ERROR - A '.' HAD MISTAKENLY
C                                BEEN PLACED BEFORE THE MEMBER NAME IN
C                                VARIABLE DSNAME.
C UPDATE:   4/11/94 - L.JALOTA : MODIFIED FOR UNIX,INCREASED NAME LENGTHS
C UPDATE:   7/11/94 - L.JALOTA : ADDED DEFADF.
C UPDATE:  21/11/94 - L.JALOTA : CORRECTED SIZE OF USRTYP.
C
C UPDATE:  24/03/95 - HPS      : INTRODUCED HASH TO ELIMINATE # IN FILE IF
C                                THERE IS NO EXTENSION PART OF THE FILE NAME
C                                ALTER LOGIC TO ALLOW USRTYP, USREXT TO BE A
C                                SINGLE CHARACTER.
C
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
      CHARACTER*80        DSNAME
      INTEGER             IRCODE,      IUNIT,       IZ0
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk