1 FCS

 FCS-11  is  a collection of record-management macros and subroutines used to
 maintain  and manipulate data files. FCS-11, in contrast to RMS-11, supports
 only  sequential and fixed record length file organizations.  This AID file
 contains brief summaries of the MACRO-11 language interface to FCS. See also:

	AID FCS ERRORS 	Information on FCS errors

	AID FCS ERRORS ALL 	Displays all FCS-11 I/O error codes

	AID FCS ERRORS err	Displays individual error code by name

	AID FCS ERRORS nnn	Displays individual error code by number

	AID FCS MACROS		Displays all MACRO-11 interface macro calls

	AID FCS BIGBUFFERS	Displays information on how to use the
				big buffering feature

	AID FCS FLUSH		Displays information on how to use the 
				new flush block buffer feature
2 MACROS

	FCSMC$
	OPEN$R FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPEN$W FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPEN$M FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPEN$U FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPEN$A FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNS$R FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNS$W FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNS$M FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNS$U FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNS$A FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNT$D FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPNT$W FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OPEN$ FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR
	OFID$R FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFID$W FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFID$M FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFID$U FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFID$A FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFID$ FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR
	OFNB$R FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFNB$W FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFNB$M FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFNB$U FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFNB$A FDB,LUN,DSPT,RACC,URBA,URBS,ERR
	OFNB$ FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR
	CLOSE$ FDB,ERR
	READ$ FDB,BKAD,BKSZ,BKVB,BKEF,BKST,BKDN,ERR
	WRITE$ FDB,BKAD,BKSZ,BKVB,BKEF,BKST,BKDN,ERR
	WAIT$	FDB,EFN,BKST,ERR
	GET$ FDB,INADR,MAXCNT,ERR
	GET$R FDB,INADR,MAXCNT,LRCNM,HRCNM,ERR
	GET$S FDB,INADR,MAXCNT,ERR
	PUT$ FDB,OUTADR,OUTCNT,ERR
	PUT$R FDB,OUTADR,OUTCNT,LRCNM,HRCNM,ERR
	PUT$S FDB,OUTADR,OUTCNT,ERR
	DELET$	FDB,ERR
	TRUNC$	FDB,ERR
	FINIT$
	FSRSZ$ NFILES,BFSPAC,PSECT
	FDBDF$
	FDAT$A RTYP,RATT,RSIZ,CNTG,ALOC
	FDRC$A RACC,URBA,URBS
	FDOP$A LUN,DSPT,DFNB,FACC,FACTRL
	FDBF$A EFN,OVBS,MBCT,MBFG
	FDBK$A BKAD,BKSZ,BKVB,BKEF,BKST,BKDN
	FDAT$R FDB,RTYP,RATT,RSIZ,CNTG,ALOC
	FDRC$R FDB,RACC,URBA,URBS
	FDOP$R FDB,LUN,DSPT,DFNB,FACC,FACTRL
	FDBF$R FDB,EFN,OVBS,MBCT,MBFG
	FDBK$R FDB,BKAD,BKSZ,BKVB,BKEF,BKST,BKDN
	FDBSZ$		;DEFINE S.FDB AS SIZE OF FDB
	FDOF$L
	NMBLK$	FNAME,FTYPE,VERS,DEVNAM,UNIT
	NBOF$L
	LDFDB$ FDB
	CMOV$W VAR,OFFSET
	CMOV$B VAR,OFFSET
	CMOV$2 VAR,OFFSET
	CBYTE$ VAR,OFFSET
	CWORD$ VAR,OFFSET
	FCSBT$	GLOBL
	FCSBT$	ARG
	DEFIN$	SYM,VAL
	FDOFF$ OFFSET
	FDOFF$	ARG
	BDOFF$ OFFSET
	BDOFF$	ARG
	NBOFF$	OFFSET
	NBOFF$	ARG
	FSROF$	OFFSET
	FSROF$	ARG
	FDSOF$	OFFSET
	FDSOF$	ARG
	DEF$G VAR,SIZ	;DEFINE GLOBAL OFFSET
	DEF$N VAR,SIZ	;DEFINE NO OFFSET-CALCULATE THE SIZE
	DEF$I IVAL	;INITIALIZE DEFINITION
	DEF$L SYM,SIZ
	RAD50$	STRING,MAXWRD
