C----------------------------------------------------------------------- C C Subroutine SETIOU C C This subroutine sets the unit numbers for the commonly used I/O C units and the RECL multiplier for direct-access OPEN statements C for the NRCVAX Structure Package. It is called by all the C routines of the package and therefore by changing the numbers C assigned, all the I/O units can be changed for different operating C systems. The assignments are as follows for VAX VMS :-- C C IOUNIT Value General System File or General System C Array Device Symbol C C 1 1 Crystal Data File ICD C 2 2 Reflection Data File IRE C 3 3 Line-printer Output File LPT C 4 4 -- C 5 5 Terminal Input ITR C 6 6 Terminal Output ITP C 7 7 -- C 8 8 -- C 9 9 -- C 10 10 -- C C The values of the 5 general symbols are set by the subroutine and C assigned to the general system symbol. C C The 5 other values are set, but are not automatically assigned to a C symbol generally used by the system. These are units 4,7,8,9 & 10. C C To change the values, alter the numbers assigned to IOUNIT(i). C Ensure that there are no duplicate assignments. C C The RECL length multiplier, IBYLEN, is the number used to get the C RECL parameter of OPEN statements for direct-access files to the C correct value. C For the VAX it is 1, i.e. the record-length is specified as C the number of 4-byte variables/record. For other systems it may be C necessary to change the length to bytes, in which case the value C should be 4. C C The values in IOUNIT are used in all free form input C C----------------------------------------------------------------------- SUBROUTINE SETIOU (ICD,IRE,LPT,ITR,ITP,IBYLEN) INCLUDE 'IATSIZ' COMMON /IOUASS/ IOUNIT(12) C----------------------------------------------------------------------- C Setup for the various machines and compilers C----------------------------------------------------------------------- IF (MNCODE .EQ. 'VAXVMS') THEN IBYLEN = 1 ELSE IBYLEN = 4 ENDIF C----------------------------------------------------------------------- C First the 5 general units (for ICD, IRE, LPT, ITR and ITP C----------------------------------------------------------------------- IOUNIT( 1) = 1 IOUNIT( 2) = 2 IOUNIT( 3) = 3 IOUNIT( 5) = 5 IOUNIT( 6) = 6 C----------------------------------------------------------------------- C Now the remaining less general units C----------------------------------------------------------------------- IOUNIT( 4) = 4 IOUNIT( 7) = 7 IOUNIT( 8) = 8 IOUNIT( 9) = 9 IOUNIT(10) = 10 C----------------------------------------------------------------------- C Save the value of IBYLEN C----------------------------------------------------------------------- IOUNIT(12) = IBYLEN C----------------------------------------------------------------------- C Assign the General System units to save having to do it in each C system routine C----------------------------------------------------------------------- ICD = IOUNIT(1) IRE = IOUNIT(2) LPT = IOUNIT(3) ITR = IOUNIT(5) ITP = IOUNIT(6) RETURN END