NCEPLIBS-bufr 11.7.1
igetsc.f
Go to the documentation of this file.
1C> @file
2C> @brief Check for an abnormal status code associated with the
3C> processing of a file
4
5C> This function returns a status code associated with any file that
6C> was previously opened via a call to subroutine openbf(), so that
7C> the application program can check whether the BUFRLIB software
8C> encountered any specific problems while processing the file.
9C>
10C> @author J. Ator
11C> @date 2010-05-11
12C>
13C> @param[in] LUNIT -- integer: Fortran logical unit number for
14C> BUFR file
15C> @returns igetsc -- integer:
16C> - 0 = no problems were encountered
17C>
18C> @remarks
19C> - Once subroutine openbf() has been called for LUNIT, this function
20C> can then be called any number of times and at any point throughout
21C> the remainder of the life of the application program. However, it
22C> is most typically called immediately prior to exiting an application
23C> program.
24C>
25C> <b>Program history log:</b>
26C> | Date | Programmer | Comments |
27C> | -----|------------|----------|
28C> | 2010-05-11 | J. Ator | Original author |
29C> | 2014-12-10 | J. Ator | Use modules instead of COMMON blocks |
30C>
31 FUNCTION igetsc(LUNIT)
32
33 USE moda_stcode
34
35C-----------------------------------------------------------------------
36C-----------------------------------------------------------------------
37
38C Make sure the specified logical unit is connected to the library.
39
40 CALL status(lunit,lun,il,im)
41 IF(il.EQ.0) GOTO 900
42
43 igetsc = iscodes(lun)
44
45 RETURN
46 900 CALL bort('BUFRLIB: IGETSC - BUFR FILE IS CLOSED, IT MUST BE'//
47 . ' OPEN')
48 END
subroutine bort(STR)
This subroutine calls subroutine errwrt() to log an error message, then calls subroutine bort_exit() ...
Definition: bort.f:23
function igetsc(LUNIT)
This function returns a status code associated with any file that was previously opened via a call to...
Definition: igetsc.f:32
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:56