2 BIGBUFFERS
 Big buffering reduces the number of disk accesses for record I/O by allowing
 multiblock input and output.  Normally, get or put operations are performed
 by accessing the disk one sector at a time. Big buffering allows a specified
 number of sectors to be read or written in a single disk access, which
 reduces the number of head seeks.

 To use big buffers, you need only pick a reasonable buffer size, alter the
 parameters for each occurrence of the FSRSZ$ and FDBF$A macros in your
 program, and link to the proper library:

     1.  The buffer size you choose should be a multiple of 512. bytes, the
         size of one disk block.  5 blocks is a good choice, because it is the
         default amount allocated by a file extension.  Disks tend to contain
         many 5-block chunks.  Larger amounts may increase performance, but
         you may be trading large amounts of memory for speed.

     2.  In your program, you must reserve adequate buffer space and make the
         buffer size known to the FDB.

         The FSRSZ$ macro allows you to specify the total buffer space needed
         by entering a number as its second parameter.  This should be 512.
         bytes for each normal disk file, the chosen buffer size for each big
         buffered file. For example, assume a program with 3 files: one normal
         (512. byte buffer), one with 3 blocks as a big buffer, and one with
         5 blocks as a big buffer. The following reserves the space properly:
          
         	FSRSZ$	3,<<1+3+5>*512.>
          
         In the FDB of each file with a big buffer, you must specify an
         override buffer size with the FDBF$A or FDBF$A macro. For a file with
         5 blocks as a big buffer, use the following assembly-time macro call:
          
         	FDBF$A	<5*512.>

     3.  RSX-11M users (Version 3.2 and later) should link to ANSLIB,
         which contains the proper FCS modules to use big buffers.

2 ERRORS
 When FCS-11 returns an error code to you in byte location F.ERR in the FDB,
 it may be either an I/O error code or  a  directive  error  code.  You  can
 determine which type of code it is by examining byte location  F.ERR+1:

   F.ERR+1 = -1 means that it is a directive error. For a list of
	        directive error codes type AID EXECUTIVE ERRORS.

   F.ERR+1 = 0  means that it is an I/O error. A list of I/O error
		codes follows.



 For a list of all FCS error names and codes, type:

	AID FCS ERRORS ALL

 For AID on an individual error code, type:

	AID FCS ERRORS  xxx

 where xxx is the 3-letter error name, the (negative) decimal error code,
 or the (3-digit) octal numeric value.  For example:

	AID FCS ERRORS ONP
	       -and-
	AID FCS ERRORS -5.
	       -and-
	AID FCS ERRORS 373 
 
 will all access the same error text (the error text for IE.ONP).

