19 SUBPROGRAMS FOR ACCESS TO USER LOCATIONS
The following subprograms are available:-
BRESUS Reserve User Location
BRELUS Release User Location
BGETUS Get User Location Index
19.1 BRESUS - Reserve User Location
This subprogram attempts to reserve the specified User
Location, and returns the Index to it.
Calling Sequence
STATUS = BRESUS(JW,USERNO,INDEX)
Input Parameters
JW Secondary YBOS array name.
USERNO (Integer) User Location No.
Output Parameters
INDEX (Integer) Index to User Location
Function Value
BRESUS (Integer) YESUCC Success
YEILUS Illegal User
Location No.
YERSUS User Location No.
already reserved
N.B.
1. The User Location No. USERNO must be in the range
1-32.
2. The User Location may be accessed by reading and
writing to JW(INDEX).
3. If the specified User Location is already reserved,
INDEX will be set to zero, and an error function
value will be returned.
4. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
19.2 BRELUS - Release User Location
This subprogram releases the previously reserved User
Location.
Calling Sequence
STATUS = BRELUS(JW,USERNO)
Input Parameters
JW Secondary YBOS array name.
USERNO (Integer) User Location No.
Output Parameters
None
Function Value
BRELUS (Integer) YESUCC Success
YEILUS Illegal User
Location No.
YENRUS User Location No. not
already reserved
N.B.
1. The User Location No. USERNO must be in the range
1-32.
2. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
19.3 BGETUS - Get Index to User Location
This subprogram returns the Index of the specified User
Location such that it may be read from and written to.
Calling Sequence
STATUS = BGETUS(JW,USERNO,INDEX)
Input Parameters
JW Secondary YBOS array name.
USERNO (Integer) User Location No.
Output Parameters
INDEX (Integer) Index to User Location
Function Value
BGETUS (Integer) YESUCC Success
YEILUS Illegal User
Location No.
YENRUS User Location No. not
already reserved
N.B.
1. The User Location No. USERNO must be in the range
1-32.
2. The User Location may be accessed by reading and
writing to JW(INDEX).
3. If the specified User Location is not already
reserved, INDEX will be set to zero, and an error
function value will be returned.
4. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20 SUBPROGRAMS FOR SEQUENTIAL INPUT/OUTPUT
The basic requirement for input and output is that
individual banks, lists of banks or bank sets be sequentially
accessible from permanent storage in the form of logical
records. Since data is stored in the form of physical records
then the I/O routines should handle any unpacking necessary.
Records that are written should conform to the YBOS defined
formats (defined in Appendix E) while records that are read
should themselves identify changes to the format that might
occur during the course of the experiment.
The Input and Output Routines described below allow
multiple I/O streams to be open simultaneously, such that, for
example, logical records from two input streams may be merged
to one output stream.
For most routines, both optimized and a standard versions
exist. The optimized version will typically result in a 30%
reduction in processing time. The optimized routines are not
supported for network file access.
While this user is allowed to issue MOUNT and OPEN
commands in the VAX/VMS environment, routines have been
provided to perform these operations in VMS and UNIX
environments. The use of these MOUNT/DISMOUNT and OPEN/CLOSE
routines is required in the UNIX env.
The following routines are available:-
BAAPND Append list of banks to an Array
BAREAD Read Logical Record from Array
BAWRIT Write Logical Record to Array
BNREAD Read set of banks from Array
BNWRIT Write set of banks to Array
BEREAD Read Logical Record into Array
BZREAD
BEWRIT Write Logical Record from Array
BZWRIT
BLOPEN Open the specified logical unit for reading
BFOPEN or writing
BLCLOS Close the specified logical unit.
BFCLOS
BLREAD Read one logical record from specified
BFREAD logical unit.
BLPICK Open next logical record on specified
BFPICK logical unit.
BBPICK Read next bank from currently opened
BZPICK logical record on specified logical unit.
BLVERM The routine specifies a logical record verify
mode for the given ybos array.
BLWRIT Write one logical record on specified
BFWRIT logical unit.
BBPUSH Write specified bank to currently opened
logical record on specified logical unit.
BLPUSH Write currently opened logical record to
specified logical unit.
20.1 BAAPND - Append List of Banks to an Array
This subprogram appends a list of banks to the specified
array as if it were a logical record (i.e. the first word of
the array contains an exclusive wordcount of the length,
followed by YBOS banks.)
Calling Sequence
STATUS = BAAPND(JW,LIST,ARRAY,ARRLEN,NWORDS)
Input Parameters
JW YBOS array name holding input data
LIST (Character*1) Bank set name or list of banks
ARRLEN (Integer*4) Maximum length of output array
Output Parameters
ARRAY Array that data is appended to
NWORDS (Integer*4) Actual number of words written to array
Function Value
BAAPND (Integer) YESUCC Success
YELRZL Attempting to write zero length
record
YEAROF Array overflow
(ACP_NODE)
YEBKNG Negative bank length
YEBKOV Insufficient space to create bank
YERSUS User location already reserved
YEBTIL Unrecognized bank Id
YEGRIL Unrecognized group Id
YECHKF Internal consistancy check failed
YESTOF Stack limit exceeded
YENOTA Data not alligned
YEBNKP Bank padded with extra words
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. The LIST parameter must give one of the valid bank
set names or a list of bank names.
3. The ARRLEN parameter is the maximum length of the
output array.
4. The ARRAY parameter is the array to which banks are
appended. It is assumed that the array holds a
logical record.
5. NWORDS will return the length of the data record
appended to the array in Integer units.
6. The Logical Record format is described in detail in
Appendix E.
7. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.2 BAREAD - Read Logical Record from Array
This subprogram reads the the contents of the specified
array as if it were a logical record (i.e. the first word of
the array contains an exclusive wordcount of the length,
followed by YBOS banks.
Calling Sequence
STATUS = BAREAD(IARR,JW,LIST,NWORDS)
Input Parameters
IARR (Integer Array) Input Array
JW YBOS array name
LIST (Character*1) Bank set name
Output Parameters
NWORDS (Integer) Logical record length
Function Value
BAREAD (Integer) YESUCC Success
YELROF Logical Record too
big for free space
YELRLN Logical Record length
inconsistency
YEBKOS Bank out of sequence
YEBKXD Bank length exceeds
data
YEBKNG Negative bank length
YEBKTS Bank length too small
YEBSIL Illegal bank set name
N.B.
1. The Input Array IARR should be setup such that the
first element contains an exclusive wordcount (in
Integer words) of the data following. This data
should be in the form of sequential YBOS banks.
2. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
3. The LIST parameter must give one of the valid bank
set names.
4. NWORDS will return the length of the logical record
in Integer units.
5. If a bank is found to already exist then the previous
incarnation will be deleted and replaced by the
version read from the logical record.
6. The Logical Record format is described in detail in
Appendix E.
7. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.3 BAWRIT - Write Logical Record to Array
This subprogram writes the specified bank set or list of
banks to the specified array in the form of a Logical Record.
Calling Sequence
STATUS = BAWRIT(JW,LIST,IARR,ARRLEN,NWORDS)
Input Parameters
JW YBOS array name
LIST (Character) Bank set name or Bank List
IARR (Integer Array) Array to receive Data
ARRLEN (Integer) Length of the Array
Output Parameters
IARR (Integer Array) Array to receive Data
NWORDS (Integer) Length of data record written to array
Function Value
BAWRIT (Integer) YESUCC Success
YELRZL Zero Length Record
YEOVRF Record overflows Array
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. The LIST parameter may be etiher a single letter bank
set name or a list of 4 character bank names.
3. The Array to receive the data will be setup such that
the first word contains an exclusive count of the no.
of words (in Integer) following in the logical
record.
4. The Logical Record format is described in detail in
Appendix E.
5. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.4 BNREAD - Read Set Of Banks from Array
This subprogram reads the contents of the specified array
as if it were a set of contiguous YBOS banks with an exclusive
wordcount of the length supplied as an argument in the call to
BNREAD.
Calling Sequence
STATUS = BNREAD(IARR,JW,LIST,NWORDS)
Input Parameters
IARR (Integer Array) Input Array
JW YBOS array name
LIST (Character*1) Bank set name
NWORDS (Integer) Total length of YBOS banks
Output Parameters
None
Function Value
BNREAD (Integer) YESUCC Success
YELROF Logical Record too
big for free space
YELRLN Logical Record length
inconsistency
YEBKOS Bank out of sequence
YEBKXD Bank length exceeds
data
YEBKNG Negative bank length
YEBKTS Bank length too small
YEBSIL Illegal bank set name
N.B.
1. The Input Array IARR should be sequential YBOS banks.
The first element in IARR is the first word (bank
name) of a YBOS bank.
2. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
3. The LIST parameter must give one of the valid bank
set names.
4. NWORDS is the total length of the set of sequential
YBOS banks in Integer units.
5. If a bank is found to already exist, then the
previous incarnation will be deleted and replaced by
the version read from the logical record.
6. This read array operation is identical to BAREAD with
the length of the YBOS banks provided as an input
parameter rather than the first word in IARR. BNREAD
returns the same function values as BAREAD.
7. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.5 BNWRIT - Write Set Of Banks to Array
This subprogram writes the specified bank set or list of
banks to the specified array.
Calling Sequence
STATUS = BNWRIT(JW,LIST,IARR,ARRLEN,NWORDS)
Input Parameters
JW YBOS array name
LIST (Character) Bank set name or Bank List
IARR (Integer Array) Array to receive Data
ARRLEN (Integer) Length of the Array
Output Parameters
IARR (Integer Array) Array to receive Data
NWORDS (Integer) Length of YBOS banks written to array
Function Value
BNWRIT (Integer) YESUCC Success
YELRZL Zero Length Record
YEOVRF Record overflows Array
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. The LIST parameter may be either a single letter bank
set name or a list of 4 character bank names.
3. Array IARR receives the specified bank LIST as a
sequential set of banks. The first element in IARR
is the first word (bank name) of the first bank.
4. This write array operation is identical to BAWRIT
with the exlcusive wordcount (no. of 32-bit words)
for the write to IARR returned as NWORDS. Array IARR
does not receive the wordcount. BNWRIT returns the
same function values as BAWRIT.
5. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.6 BEREAD/BZREAD - Read Logical Record into Array
This subprogram reads the next logical record from the
specified logical unit number into the specified Array. It
does not perform any YBOS manipulations. BZREAD uses
optimized I/O while BEREAD uses standard FORTRAN I/O .
Calling Sequence
STATUS = BEREAD(LUNIT,IARR,NWMAX,NWORDS)
STATUS = BZREAD(LUNIT,IARR,NWMAX,NWORDS)
Input Parameters
LUNIT (Integer) Logical Unit Number
IARR (Integer Array) Array to receive data
NXMAX (Integer) Length of the Array
Output Parameters
NWORDS (Integer) Logical record length
Function Value
BEREAD (Integer) YESUCC Success
BZREAD YEILUN Illegal Unit Number
YEIOUS Attempting to use
output unit for input
YEEOF End of File detected
YELROF Logical Record too
big for free space
YELRLN Logical Record length
inconsistency
YEPRBD Too many bad physical
records
YEBKOS Bank out of sequence
YEBKXD Bank length exceeds
data
YEBKNG Negative bank length
YEBKTS Bank length too small
N.B.
1. The specified Logical Unit LUNIT must previously have
been opened via calls to BOS77 (to initialise the
primary YBOS array) and BLOPEN/BFOPEN (to create the
physical record banks) before calling this
subprogram.
2. The Logical Record will be read into the array IARR
such that the first word contains an exclusive count
of the no. of words in the record, thus being
identical to the NWORDS Parameter.
3. NWORDS will return the length of the logical record
in Integer units.
4. A count is kept of the number of read errors
occurring. If this count exceeds 100 (since opening
the unit) then error code YEPRBD is returned.
5. The Physical and Logical Record formats are described
in detail in Appendix E.
20.7 BEWRIT/BZWRIT - Write Logical Record from Array
This subprogram writes the contents of the specified
Array to the specified logical unit in the form of a logical
record. BZWRIT uses optimized I/O while BEWRIT uses standard
FORTRAN I/O .
Calling Sequence
STATUS = BEWRIT(LUNIT,IARR)
STATUS = BZWRIT(LUNIT,IARR)
Input Parameters
LUNIT (Integer) Logical Unit Number
IARR (Integer Array) Array containing Data
Output Parameters
None
Function Value
BEWRIT (Integer) YESUCC Success
BZWRIT YEILUN Illegal Unit Number
YEIOUS Attempting to use
input unit for output
YELRZL Zero Length Record
N.B.
1. The Array must be setup such that the first word
contains an exclusive count (in Integer words) of the
no. of words following.
2. The specified Logical Unit LUNIT must previously have
been opened via calls to BOS77 (to initialise the
primary YBOS array) and BLOPEN/BFOPEN (to create the
physical record banks) before calling this
subprogram.
3. The Physical and Logical Record formats are described
in detail in Appendix E.
20.8 BLOPEN/BFOPEN - Open Logical Unit
This subprogram opens the specified logical unit number.
Calling Sequence
STATUS = BFOPEN(LUNIT,LRMAX,NBUF)
STATUS = BLOPEN(LUNIT,LRMAX)
Input Parameters
LUNIT (Integer) Logical Unit Number
LRMAX (Integer) Physical Record size
in Integer units for
writing, or maximum
physical record size
for reading.
For BFOPEN only:
NBUF (Integer) <<>>
Number of I/O buffers
Output Parameters
None
Function Value
BLOPEN (Integer) YESUCC Success
BFOPEN YEOVRF Insufficient Space
N.B.
1. A named bank '+BUF' is created in the COMMON/BCS/
YBOS array with LRMAX data words. This bank is used
to organize the physical records for subsequent I/O
operations. This implies that BOS77 must be called
before attempting any I/O operations, even if the
data to to transferred is purely resident in
secondary YBOS arrays.
2.
The NBUF parameter is an optional argument for
BFOPEN that determines the number of I/O buffers; the
default is two. The NBUF argument is used in the VAX
environment only. In the VAX environment, NBUF
replaces the RMS buffer count. For BLOPEN, the
default number of I/O buffers is one.
3.
In the case of TAPE devices, the volume must be
mounted via the MOUNT utility for VMS, or the BLPYMT
routine for UNIX or VMS. See BLPYMT and BLPYDM
documentation.
4. In the current version the logical unit number must
still be opened via an ASSIGN or OPEN. The following
is an open example:
For BLOPEN or BFOPEN, use:
Open(unit=lunit,file='file.dat',status='new',
- form='unformatted',recl=lrmax,recordtype='fixed')
Optionally, for BFOPEN, use:
For existing files,
Open(unit=lunit,file='file.dat',status='new',
- form='unformatted',recl=lrmax,recordtype='fixed',
- useropen=ybosio_bioopn)
To create files,
Open(unit=lunit,file='file.dat',status='new',
- form='unformatted',recl=lrmax,recordtype='fixed',
- useropen=ybosio_biocrt)
Failure to use the "Useropen" will result in poor
performance.
5. The user should use the BLPYOP routine to open files
in the UNIX environment. BLPYOP can also be used in
the VMS environment. See BLPYOP and BLPYCL
documentation.
6. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
7. In the BFOPEN context, NBUF determines the number of
I/O buffers. I/O buffers determine the unit of
physical I/O. The size of each I/O buffer must be
such that NUMSEG*4*LPRMAX = n*512 where NUMSEG=8, and
n=1,2,3...This is required so that physical I/O will
be alligned on disk blocks. Note: NUMSEG is the
number of physical records per I/O buffer.
8. Because YBOSIO has been ported to multiple computing
environments, two routines have been provided to
perform MOUNT and OPEN functions, BLPYMT and BLPYOP.
The VAX open specifications above are still valid,
but it is recomended that these routines be used for
newly developed code.
20.9 BLPYMT - Mount A Volume On A Tape Device
This routine mounts the specified volume on the specified
tape device. This routine is intended for UNIX and VMS usage.
Calling Sequence
STATUS = BLPYMT(DEV,UNIT,VOLID,BLKSZ,MODE)
Input Parameters
DEV (Character) Tape device name in native format.
VMS: mua0
UNIX: /xxx/yyy/tps#
UNIT (Integer) Logical Unit Number VMS context.
JFN number UNIX context.
VOLID (Character) Volume label...max six characters.
BLKSZ (Integer) Block size: Max for VMS and defined I/O
size for UNIX.
MODE (Character*4) Read or Write mode...UNIX context only.
Supply as a dummy in the VMS context.
Output Parameters
None
Function Value
BLPYMT (Integer) YESUCC Success
VMS/RMS error or UNIX/RBIO error
N.B.
1. It is essential to note that the UNIX tape device
file name is tps ( is an integer). No other name
format will work.
2. It is essential to note that the UNIX JFN has an
allowed range of 00-99.
20.10 BLPYDM - Dismount A Volume From A Tape Device
This routine dismounts the specified volume from the
specified tape device. This routine is intended for UNIX and
VMS usage.
Calling Sequence
STATUS = BLPYDM(DEV,UNIT)
Input Parameters
DEV (Character) Tape device...VMS context only.
VMS: mua0
UNIT (Integer) JFN Unit Number...UNIX context only.
Output Parameters
None
Function Value
BLPYDM (Integer) YESUCC Success
VMS/RMS error or UNIX/RBIO error
N.B.
1. It is essential to note that the UNIX JFN has an
allowed range of 00-99.
20.11 BLPYOP - Open A File On A Volume
This routine opens the specified file from the specified
volume. This routine is intended for UNIX and VMS usage.
Calling Sequence
STATUS = BLPYOP(LUNIT,FILEN,STAT,RECLN,SEQ,BLKSZ,FAST)
Input Parameters
LUNIT (Integer) Logical Unit Number..
JFN Unit number...UNIX tape context
FILEN (char) File name...includes device name for tapes
VAX : MUA0:XXX.YYY
MIPS : /dev/vtp/tps1:D=XXX.YYY or
/dev/vtp/tps1 where sequence #
is used
STAT (Char) "old" or "new" file...VMS context.
RECLN (Integer) Record length in longwords
SEQ (Integer) File sequence number...UNIX tape context.
Used if no file name present in FILEN.
BLKSZ (Integer) block size ....UNIX tape context
FAST (Logical) Fast mode flag for VMS context.
Output Parameters
FILEN (char>=17) Returned if SEQ # used in UNIX tape
context.
Function Value
BLPYOP (Integer) YESUCC Success
VMS/RMS error or UNIX/RBIO error
N.B.
1. It is essential to note that the UNIX JFN has an
allowed range of 00-99.
2. The RECLN and BLKSZ must be consistent with that
actually used on tapes opened for read. In the UNIX
context, one can determine these values via RBIO
routine calls...RBRECLEN, RBLKLEN....
3. Out of context calling arguments are ignored, but
must be passed.
20.12 BLPYCL - Close A File On A Volume
This routine closes the specified file on the specified
volume. This routine is intended for UNIX and VMS usage.
Calling Sequence
STATUS = BLPYCL(LUNIT)
Input Parameters
LUNIT (Integer) Logical Unit Number.
JFN Unit number...UNIX tape context
Output Parameters
NONE
Function Value
BLPYCL (Integer) YESUCC Success
VMS/RMS error or UNIX/RBIO error
N.B.
1. It is essential to note that the UNIX JFN has an
allowed range of 00-99.
20.13 BLCLOS/BFCLOS - Close Logical Unit
This subprogram closes the specified logical unit number.
Use BFCLOS if the logical unit was opened with BFOPEN and
BLCLOS if the unit was opened with BLOPEN. Any incompletely
filled physical records are written to the unit if this unit
was opened for writing.
Calling Sequence
STATUS = BLCLOS(LUNIT)
STATUS = BFCLOS(LUNIT)
Input Parameters
LUNIT (Integer) Logical Unit Number
Output Parameters
None
Function Value
BLCLOS (Integer) YESUCC Success
BFCLOS YEILUN Illegal Unit
N.B.
1. The named bank '+BUF' is deleted from the COMMON/BCS/
YBOS array.
2. In the current version the logical unit number must
still be closed via CLOSE.
3. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
4. Because YBOSIO has been ported to multiple computing
environments, two routines have been provided to
perform DISMOUNT and CLOSE functions, BLPYDM and
BLPYCL.
1.
20.14 BLREAD/BFREAD - Read Logical Record
This subprogram reads the next logical record from the
specified logical unit number and creates the relevant banks
and bank set. BFREAD uses optimized I/O and requires the use
of BFOPEN and BFCLOS. BLREAD uses standard FORTRAN I/O and
requires the use of BLOPEN and BLCLOS.
Calling Sequence
STATUS = BLREAD(LUNIT,JW,LIST,NWORDS)
STATUS = BFREAD(LUNIT,JW,LIST,NWORDS)
Input Parameters
LUNIT (Integer) Logical Unit Number
JW YBOS array name
LIST (Character*1) Bank set name
Output Parameters
NWORDS (Integer) Logical record length
Function Value
BLREAD (Integer) YESUCC Success
BFREAD YEILUN Illegal Unit Number
YEIOUS Attempting to use
output unit for input
YEEOF End of File detected
YELROF Logical Record too
big for free space
YELRLN Logical Record length
inconsistency
YEPRBD Too many bad physical
records
YEBKOS Bank out of sequence
YEBKXD Bank length exceeds
data
YEBKNG Negative bank length
YEBKTS Bank length too small
YEBSIL Illegal bank set name
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. The LIST parameter must give one of the valid bank
set names.
3. NWORDS will return the length of the logical record
in Integer units.
4. A count is kept of the number of read errors
occurring. If this count exceeds 100 (since opening
the unit) then error code YEPRBD is returned.
5. If a bank is found to already exist then the previous
incarnation will be deleted and replaced by the
version read from the logical record.
6. The Physical and Logical Record formats are described
in detail in Appendix E.
7. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
8. $BANK handling is controlled by a call to BOPTN just
before the BLREAD /BFREAD call.
STATUS = BOPTN(JW,OPTION)
STATUS = BLREAD(...) or BFREAD
where OPTION is an Integer having the following
meanings:-
OPTION = 0 $Banks on tape overwrite $Banks of the
same name and number
in the YBOS array.
OPTION = 1 $Banks on tape do not overwrite $Banks
of the same name and number
in the YBOS array.
20.15 BLPICK/BFPICK - Position Logical Record
This subprogram positions the logical unit at the start
of the next logical record (skipping over any incompletely
read logical record) such that subsequent calls to
BBPICK/BZPICK will pick single banks from the record. BFPICK
uses optimized I/O and requires the use of BFOPEN and BFCLOS.
BLPICK uses standard FORTRAN I/O and requires the use of
BLOPEN and BLCLOS.
Calling Sequence
STATUS = BLPICK(LUNIT,JW,NWORDS)
STATUS = BFPICK(LUNIT,JW,NWORDS)
Input Parameters
LUNIT (Integer) Length of logical record (or
zero if the length was not
known at creation time).
JW YBOS array name
Output Parameters
NWORDS (Integer) Length of logical record (or
zero if length was not known
at creation time).
Function Value
BLPICK (Integer) YESUCC Success
BFPICK YEILUN Illegal Unit Number
YEIOUS Attempting to use
output unit for input
YEEOF End of File detected
YEPRBD Too many bad physical
records
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. NWORDS provids the length of the logical record in
Integer units. It will be set to zero if the length
of the logical record was not known at the time the
record was created .
3. A count is kept of the number of read errors
occurring. If this count exceeds 100 (since opening
the unit) then error code YEPRBD is returned.
4. The Physical and Logical Record formats are described
in detail in Appendix E.
5. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.16 BBPICK/BZPICK - Pick One Bank from Logical Record
This subprogram will read one bank from the currently
opened logical record. BZPICK uses optimized I/O and requires
the use of BFOPEN and BFCLOS. BBPICK uses standard FORTRAN
I/O and requires the use of BLOPEN and BLCLOS.
Calling Sequence
STATUS = BBPICK(LUNIT,JW,IND)
STATUS = BZPICK(LUNIT,JW,IND)
Input Parameters
LUNIT (Integer) Logical Unit Number
JW YBOS array name
Output Parameters
IND (Integer) Index to bank (or zero if
logical record exhausted)
Function Value
BBPICK (Integer) YESUCC Success
BZPICK YEILUN Illegal Unit Number
YEIOUS Attempting to use
output unit for input
YEEOF End of File detected
YELROF Bank to large for free
space
YEPRXL Too many bad physical record
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. If a bank is found to already exist then the previous
incarnation will be deleted and replaced by the
version read from the logical record.
3. The Physical and Logical Record formats are described
in detail in Appendix E.
4. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.17 BLVERM - Specify a Logical Record Verify Mode
This subprogram will specify that bank header words be
verified prior to writting a logical record to a physical
record.
Calling Sequence
STATUS = BLVERM(JW,MODE)
Input Parameters
JW YBOS array name
Output Parameters
MODE (Integer) New verify mode
0 No verification
1 banks verified on output
Function Value
BLVERM (Integer) YESUCC Success
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. If mode is 1, BVERIF will be called to verify bank
headers prior to output of a logical record to a
physical record.
3. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.18 BLWRIT/BFWRIT - Write Logical Record
This subprogram writes the specified bank set or list of
banks to the specified logical unit in the form of a logical
record. BFWRIT uses optimized I/O and requires the use of
BFOPEN and BFCLOS. BLWRIT uses standard FORTRAN I/O and
requires the use of BLOPEN and BLCLOS.
Calling Sequence
STATUS = BLWRIT(LUNIT,JW,LIST)
STATUS = BFWRIT(LUNIT,JW,LIST)
Input Parameters
LUNIT (Integer) Logical Unit Number
JW YBOS array name
LIST (Character) Bank set name or Bank List
Output Parameters
None
Function Value
BLWRIT (Integer) YESUCC Success
BFWRIT YEILUN Illegal Unit Number
YEIOUS Attempting to use
input unit for output
YELRZL Zero Length Record
N.B.
1. The JW array may be either the basic YBOS array in
COMMON/BCS/ or a secondary array.
2. The LIST parameter may be etiher a single letter bank
set name or a list of 4 character bank names.
3. The Physical and Logical Record formats are described
in detail in Appendix E.
4. A call to BVALON prior to using this routine will
result in named bank validation taking place upon
calling this routine. For example,
STATUS = BVALON(JW) (Turn validation on)
STATUS = .... (Call the routine)
STATUS = BVALOF(JW) (Turn validation off)
20.19 BBPUSH - Write one Bank to Logical Record **
This subprogram writes the specified bank, bank set or
list of banks to the currently opened logical record on the
specified logical unit. It may be called several times in
order to all extra banks to the logical record.
Calling Sequence
STATUS = BBPUSH(LUNIT,JW,LIST)
Input Parameters
LUNIT (Integer) Logical Unit
JW YBOS array
LIST (Character) Bank set name or bank list
Output Parameters
None
Function Value
BBPUSH (Integer) YESUCC Success
YEILUN Illegal Unit Number
YEIOUS Attempting to use
input unit for output
N.B.
1. The array name JW may be either the basic YBOS array
in COMMON/BCS/ or a secondary array.
2. The LIST parameter may be either a single letter bank
set name or a list of 4 character bank names.
3. The Physical and Logical Record formats are described
in detail in Appendix E.
** This subprogram is not yet implemented.
20.20 BLPUSH - Push Logical Record **
This subprogram closes the currently opened logical
record for writing (via BBPUSH) on the specified logical unit.
Calling Sequence
STATUS = BLPUSH(LUNIT,JW)
Input Parameters
LUNIT (Integer) Logical Unit Number
JW YBOS array
Output Parameters
None
Function Value
BLPUSH (Integer) YESUCC Success
YEILUN Illegal Unit Number
YEIOUS Attempting to use
input unit for output
N.B.
1. The Physical and Logical Record formats are described
in detail in Appendix E.
** This subprogram is not yet implemented.
next page