3 ALL
 Here is a list of all errors returned by FCS.

	IE.BAD,-01.,377,<Bad parameters>
	IE.IFC,-02.,376,<Invalid function code>
	IE.DNR,-03.,375,<Device not ready>
	IE.VER,-04.,374,<Parity error on device>
	IE.ONP,-05.,373,<Hardware option not present>
	IE.SPC,-06.,372,<Illegal user buffer>
	IE.DNA,-07.,371,<Device not attached>
	IE.DAA,-08.,370,<Device already attached>
	IE.DUN,-09.,367,<Device not attachable>

	IE.EOF,-10.,366,<End of file detected>
	IE.EOV,-11.,365,<End of volume detected>
	IE.WLK,-12.,364,<Write attempt to locked unit>
	IE.DAO,-13.,363,<Data overrun>
	IE.SRE,-14.,362,<Send/receive failure>
	IE.ABO,-15.,361,<Request terminated>
	IE.PRI,-16.,360,<Privilege violation>
	IE.RSU,-17.,357,<Shareable resource in use>
	IE.OVR,-18.,356,<Illegal overlay request>
	IE.BYT,-19.,355,<Odd byte count (or virtual address)>

	IE.BLK,-20.,354,<Logical block number too large>
	IE.MOD,-21.,353,<Invalid UDC module number>
	IE.CON,-22.,352,<UDC connect error>
	IE.NOD,-23.,351,<Caller's nodes exhausted>
	IE.DFU,-24.,350,<Device full>
	IE.IFU,-25.,347,<Index file full>
	IE.NSF,-26.,346,<No such file>
	IE.LCK,-27.,345,<Locked from read/write access>
	IE.HFU,-28.,344,<File header full>
	IE.WAC,-29.,343,<Accessed for write>

	IE.CKS,-30.,342,<File header checksum failure>
	IE.WAT,-31.,341,<Attribute control list format error>
	IE.RER,-32.,340,<File processor device read error>
	IE.WER,-33.,337,<File processor device write error>
	IE.ALN,-34.,336,<File already accessed on LUN>
	IE.SNC,-35.,335,<File id, file number check>
	IE.SQC,-36.,334,<File id, sequence number check>
	IE.NLN,-37.,333,<No file accessed on LUN>
	IE.CLO,-38.,332,<File was not properly closed>
	IE.NBF,-39.,331,<Open - no buffer space available for file>

	IE.RBG,-40.,330,<Illegal record size>
	IE.NBK,-41.,327,<File exceeds space allocated, no blocks>
	IE.ILL,-42.,326,<Illegal operation on file descriptor block>
	IE.BTP,-43.,325,<Bad record type>
	IE.RAC,-44.,324,<Illegal record access bits set>
	IE.RAT,-45.,323,<Illegal record attributes bits set>
	IE.RCN,-46.,322,<Illegal record number - too large>
	IE.ICE,-47.,321,<Internal consistency error>
	IE.2DV,-48.,320,<Rename - two different devices>
	IE.FEX,-49.,317,<Rename - new file name already in use>

	IE.BDR,-50.,316,<Bad directory file>
	IE.RNM,-51.,315,<Can't rename old file system>
	IE.BDI,-52.,314,<Bad directory syntax>
	IE.FOP,-53.,313,<File already open>
	IE.BNM,-54.,312,<Bad file name>
	IE.BDV,-55.,311,<Bad device name>
	IE.BBE,-56.,310,<Bad block on device>
	IE.DUP,-57.,307,<Enter - duplicate entry in directory>
	IE.STK,-58.,306,<Not enough stack space (FCS or FCP)>
	IE.FHE,-59.,305,<Fatal hardware error on device>

	IE.NFI,-60.,304,<File id was not specified>
	IE.ISQ,-61.,303,<Illegal sequential operation>
	IE.EOT,-62.,302,<End of tape detected>
	IE.BVR,-63.,301,<Bad version number>
	IE.BHD,-64.,300,<Bad file header>
	IE.OFL,-65.,277,<Device offline>
	IE.BCC,-66.,276,<Block check, CRC, or framing error>
	IE.ONL,-67.,275,<Device online>
	IE.NNN,-68.,274,<No such node>
	IE.NFW,-69.,273,<Path lost to partner> ;this code must be odd

	IE.BLB,-70.,272,<Bad logical buffer>
	IE.NDR,-72.,270,<No dynamic space available>
	IE.URJ,-73.,267,<Connection rejected by user>
	IE.NRJ,-74.,266,<Connection rejected by network>
	IE.EXP,-75.,265,<File expiration date not reached>
	IE.BTF,-76.,264,<Bad tape format>
	IE.NNC,-77.,263,<Not ANSI "D" format byte count>
	IE.NDA,-78.,262,<No data available>
	IE.NLK,-79.,261,<Task not linked to specified ICS/ICR interrupts>

	IE.NST,-80.,260,<Specified task not installed>
	IE.FLN,-81.,257,<Device offline when offline request was issued>
	IE.IES,-82.,256,<Invalid escape sequence>
	IE.PES,-83.,255,<Partial escape sequence>
	IE.ALC,-84.,254,<Allocation failure>
	IE.ULK,-85.,253,<Unlock error>
	IE.WCK,-86.,252,<Write check failure>
	IE.NTR,-87.,251,<Task not triggered>
	IE.REJ,-88.,250,<Transfer rejected by receiving CPU>
	IE.FLG,-89.,247,<Event flag already specified>

	IE.DSQ,-90.,246,<Disk quota exceeded>
	IE.IQU,-91.,245,<Inconsistent qualifier usage>
	IE.RES,-92.,244,<Circuit reset during operation>
	IE.TML,-93.,243,<Too many links to task>
	IE.NNT,-94.,242,<Not a network task>
	IE.TMO,-95.,241,<Timeout on request>
	IE.CNR,-96.,240,<Connection rejected>
	IE.UKN,-97.,237,<Unknown name>
 
	IS.PND,+00.	   ;Operation pending
	IS.SUC,+01.	   ;Operation complete, success
	IS.RDD,+02.	   ;(RX11) Floppy disk successful completion of
			    a read physical, and deleted data mark was
			    seen in sector header last sector.
	IS.BV,+05.	   ;(A/D read) at least one bad value was read
			    (remainder may be good).  Bad channel is
			    indicated by a negative value in the buffer.
	IS.CR,<15*400+1>   ;Carriage return was terminator
	IS.ESC,<33*400+1>  ;Escape (altmode) was terminator
	IS.CC,<3*400+1>	   ;Control-c was terminator
	IS.ESQ,<233*400+1> ;Escape sequence was terminator
	IS.PES,<200*400+1> ;Partial escape sequence was terminator
	IS.EOT,<4*400+1>   ;EOT was terminator (block mode input)
	IS.TAB,<11*400+1>  ;Tab was terminator (forms mode input)
	IS.TMO,+2.	   ;Request timed out

3 377
#BAD
3 -1.
#BAD
3 BAD
	IE.BAD,-01.,377,<Bad parameters>
3 376
#IFC
3 -2.
#IFC
3 IFC
	IE.IFC,-02.,376,<Invalid function code>
3 375
#DNR
3 -3.
#DNR
3 DNR
	IE.DNR,-03.,375,<Device not ready>
3 374
#VER
3 -4.
#VER
3 VER
	IE.VER,-04.,374,<Parity error on device>
3 373
#ONP
3 -5.
#ONP
3 ONP
	IE.ONP,-05.,373,<Hardware option not present>
3 372
#SPC
3 -6.
#SPC
3 SPC
	IE.SPC,-06.,372,<Illegal user buffer>
3 371
#DNA
3 -7.
#DNA
3 DNA
	IE.DNA,-07.,371,(Device not attached>
3 370
#DAA
3 -8.
#DAA
3 DAA
	IE.DAA,-08.,370,<Device already attached>
3 367
#DUN
3 -9.
#DUN
3 DUN
	IE.DUN,-09.,367,<Device not attachable>
3 366
#EOF
3 -10.
#EOF
3 EOF
	IE.EOF,-10.,366,<End of file detected>
3 365
#EOV
3 -11.
#EOV
3 EOV
	IE.EOV,-11.,365,<End of volume detected>
3 364
#WLK
3 -12.
#WLK
3 WLK
	IE.WLK,-12.,364,<Write attempted to locked unit>
3 363
#DAO
3 -13.
#DAO
3 DAO
	IE.DAO,-13.,363,<Data overrun>
3 362
#SRE
3 -14.
SRE
3 SRE
	IE.SRE,-14.,362,<Send/receive failure>
3 361
#ABO
3 -15.
#ABO
3 ABO
	IE.ABO,-15.,361,<Request terminated>
3 360
#PRI
3 -16.
#PRI
3 PRI
	IE.PRI,-16.,360,<Privilege violation>
3 357
#RSU
3 -17.
#RSU
3 RSU
	IE.RSU,-17.,357,<Shareable resource in use>
3 356
#OVR
3 -18.
#OVR
3 OVR
	IE.OVR,-18.,356,<Illegal overlay request>
3 355
#BYT
3 -19.
#BYT
3 BYT
	IE.BYT,-19.,355,<Odd byte count (or virtual address)>
3 354
#BLK
3 -20.
#BLK
3 BLK
	IE.BLK,-20.,354,<Logical block number too large>
3 353
#MOD
3 -21.
#MOD
3 MOD
	IE.MOD,-21.,353,<Invalid UDC module number>
3 352
#CON
3 -22.
#CON
3 CON
	IE.CON,-22.,352,<UDC connect error>
3 351
#NOD
3 -23.
#NOD
3 NOD
	IE.NOD,-23.,351,<Caller's nodes exhausted>
3 350
#DFU
3 -24.
#DFU
3 DFU
	IE.DFU,-24.,350,<Device full>
3 347
#IFU
3 -25.
#IFU
3 IFU
	IE.IFU,-25.,347,<Index file full>
3 346
#NSF
3 -26.
#NSF
3 NSF
	IE.NSF,-26.,346,<No such file>
3 345
#LCK
3 -27.
#LCK
3 LCK
	IE.LCK,-27.,345,<Locked from read/write access>
3 344
#HFU
3 -28.
#HFU
3 HFU
	IE.HFU,-28.,344,<File header full>
3 343
#WAC
3 -29.
#WAC
3 WAC
	IE.WAC,-29.,343,<Accessed for write>
3 342
#CKS
3 -30.
#CKS
3 CKS
	IE.CKS,-30.,342,<File header checksum failure>
3 341
#WAT
3 -31.
#WAT
3 WAT
	IE.WAT,-31.,341,<Attribute control list format error>
3 340
#RER
3 -32.
#RER
3 RER
	IE.RER,-32.,340,<File processor device read error>
3 337
#WER
3 -33.
#WER
3 WER
	IE.WER,-33.,337,<File processor device write error>
3 336
#ALN
3 -34.
#ALN
3 ALN
	IE.ALN,-34.,336,<File already accessed on LUN>
3 335
#SNC
3 -35.
#SNC
3 SNC
	IE.SNC,-35.,335,<File id, file number check>
3 334
#SQC
3 -36.
#SQC
3 SQC
	IE.SQC,-36.,334,<File id, sequence number check>
3 333
#NLN
3 -37.
#NLN
3 NLN
	IE.NLN,-37.,333,<No file accessed on LUN>
3 332
#CLO
3 -38.
#CLO
3 CLO
	IE.CLO,-38.,332,<File was not properly closed>
3 331
#NBF
3 -39.
#NBF
3 NBF
	IE.NBF,-39.,331,<Open - no buffer space available for file>
3 330
#RBG
3 -40.
#RBG
3 RBG
	IE.RBG,-40.,330,<Illegal record size>
3 327
#NBK
3 -41.
#NBK
3 NBK
	IE.NBK,-41.,327,<File exceeds space allocated, no blocks>
3 326
#ILL
3 -42.
#ILL
3 ILL
	IE.ILL,-42.,326,<Illegal operation on file descriptor block>
3 325
#BTP
3 -43.
#BTP
3 BTP
	IE.BTP,-43.,325,<Bad record type>
3 324
#RAC
3 -44.
#RAC
3 RAC
	IE.RAC,-44.,324,<Illegal record access bits set>
3 323
#RAT
3 -45.
#RAT
3 RAT
	IE.RAT,-45.,323,<Illegal record attributes bits set>
3 322
#RCN
3 -46.
#RCN
3 RCN
	IE.RCN,-46.,322,<Illegal record number - too large>
3 321
#ICE
3 -47.
#ICE
3 ICE
	IE.ICE,-47.,321,<Internal consistency error>
3 320
#2DV
3 -48.
#2DV
3 2DV
	IE.2DV,-48.,320,<Rename - 2 different devices>
3 317
#FEX
3 -49.
#FEX
3 FEX
	IE.FEX,-49.,317,<Rename - new file name already in use>
3 316
#BDR
3 -50.
#BDR
3 BDR
	IE.BDR,-50.,316,<Bad directory file>
3 315
#RNM
3 -51.
#RNM
3 RNM
	IE.RNM,-51.,315,<Can't rename old file system>
3 314
#BDI
3 -52.
#BDI
3 BDI
	IE.BDI,-52.,314,<Bad directory syntax>
3 313
#FOP
3 -53.
#FOP
3 FOP
	IE.FOP,-53.,313,<File already open>
3 312
#BNM
3 -54.
#BNM
3 BNM
	IE.BNM,-54.,312,<Bad file name>
3 311
#BDV
3 -55.
#BDV
3 BDV
	IE.BDV,-55.,311,<Bad device name>
3 310
#BBE
3 -56.
#BBE
3 BBE
	IE.BBE,-56.,310,<Bad block on device>
3 307
#DUP
3 -57.
#DUP
3 DUP
	IE.DUP,-57.,307,<Enter - duplicate entry in directory>
3 306
#STK
3 -58.
#STK
3 STK
	IE.STK,-58.,306,<Not enough stack space (FCS or FCP)>
3 305
#FHE
3 -59.
#FHE
3 FHE
	IE.FHE,-59.,305,<Fatal hardware error on device>
3 304
#NFI
3 -60.
#NFI
3 NFI
	IE.NFI,-60.,304,<File id was not specified>
3 303
#ISQ
3 -61.
#ISQ
3 ISQ
	IE.ISQ,-61.,303,<Illegal sequential operation>
3 302
#EOT
3 -62.
#EOT
3 EOT
	IE.EOT,-62.,302,<End of tape detected>
3 301
#BVR
3 -63.
#BVR
3 BVR
	IE.BVR,-63.,301,<Bad version number>
3 300
#BHD
3 -64.
#BHD
3 BHD
	IE.BHD,-64.,300,<Bad file header>
3 277
#OFL
3 -65.
#OFL
3 OFL
	IE.OFL,-65.,277,<Device offline>
3 276
#BCC
3 -66.
#BCC
3 BCC
	IE.BCC,-66.,276,<Block check, CRC, or framing error>
3 275
#ONL
3 -67.
#ONL
3 ONL
	IE.ONL,-67.,275,<Device online>
3 274
#NNN
3 -68.
#NNN
3 NNN
	IE.NNN,-68.,274,<No such node>
3 273
#NFW
3 -69.
#NFW
3 NFW
	IE.NFW,-69.,273,<Path lost to partner> ;this code must be odd
3 272
#BLB
3 -70.
#BLB
3 BLB
	IE.BLB,-70.,272,<Bad logical buffer>
3 270
#NDR
3 -72.
#NDR
3 NDR
	IE.NDR,-72.,270,<No dynamic space available>
3 267
#URJ
3 -73.
#URJ
3 URJ
	IE.URJ,-73.,267,<Connection rejected by user>
3 266
#NRJ
3 -74.
#NRJ
3 NRJ
	IE.NRJ,-74.,266,<Timeout on request>
3 265
#EXP
3 -75.
#EXP
3 EXP
	IE.EXP,-75.,265,<File expiration date not reached>
3 264
#BTF
3 -76.
#BTF
3 BTF
	IE.BTF,-76.,264,<Bad tape format>
3 263
#NNC
3 -77.
#NNC
3 NNC
	IE.NNC,-77.,263,<Not ANSI "D" format byte count>
3 262
#NDA
3 -78.
#NDA
3 NDA
	IE.NDA,-78.,262,<No data available>
3 261
#NLK
3 -79.
#NLK
3 NLK
	IE.NLK,-79.,261,<Task not linked to specified ICS/ICR interrupts>
3 260
#NST
3 -80.
#NST
3 NST
	IE.NST,-80.,260,<Specified task not installed>
3 257
#FLN
3 -81.
#FLN
3 FLN
	IE.FLN,-81.,257,<Device offline when offline request was issued>
3 256
#IES
3 -82.
#IES
3 IES
	IE.IES,-82.,256,<Invalid escape sequence>
3 255
#PES
3 -83.
#PES
3 PES
	IE.PES,-83.,255,<Partial escape sequence>
3 254
#ALC
3 -84.
#ALC
3 ALC
	IE.ALC,-84.,254,<Allocation failure>
3 253
#ULK
3 -85.
#ULK
3 ULK
	IE.ULK,-85.,253,<Unlock error>
3 252
#WCK
3 -86.
#WCK
3 WCK
	IE.WCK,-86.,252,<Write check failure>
3 246
#DSQ
3 -90.
#DSQ
3 DSQ
	IE.DSQ,-90.,246,<Disk quota exceeded>
3 245
#IQU
3 -91.
#IQU
3 IQU
	IE.IQU,-91.,245,<Inconsistent qualifier usage>
3 244
#RES
3 -92.
#RES
3 RES
	IE.RES,-92.,244,<Circuit reset during operation>
3 243
#TML
3 -93.
#TML
3 TML
	IE.TML,-93.,243,<Too many links to task>
3 242
#NNT
3 -94.
#NNT
3 NNT
	IE.NNT,-94.,242,<Not a network task>
3 241
#TMO
3 -95.
#TMO
3 TMO
	IE.TMO,-95.,241,<Timeout on request>
3 240
#CNR
3 -96.
#CNR
3 CNR
	IE.CNR,-96.,240,<Connection rejected>
3 237
#UKN
3 -97.
#UKN
3 UKN
	IE.UKN,-97.,237,<Unknown name>
2 .FLUSH
#FLUSH
2 FLUSH
 The  FCS  .FLUSH  entry point is designed to flush the block buffer of a file
 being  written  in  record mode.  This text is written to provide suggestions
 for its use.
 
 Why would you ever need to use such a thing?
 
 Consider  the way FCS operates when it is doing PUT$s to a disk file. On each
 PUT$,  FCS  packs a record in to the block buffer.  When the block is full or
 the  file is closed, FCS writes the block to the file.  Thus, you can usually
 not predict when a PUT$ will actually cause I/O to occur. 

 There  can be circumstances where it is necessary for your application that a
 record  actually  be  written to a file.  For example, suppose a task gathers
 information  from  a  lab  device,  writing small records to a file every few
 minutes.  In  the  event  of a system crash, data may be present in the tasks
 block  buffer,  not  yet written to the file.  This data may be lost unless a
 .FLUSH  is  called  after  every PUT$.  You might also want to call .FLUSH to
 flush  the  buffer  if  a  second task needs to read this data from the file,
 without the first task closing the file. 

 When will you never need to use .FLUSH?
 
 .FLUSH  is  never  necessary  for  block  mode (WRITE$) I/O operations or for
 record-mode  (PUT$) operations to a record-oriented device.  The block buffer
 is  always  written  in these cases.  Files being read, of course, never need
 to have a block buffer flushed. 

 Calling .FLUSH when a file is open under these circumstances causes no action
 to occur, except the return of a cleared carry bit and status +1 (success) in
 FDB byte F.ERR.
 
 Why not simply close the file to write out the current buffer and reopen it?
 
 Indeed. Closing the file guarantees that the block buffer is flushed and that
 the file attributes (see below) are written back to the file header. However,
 closing  and  reopening  a  disk  file  frequently causes a FCS and F11ACP to
 execute  quite  a  bit of code and access the disk several times; you may not
 want  to incur this much overhead.  Calling .FLUSH may or may not be the best
 choice under your individual circumstances. 
 
 Performance considerations:
 
 Note  that  calling  .FLUSH  after  every  PUT$ can potentially cause a great
 increase  in  I/O activity, compared to just invoking PUT$s.  One alternative
 might  be  to  call  .FLUSH  only  after  a certain amount of time has passed
 without  another  PUT$  being invoked.  In this way, crash danger to the file
 may be minimized. 
 
 Writing file attributes to a disk file:
 
 When  writing  a  file,  some file attributes, notably F.EFBK and F.HIBK, the
 end-of-file  and  high-allocation  block numbers, are not written to the file
 header  by  FCS  until  the  file is closed.  Thus, even if frequent calls of
 .FLUSH  are  used to ensure that a file contains recent information, the file
 header  will  not  reflect  this  fact  while the file is open.  Another task
 trying to read the file (open for shared read) will find an end-of-file error
 returned  on  the first GET$.  If a system crash occurs, the data in the file
 is  recoverable, but only by manipulating the end-of-file block number in the
 file header, as with PIP /EOF. 
 
 Whenever  new records are being written past the end-of-file which existed at
 OPEN$  time,  this  problem  can  occur.  In  this  sense,  a new file has an
 immediate  "OPEN$ time end-of-file", and a file open for append or update has
 its  old end-of-file as the "OPEN$ time end-of-file".  A file open for modify
 does  not  have  this  problem  because it cannot be extended; the F.EFBK and
 F.HIBK  fields are always correct, even if several tasks are operating on the
 file. 

 Attributes  may  be  written  back to the file header while a file is open by
 using  a  write-attributes  QIO,  function  code  IO.WAT,  using attribute 4.
 (Incidentally,  reading file attributes given a file ID number can be done in
 in a similar way using attribute -4.)
 
 Writing  file attributes is illustrated below, in code purloined from COT.TSK
 module COTWAT:
 
 
	.TITLE COTWAT - WRITE FILE ATTRIBUTES FROM FDB
	.IDENT /01.00/
 
; 
; THIS  SOFTWARE  IS FURNISHED UNDER A LICENSE AND MAY
; BE USED OR COPIED ONLY IN ACCORDANCE WITH THE  TERMS
; OF SUCH LICENSE.
;  
; COPYRIGHT (c) 1981 BY DIGITAL EQUIPMENT CORPORATION.
; ALL RIGHTS RESERVED.
;  
; STEVE RUZICH	28-MAY-81
 
;
; THIS ROUTINE REQUESTS THE F11ACP TO WRITE THE FILE ATTRIBUTES
; FROM THE FCS FILE DESCRIPTOR BLOCK.
;
 
 
	HA.UAT=4			;WRITE USER FILE ATTRIBUTES CODE
 
 
PRMLST:					;QIO PARAMETER LIST
	.WORD	0			;FILE ID POINTER 
	.WORD	ATTLST			;POINTER TO ATTRIBUTE LIST
ATTLST:					;QIO ATTRIBUTE LIST 
	.BYTE	HA.UAT,S.FATT		;WRITE USER FILE ATTRIBUTES
ATTADR:	.WORD	0			;THEY RESIDE AT THE BEGINNING OF FDB
	.WORD	0			;ATTRIBUTE LIST STOPPER
 
;+
; ***- .WRATT - WRITE ATTRIBUTES FROM FDB
;
;    INPUT:	R0 = FILE DESCRIPTOR BLOCK ADDRESS
;
;    OUTPUT:	R0, R4, R5 - PRESERVED
;		R1, R2, R3 - ALTERED
;		CC -	NO ERROR
;		CS -	FCS ERROR CODE IN F.ERR(R0)
;-
.WRATT::MOV	#IO.WAT,R1		;WRITE ATTRIBUTES FUNCTION CODE
	MOV	#2,R2			;THERE ARE TWO DPB PARAMETERS...
	MOV	#PRMLST,R3		;...AT THIS ADDRESS
	MOV	R0,(R3)			;
	ADD	#F.FNB+N.FID,(R3)	;FID ADDRESS IS THE FIRST PARAMETER
	MOV	R0,ATTADR		;FDB ADDRESS IS ADDR OF ATTRIBUTES
	JMP	.XQIO			;HAVE FCS EXECUTE THE QIO$
 
	.END

