%%% UGUIDE_APDX_1.TEX -- Appendix 1 of the revamped AIPS Unix Installation 
%%%                      Reference.
%%%
%%% Cut from main section 91.05.21 by Pat Murphy.
%%%
%%% This file should be included by the main document.  It assumes NRAO_MACROS
%%% and FORTRAN packages are already loaded.
%%%--------------------------------------------------------------------

\centerline{\nraofont APPENDIX 1.  Unix Z Routines}
% hack to write an ``appendix whatever'' in the table of contents; see
% the writecontents and newsection macros in NRAO_MACROS.TEX...
\ifnum\contflag=1\write\contfile{\vskip 2pt\par
 {\noexpand\noindent \noexpand\bf APPENDIX 1.\enspace}\unskip\noexpand\leaderfill
 \rm\the\pageno}\fi

The following are brief (and possibly outdated) descriptions of the
current Z-routines.

\medskip
%%% z routine itemizer - put in a vbox to prevent ugly page breaks.
\def\zitem#1#2{\vbox{\parindent=3.5cm\item{{\tt #1}} #2}\par}

\zitem{IAND.C}{performs bitwise logical AND on Integer arguments
                    (this is an intrinsic function under VMS and
                    perhaps your system;  if so, eliminate it).}

\zitem{IEOR.C}{performs bitwise exclusive OR on Integer arguments
                    (this is an intrinsic function under VMS and
                    perhaps your system;  if so, eliminate it).}

\zitem{IOR.C}{performs bitwise inclusive OR on Integer arguments
                    (this is an intrinsic function under VMS and
                    perhaps your system;  if so, eliminate it).}

\zitem{ZABOR2.C}{establishes {\tt ZABORS} as the routine to which programs
                    should branch when catchable signals are received.
                    Hangup, Interrupt (except for programs {\tt AIPS} and
                    {\tt BATER}) and quit are ignored.  The generic version
                    includes all the AT\&T version 7 UNIX catchable
                    signals.  {\tt ZABOR2} is only called by {\tt ZABORT}.}

\zitem{ZABORS.C}{abort handler established by {\tt ZABOR2}.}

\zitem{ZABORT.FOR}{establishes abort handling to clean up for {\tt AIPS} and
                   tasks in the event of an {\tt ABORTTASK} or otherwise fatal
                    signal.  It calls {\tt ZABOR2} which actually establishes
                    up the abort handler.  {\tt ZABORT} is only called
		    by {\tt ZDCHIN},
                    however, it is designed so that it can also be called
                    to have {\tt ZABOR2} invoke an illegal instruction as a
                    debugging aid (to get a core dump or trace back).}

\zitem{ZACTV8.FOR}{ called by {\tt AU2}, among others, to shed tasks.
                    Determines the full path name of the executable
                    module for the desired task and passes it on to
                    {\tt ZACTV9}.  It now returns the process id returned by
                    {\tt ZACTV9} which can then be used to simplify task
                    monitoring and aborting (see {\tt ZTKILL} and {\tt ZTACT*}
                    below).  The Z programs {\tt ZSTRTA} and {\tt
		    ZSTRTB} stored in {\tt\$AIPGUNIX} also call {\tt ZACTV8}.}

\zitem{ZACTV9.C}{does actual task initiation via {\tt vfork} (use {\tt fork}
                    if {\tt vfork} is not supported on your system) followed by
                    {\tt execl} with the full path name of the
		    executable module provided by {\tt ZACTV8}.  
		    The second argument to {\tt execl} gives the
		    process the name {\tt XXXXXn} where {\tt XXXXX} is the
                    name of the task and {\tt n} is the {\it POPS\/}
		    number of the
                    \AIPS\ shedding the task (\eg, {\tt AIPS3} sheds
		    {\tt UVMAP3}).  It
                    now returns the process id as returned by {\tt vfork} (or
                    {\tt fork}) which can then be used to simplify task
                    monitoring and aborting (see {\tt ZTKILL} and
		    {\tt ZTACT*} below).}

\zitem{ZADDR.C}{determines if the address of two arguments is the same.}

\zitem{ZARGC2.FOR}{close an ARGS TV device (called only by {\tt ZARGCL};
                    stubbed).}

\zitem{ZARGCL.FOR}{close an ARGS TV device (calls {\tt ZARGC2} to perform
                    the actual close).}

\zitem{ZARGMC.FOR}{issues a master clear to an ARGS TV device.}

\zitem{ZARGO2.FOR}{open ARGS TV device (only called by {\tt ZARGOP};
                    stubbed).}

\zitem{ZARGOP.FOR}{open ARGS TV device (calls {\tt ZARGO2} to perform the
                    actual open).}

\zitem{ZARGS.FOR}{sends command to/from the ARGS TV device (stubbed).}

\zitem{ZARGXF.FOR}{translates IIS Model 70 commands into calls to
                      {\tt ZARGS} for ARGS TV devices.}

\zitem{ZB2ASC.C}{converts binary integer to ASCII and places right
                      justified in a string of specified length padded
                      with zeroes.}

\zitem{ZBKLD1.FOR}{initializes the host environment in preparation for
                      the execution of {\tt ZBKLD2} under the task
		      {\tt BAKLD} (fast
                      user data restoration using {\tt tar}).}

\zitem{ZBKLD2.FOR}{processes input tape for the task {\tt BAKLD}.}

\zitem{ZBKLD3.FOR}{cleans up the host environment upon termination of
                      the task {\tt BAKLD}.}

\zitem{ZBKTP1.FOR}{initializes the host environment in preparation for
                      the execution of {\tt ZBKTP2} under the task
		      {\tt BAKTP} (fast
                      user data backup using {\tt tar}).}

\zitem{ZBKTP2.FOR}{writes a file and its extensions to the output tape
                      using {\tt tar} under the task {\tt BAKTP}.}

\zitem{ZBKTP3.FOR}{cleans up the host environment upon termination of
                      the task {\tt BAKTP}.}

\zitem{ZBYMOV.C}{moves a string of bytes (8-bit variety, not AIPS 
                      bytes) from one buffer to another.}

\zitem{ZBYTF2.C}{only called by {\tt ZBYTFL} to performs any required byte
                      interchanging.}

\zitem{ZBYTFL.FOR}{interchanges all lower-ordered and higher-ordered
                      bytes in the words of an input buffer and places
                      the results in an output buffer (byte flip dependent;
                      no interchange is done for machines with no byte flip).}

\zitem{ZC8CL.FOR}{extracts 8-bit ASCII standard characters in a buffer
                      and stores them in another buffer in local character
                      form (opposite of {\tt ZCLC8}).}

\zitem{ZCLC8.FOR}{converts local characters in a buffer to standard
                      8-bit ASCII (opposite of {\tt ZC8CL}).}

\zitem{ZCLOSE.FOR}{closes files associated with logical unit numbers
                      (LUN), removes exclusive use and clears file table
                      (FTAB) array entries (calls {\tt ZLPCL2} for line printer
                      files, {\tt ZTTCLS} for terminals and {\tt
		ZDACLS} for disk files).}

\zitem{ZCMPR2.C}{performs file compression (only called by {\tt ZCMPRS}).}

\zitem{ZCMPRS.FOR}{releases unused disk space in files (calls {\tt ZCMPR2}
                      to perform the actual compression).}

\zitem{ZCPU.C}{returns CPU time of calling process (should return
                      the i/o count as well, but this information is
	not readily accessible under Unix although some flavors support {\tt
	getrusage}; see {\tt\$APLBERK/ZCPU.C}).  The means of
	simply getting the CPU time seems to differ from UNIX to UNIX.  Before
	you invent yet another way, check the generic, stubbed version.  You
	will probably find that itf will work if you use {\tt\#include
	<times.h>} (Berkeley based systems) instead of {\tt\#include
	<sys/times.h>} (AT\&T based systems).  Even so, the units of
	user and system time may be different.}

\zitem{ZCRDIR.C}{given the name of a directory, creates it (called
                      only by the program {\tt IMPFIT}).}

\zitem{ZCREA2.C}{performs actual creation of files (lower-level
                      routine called only by {\tt ZCREAT}).}

\zitem{ZCREAT.FOR}{creates all AIPS files read/written by the {\tt ZFI*} and
                      {\tt ZMI*} routines (calls {\tt ZEXIST} to 
                      check for the files
                      pre-existence, then {\tt ZCREA2} to do the actual file
                      creation).}

\zitem{ZCRLOG.C}{attempts to define or redefine a {\it logical\/} (\ie,
                      environment variable).  Only called by some
                      versions of {\tt ZMOUN2}.}

\zitem{ZDACLS.C}{performs actual close of disk files (lower-level
                      routine called only by {\tt ZCLOSE}, {\tt
                      ZMSGCL}, {\tt ZTPCLS} and {\tt ZTPOPN}).}

\zitem{ZDAOPN.C}{performs actual disk file opens for map and non-map
                      i/o (lower-level routine called only by {\tt ZOPEN},
                      {\tt ZMSGOP} and {\tt ZTPOPN}).}

\zitem{ZDATE.C}{returns local date.  Again, you will
                      probably find that the stubbed generic version
                      will work if you include {\tt <sys/time.h>} (Berkeley
                      based systems) instead of {\tt <time.h>} (Bell based
                      systems) or vice versa.}

\zitem{ZDCHI2.FOR}{called only by {\tt ZDCHIN} to initialize only those
                      system values in the device characteristics
                      common block ({\tt DCHCOM}) that are likely to require
                      modification by an installer including {\tt SPFRMT},
                      {\tt DPFRMT}, {\tt NSHORT}, {\tt TTYCAR}, {\tt
		      SYSTYP} and {\tt SYSVER}.}

\zitem{ZDCHIC.C}{makes various {\it device characteristics\/} as defined
                      in {\tt ZDCHIN} and {\tt ZDCHI2} available
                      to routines written
                      in C (as external variables).  It also determines
                      some of these in a machine independent way and
                      calculates other useful system constants which
                      are also made available to other routines written
                      in C.  {\tt ZDCHIC} is only called by {\tt ZDCHIN}.}

\zitem{ZDCHIN.FOR}{called near the beginning of every main program,
	this routine initializes the disk characteristics
	common ({\tt DCHCOM}). Some of these are hard coded, others
	are read from the system parameter ({\tt SP}) file.
	{\tt ZDCHIN} calls {\tt ZDCHI2} to get some of these values and
	calls {\tt ZDCHIC} to determine other system constants
	in a machine independent way and to make them and
	others available to routines written in C (as
	external variables).}

\zitem{ZDEAC2.FOR}{special close for DeAnza type TV device (only
	called by {\tt ZDEACL}; stubbed).}

\zitem{ZDEACL.FOR}{special close for DeAnza type TV device (calls
	{\tt ZDEAC2} to peform the actual close).}

\zitem{ZDEAMC.FOR}{issues master clear to DeAnza type TV device.}

\zitem{ZDEAO2.FOR}{special open for DeAnza type TV device (only
	called by {\tt ZDEAOP}; stubbed).}

\zitem{ZDEAOP.FOR}{special open for DeAnza type TV device (calls
	{\tt ZDEAO2} to perform the actual open).}

\zitem{ZDEAX2.FOR}{queues an I/O operation to a DeAnza type TV (only
	called by {\tt ZDEAXF}; stubbed).}

\zitem{ZDEAXF.FOR}{queues an I/O operation to a DeAnza type TV
	device (calls {\tt ZDEAX2} to perform the actual I/O).}

\zitem{ZDELA2.C}{called by {\tt ZDELAY} to issue actual delay (this is a
	Fortran routine on Alliant systems).  The delay
	requested can be fractional seconds, however, on
	some systems there is no facility other than {\tt sleep}
	which has a resolution of 1 second at best.  This
	makes interactive TV functions clumsy (e.g.,
	{\tt TVBLINK}).}

\zitem{ZDELAY.FOR}{causes delay of specified time (calls {\tt ZDELA2} to
	perform actual delay).}

\zitem{ZDEST2.C}{performs the actual deletion of files (lower level
	routine only called by {\tt ZDESTR}).}

\zitem{ZDESTR.FOR}{destroys (\ie, deletes) disk files (calls {\tt ZDEST2}
	to perform the actual file deletion).}

\zitem{ZDHPRL.FOR}{convert 64-bit HP floating buffer to local {\tt DOUBLE
	PRECISION} values.}

\zitem{ZDIR.FOR}{given a file type known to \AIPS, a version and a
	file name, builds the full path name to the file.}

\zitem{ZDM2DL.C}{converts Modcomp {\tt REAL*6} or {\tt REAL*8}
	floating point data into
	local double precision floating point.  Only
	called by the non-standard tasks {\tt FILLR} and {\tt FILLM}
	which can read archive tapes from the VLA Modcomp
	on-line control system and create UV datasets under
	\AIPS.}

\zitem{ZDOPRT.FOR}{read a bit map such as produced by {\tt PRTDRW} and convert
	it into a Fortran file that can be spooled to the
	Versatec printer-plotter as a plot.  This version
	spools the plot to the device queue with the logical
	name {\tt PLOTTER} (a null operation under Unix;
	see {\tt \$APLVMS/ZDOPR[2-5]} for examples of
	implementations for other printer/plotter devices).}

\zitem{ZENDPG.FOR}{advances the line printer to avoid burn-out on
	electrostatic type line printers.}

\zitem{ZERRO2.C}{returns the error message associated with a given
	system error code (only called by {\tt ZERROR}).}

\zitem{ZERROR.FOR}{system error processing routine.}

\zitem{ZEXIS2.C}{performs actual test of file existence (lower-level
	routine called only by {\tt ZEXIST}).}

\zitem{ZEXIST.FOR}{determines if a given file exists (calls {\tt ZEXIS2} to
	actually determine the files existence and its size).}

\zitem{ZEXPN2.C}{performs actual file expansion (lower-level routine
	called only by {\tt ZEXPND} and {\tt ZMSGXP}).}

\zitem{ZEXPND.FOR}{increases the size of a non-map file (calls {\tt ZEXPN2}
	to perform the actual expansion).}

\zitem{ZFI2.C}{performs actual non-map disk i/o (lower-level
	routine called by {\tt ZFIO}).}

\zitem{ZFIO.FOR}{performs non-map (i.e., single buffered) i/o.  Calls
	ZFI2 for disk devices and ZTKFI2 for graphics
	devices to perform the actual data transfer.}

\zitem{ZFRE2.C}{lower-level routine of {\tt ZFREE} that examines {\tt\$DA00},
	{\tt\$DA01}, {\tt\$DA02}, \etc. \AIPS\ disks and reports
	free space.  Old versions parse output of {\tt df} command;
	newer versions like {\tt\$APLSUN} use {\tt statfs}; AT\&T
	systems without {\tt statfs} can use {\tt ustat}.}

\zitem{ZFREE.FOR}{displays free disk space info returned by {\tt ZFRE2}.}

\zitem{ZFULLN.FOR}{convert file name to full pathname with no
	logicals (environment variables).}

\zitem{ZGETCH.C}{extracts a single character from a word and places
	it in the least significant bits of an otherwise
	zero integer (the opposite of {\tt ZPUTCH}).}

\zitem{ZGNAME.FOR}{gets the name of the calling process (i.e., {\tt arg0}).
	This may have to be a C routine on some systems
	(\eg, Version 7 UTS).}

\zitem{ZGTBIT.C}{gets N bits from a word starting at a given address
	and returns each bit in a different element of an
	array (the opposite of {\tt ZPTBIT}).}

\zitem{ZHEX.C}{encode an integer into hexadecimal characters.}

\zitem{ZI16IL.FOR}{extracts 16-bit 2's complement integers from a buffer
	and puts them into the local integer form (byte flip
	dependent; calls {\tt ZBYTFL} to ensure the proper byte
	order).}

\zitem{ZI32IL.FOR}{extracts 32-bit 2's complement integers from a buffer
	and puts them into the local integer form (word
	flip dependent; calls {\tt ZBYTFL} to ensure the proper byte
	order).}

%%% \zitem{ZI8IL.FOR}{convert 8-bit unsigned integers in buffer to local
%%%	integers.  Defunct?}

\zitem{ZILI16.FOR}{converts a buffer of local integers to a buffer
	standard 16-bit, 2's complement integers (calls
	{\tt ZBYTFL} to ensure proper byte order).}

\zitem{ZILI32.FOR}{takes local integers from a buffer and creates
	a buffer of 32-bit, 2's complement integers (word
	flip dependent; calls {\tt ZBYTFL} to ensure proper
	byte order).}

\zitem{ZIPACK.FOR}{pack/unpack long integers into short integer
	buffer.}

\zitem{ZIVSOP.FOR}{opens an IIS model IVAS TV device using the IIS
	software package.}

\zitem{ZKDUMP.FOR}{dumps an array in various formats.}

\zitem{ZLASC2.C}{disposes laser printer output by invoking a
	script by the same name, then deletes temporary file, if
	appropriate (only called by {\tt ZLASCL}).}

\zitem{ZLASCL.FOR}{closes laser printer output disk file and calls
	{\tt ZLASC2} to dispose it to the printer, then delete
	it if appropriate.}

\zitem{ZLASIO.FOR}{performs laser printer I/O; calls {\tt ZLASOP} to
	open disk files for laser printer output; calls
	{\tt ZLASCL} to close, dispose and if appropriate,
	delete laser printer output disk files.}

\zitem{ZLASOP.FOR}{creates/opens laser printer output disk files.}

%%%\zitem{ZLDFIL.FOR}{old version of ZPHFIL designed solely for public
%%%	data files.}

\zitem{ZLOCK.C}{opens (if necessary) and applies either a shared
	or exclusive lock to a disk file.}

\zitem{ZLPCL2.C}{spools file to the line printer (lower level
	routine only called by {\tt ZLPCLS}).  Whenever \AIPS\ %
	writes to the line printer, the output is actually
	written to a disk file.  When the ``line printer'' is
	closed, {\tt ZLPCL2} is called to simply print this disk
	file.  This is done via a call to {\tt system} invoking
	the system dependent shell script {\tt ZLPCL2}.}

\zitem{ZLPCLS.FOR}{closes a line printer file, spools it to the line
	printer and deletes it (calls {\tt ZLPCL2} to perform
	the actual spooling; only called by {\tt ZCLOSE}).}

\zitem{ZLPOP2.FOR}{peforms the actual creation/open of a line
	printer output disk file (only called by {\tt ZLPOPN}).}

\zitem{ZLPOPN.FOR}{opens a line printer file (lower level routine
	called only by {\tt ZOPEN}; calls {\tt ZLPOP2} to peform
	the actual creation/open).}

\zitem{ZLWIO.FOR}{much like {\tt ZLASIO} (only called by the task
	{\tt LWPLA}).}

\zitem{ZLWOP.FOR}{creates and opens {\tt LWPLA} laser printer output disk
	file (only called by {\tt ZLWIO}).}

\zitem{ZM70C2.C}{performs the actual close on IIS model 70 and model
	75 type TV devices (lower level routine only called
	by {\tt ZM70CL}).}

\zitem{ZM70CL.FOR}{special close for IIS model 70 and model 75 type TV
	devices (calls {\tt ZM70C2} to perform the actual close).}

\zitem{ZM70M2.C}{performs the actual master clear on IIS model 70
	model 75 type TV devices (lower level routine only
	called by {\tt ZM70MC}).}

\zitem{ZM70MC.FOR}{issues master clear to IIS model 70 and model 75
	type TV devices (calls {\tt ZM70M2} to perform the actual
	master clear).}

\zitem{ZM70O2.C}{performs the actual open on an IIS model 70 or model
	75 type TV device (lower level routine only called
	by {\tt ZM70OP}).}

\zitem{ZM70OP.FOR}{special open for IIS model 70 and model 75 type TV
	devices (calls the lower level routine {\tt ZM70O2} to
	perform the actual open).}

\zitem{ZM70X2.C}{performs the actual i/o on a IIS model 70 or model
	75 type TV device (lower level routine only called
	by {\tt ZM70XF}).}

\zitem{ZM70XF.FOR}{queues an I/O operation to a IIS model 70 or model
	75 type TV device (calls {\tt ZM70X2} to perform the
	actual i/o).}

%%%\zitem{ZMATH4.FOR}{does INTEGER*4 arithmetic on pseudo I*4 arguments (word
%%%	flip dependent; obsolete).}

\zitem{ZMCACL.C}{convert Modcomp compressed ASCII to Hollerith
	characters (only called by the task {\tt FILLR}).} %%% and FILLM?

\zitem{ZMI2.C}{performs the actual map (double buffered,
	asynchronous i/o) on disk files (lower level
	routines called only by {\tt ZMIO}).}

\zitem{ZMIO.FOR}{performs random access, large record, map i/o 
	(double buffered, asynchronous i/o)  It calls {\tt ZMI2}
	to perform the actual data transfer.}

\zitem{ZMKTMP.C}{makes a unique temporary file name.}

\zitem{ZMOUN2.C}{performs software mount/dismount of tapes 
	(lower-level routine called only by {\tt ZMOUNT}).  As in
	the case of tape manipulation, the way tapes are
	mounted varies from UNIX to UNIX.  Sometimes they
	are devices that are always on-line (moun\-ted)
	and in other systems, a special mount request or
	device assignment must be made.  The routine {\tt ZCRLOG}
	can be used to set the {\tt MT0x} environment variables
	to the desired tape device alias (\eg, {\tt /dev/rmt12}).}

\zitem{ZMOUNT.FOR}{lower-level routine of {\tt ZTAPE} that in turn calls
	{\tt ZMOUN2} to perform software mounting of tapes.}

\zitem{ZMSGCL.FOR}{special version of {\tt ZCLOSE} for message files to
	avoid recursion.}

\zitem{ZMSGDK.FOR}{special version of {\tt ZFIO} for message files to
	avoid recursion.}

\zitem{ZMSGER.FOR}{special version of {\tt ZERROR} for message files
	to avoid recursion.}

\zitem{ZMSGOP.FOR}{special version of {\tt ZOPEN} for message files to
	avoid recursion.}

\zitem{ZMSGWR.FOR}{a routine whose sole purpose is to take a
	{\tt CHARACTER} buffer containing the text of a message,
	copy it to the {\tt REAL} array {\tt MSGTXT} using for
	messages and calls {\tt MSGWRT} with a given message
	level code (simplifies issuing messages from
	routines written in C so that they get into the
	user's message file).}
 
\zitem{ZMSGXP.FOR}{special version of {\tt ZEXPN2} to avoid recursion.}

\zitem{ZMYVER.FOR}{determines the default version ({\tt OLD}, {\tt
	NEW} or {\tt TST})
	by extracting the values of the environment variables of the
	same names ({\tt OLD}, \etc) plus {\tt AIPS\_VERSION} and looking for
	a match.}

\zitem{ZOPEN.FOR}{upper-level open routine for map and non-map disk
	files, input terminal and line printer (to perform
	the actual opens, it calls the lower level routines
	{\tt ZDAOPN} for disk files, {\tt ZTTOPN} for the input
	terminal and {\tt ZLPOPN} for the line printer).}

\zitem{ZPATH.C}{converts a file name in the form {\tt LOGICAL:FILE}
	 to full path name.}

\zitem{ZPHFIL.FOR}{builds full path names of files given type, disk,
	version, etc. for both private and public systems.}

\zitem{ZPHOLV.FOR}{constructs physical file names containing a specific
	format version code; used by the program {\tt UPDAT}.}

\zitem{ZPRI2.C}{lower level routine called only by {\tt ZPRIO}.
	Changing your execution priority under UNIX works
	okay as long as you want to decrease it, however,
	going the other way requires superuser privilege,
	so {\tt ZPRI2} simply ignores these requests.}

\zitem{ZPRIO.FOR}{changes the calling program's execution priority
	between that of \AIPS\ ``batch'' and \AIPS\ ``interactive''.
	Actual priority changing is done in {\tt ZPRI2}.}

\zitem{ZPRMPT.C}{issues terminal prompts without new line.}

\zitem{ZPRPAS.C}{prompts the user with the string {\tt Password:}, then
	reads back an 8 character password without
	echoing what's typed.  It returns a 12 character,
	left justified string to its caller padded on the
	right with blanks.}

\zitem{ZPTBIT.C}{gets N bits from different elements of an array
	containing the bit pattern starting at a given
	array index and puts the bits in word (the opposite
	of {\tt ZGTBIT}).}

\zitem{ZPUTCH.C}{puts the least significant bits (one character worth)
	of a given word into the specified byte of another
	word (byte flip dependent; the opposite of {\tt ZGETCH}).}

\zitem{ZR32RL.FOR}{converts from 32 bit IEEE floating format to local
	single precision.}

\zitem{ZR64RL.FOR}{converts from 64 bit IEEE floating format data to
	local double precision (or corresponding 64 bit
	precision).}

%%%\zitem{ZR8P4.FOR}{general conversion routine for pseudo I*4 to/from
%%%	REAL*8 based on opcodes (word flip dependent).}

\zitem{ZRDMF.C}{converts data packed in DEC-Magtape format (DMF) to
	pairs of local integers (only used by the task
	{\tt FILLR} which can read archive tapes from the VLA
	Modcomp synchronous system and create UV datasets
	under \AIPS).}

\zitem{ZRENA2.C}{performs actual renaming of disk files (lower-level
	routine called only by {\tt ZRENAM}).}

\zitem{ZRENAM.FOR}{renames disk files (calls {\tt ZRENA2} to perform actual
	rename).}

\zitem{ZRHPRL.FOR}{converts from 32 bit Hewlett-Packard floating format
	to local single precision.}

\zitem{ZRLR32.FOR}{converts from local single precision to 32 bit IEEE
	floating format.}

\zitem{ZRLR64.FOR}{converts from local double precision (or corresponding
	64 bit precision) to 64 bit IEEE floating format.}

\zitem{ZRM2RL.C}{converts Modcomp single precision floating point data
	into local single precision floating point.  Only
	called by the tasks {\tt FILLM} and {\tt FILLR} which can read
	archive tapes from the VLA Modcomp synchronous
	system and create UV datasets under AIPS.}

\zitem{ZSETUP.FOR}{performs any system level operations which can be
	done only after {\tt VERNAM}, {\tt TSKNAM} and {\tt NPOPS} have been
	determined, such as setting \AIPS\ batch execution
	priority.}

\zitem{ZSHCMD.C}{executes a shell command string (used only by the
	tasks {\tt BAKLD} and {\tt BAKTP}).}

\zitem{ZSPACE.C}{reads \AIPS\ data area directories accumulating
	user based statistics regarding disk usage.  Only
	called by the system specific program {\tt SPACE} used
	for reporting disk hog information (only developed
	for NRAO Convex systems).}

\zitem{ZSTAI2.C}{queries user about tapes still mounted on exit from
	\AIPS\ (Convex implementation only).}

\zitem{ZSTAIP.FOR}{although it's intended to clean up at the end of
	an interactive AIPS session, we haven't found this
	necessary for Unix/\AIPS.  Therefore, this is a
	null routine (except for the {\tt\$APLCVEX} version which
	calls {\tt ZSTAI2}).}

\zitem{ZSTRTP.C}{sets the execution priority of the current process
	based on its {\tt POPS} number (only called by {\tt ZSTRTA}
	program).}

\zitem{ZTACT2.C}{determines if a given \AIPS\ task is currently running
	(lower-level routine called only by {\tt ZTACTQ}).  If
	provided a non-zero process id, otherwise it looks for
	a {\tt /tmp} lock file name as created by {\tt ZACTV9} and extracts
	the pid extension.  Task existence is determined via
	{\tt kill(0)}.}

\zitem{ZTACTQ.FOR}{determines if a given \AIPS\ task is currently running
	(calls {\tt ZTACT2} to perform actual determination).}

\zitem{ZTAP2.C}{performs actual tape manipulation (lower-level
	routine called only by {\tt ZTAPE}).  Tape manipulation
	is highly system dependent (see the man pages for {\tt
	mtio(4)}).  A good example to
	copy is the version of {\tt ZTAP2} found in {\tt\$APLUNIX}
	which is stubbed.  The information that you have to
	extract from your tape controller vendor is the
	status bits for end of file (tape mark) and beginning
	of tape (load point).  Actually, you can detect
	tape marks by issuing a read and testing for zero
	bytes transferred.  Detecting the load point can
	only be done via the status bits and must be done
	for the tape oriented verbs and tasks to function
	properly.  Note some tapes (Exabyte 2.5Gbyte on Sun for
	example) make it hard to detect the load point.}

\zitem{ZTAPE.FOR}{general tape manipulation (calls {\tt ZTAP2} to perform
	actual manipulation).}

\zitem{ZTAPIO.C}{opens, reads and closes a tape (called only by the
	program {\tt IMPFIT}).}

\zitem{ZTCLOS.FOR}{closes text files.}

\zitem{ZTFILL.FOR}{initializes the file table control block (i.e.,
	FTAB)}

\zitem{ZTIME.C}{returns local time.  Again, different from UNIX to
	to UNIX.  You will probably find that the
	stubbed generic version will work if you include
	{\tt <sys/time.h>} instead of {\tt <time.h>} or vice versa.}

\zitem{ZTKBUF.FOR}{puts lower-ordered byte of integer in a specified
	element of the graphics device output buffer.}

\zitem{ZTKCL2.C}{called only by {\tt ZTKCLS} to perform actual device
	reset and closing.}

\zitem{ZTKCLS.FOR}{close for graphics device provided for any special
	actions required.}

\zitem{ZTKFI2.C}{performs the actual i/o on a Tektronix-like device
	(lower level routine only called by {\tt ZFIO}).}
 
\zitem{ZTKILL.C}{given the name or pid of a task, kills it with prejudice.
	If fed a non-zero pid (process id), it kills that
	process, otherwise it looks for a {\tt /tmp} lock
	file name as created by {\tt ZACTV9}, extracts the pid
	extension, and if active, kills the process.}

\zitem{ZTKOP2.C}{performs actual open of a Tektronix-like device
	(lower level routine only called by {\tt ZTKOPN}).}

\zitem{ZTKOPN.FOR}{open for graphics device provided for any special
	actions required.}

\zitem{ZTOPE2.FOR}{performs actual open of text file (only called
	by {\tt ZTOPEN}).}

\zitem{ZTOPEN.FOR}{opens text files (calls {\tt ZTOPE2} to perform the
	actual text file open).}

\zitem{ZTPCL2.C}{performs the actual closing of a tape drive (lower
	level routine only called by {\tt ZTPCLS}).}

\zitem{ZTPCLD.FOR}{closes a sequential disk file ``device'' used as a
	pseudo-tape drive (lower level routine only called
	by {\tt ZTPCLS}).}

\zitem{ZTPCLS.FOR}{closes the specified tape drive as well
	as its disk control file removing any exclusive use
	state and clear the corresponding FTAB entries
	(calls {\tt ZTPCL2} to actually closes the tape drive,
	{\tt ZDACLS} to actually close the disk control file, and
	{\tt ZTPCLD} to actually close a sequential type disk
	file being used as a pseudo-tape).}

\zitem{ZTPMI2.C}{performs actual tape i/o (lower-level routine called
	only by {\tt ZTPMIO}).}

\zitem{ZTPMID.FOR}{low level sequential access, large record, double
	buffered pseudo-tape disk I/O.  This is for {\tt TAPIO}
	type operations only: \ie, {\tt LRECL=2880}, {\tt FTAB(FIND+5)}
	and {\tt FTAB(FIND+6)} = Integer*4 logical record number.}

\zitem{ZTPMIO.FOR}{low level sequential access, large record, double
	buffered tape device I/O (all tape I/O is done
	through the routine {\tt TAPIO} these days; calls {\tt ZTPMI2}
	or {\tt ZTPMID} to perform any actual I/O).}

\zitem{ZTPOP2.C}{performs the actual opening of a tape drive for
	double buffered, asynchronous I/O (lower
	level routine only called by {\tt ZTPOPN}).}

\zitem{ZTPOPD.FOR}{opens logical, sequential (pseudo-tape) disk files.
	Sequential disk files are done with random access
	Fortran files (exclusive use and wait to open are
	assumed; lower level routine only called by
	{\tt ZTPOPN}).}

\zitem{ZTPOPN.FOR}{opens a tape drive (as well as the corresponding
	disk control file) for sequential, double
	buffered, asynchronous I/O or opens a pseudo-tape
	sequential disk file (calls {\tt ZTPOP2} or {\tt ZTPOPD} to
	perform the actual open).}

\zitem{ZTPWA2.C}{performs any actual wait servicing for asynchronous
	tape I/O operations and returns the completion status
	and 8-bit byte count (lower level routine only
	called by {\tt ZTPWAT}).}

\zitem{ZTPWAD.FOR}{waits until an I/O operation is complete for
	sequential pseudo-tape disk files and returns its
	status (lower level routine only called by {\tt ZTPWAT}).}

\zitem{ZTPWAT.FOR}{waits for an asynchronous tape or pseudo-tape I/O
	operation to complete (calls {\tt ZTPWA2} or {\tt ZTPWAD} to
	perform any actual wait servicing and to obtain
	the I/O completion status and transfer count).}

\zitem{ZTQSP2.C}{issues appropriate {\tt ps} command to display either
	information on \AIPS\ login processes or all
	processes on the system (only called by {\tt ZTQSPY}).}

\zitem{ZTQSPY.FOR}{displays information on either \AIPS\ login processes
	or all processes on the system (calls {\tt ZTQSP2} to
	actually display the process information).}

\zitem{ZTREAD.FOR}{reads text files.}

\zitem{ZTRLOG.C}{translates a logical (gets the value of an
	environment variable).}

\zitem{ZTTBUF.FOR}{reads terminal input with no prompt or wait
	(simulates TV trackball).}

\zitem{ZTTCLS.FOR}{closes a terminal (actually a null op in the Unix
	implementation).}

\zitem{ZTTOP2.C}{performs the actual reassignment of Unit 6 to a
	dedicated message terminal (only called by {\tt ZTTOPN}).}

\zitem{ZTTOPN.FOR}{re-opens a terminal read/write (calls {\tt ZTTOP2} to
	reassign Unit 6 to a dedicated message terminal,
	if necessary).}

\zitem{ZTTYIO.FOR}{performs all terminal I/O (uses {\tt TTYCAR} to
	determine whether carriage control should be
	used).}

\zitem{ZTXIO.FOR}{read/write a line from/to a text file.}

\zitem{ZTXMA2.C}{reads a directory and finds all files which match a
	given file specification (lower level routine only
	called by {\tt ZTXMAT}).}

\zitem{ZTXMAT.FOR}{builds list of files in a specified directory that
	match a given file specification (e.g., {\tt UV*.HLP}).}

\zitem{ZTXOP2.FOR}{translates a logical to form the full path name of a
	text file and opens it (only called by {\tt ZTXOPN}).}

\zitem{ZTXOPN.FOR}{opens a text file for reading or writing (calls
	{\tt ZTXOP2} to perform the actual open).}

\zitem{ZUVPAK.FOR}{Pack visibility data, 1 correlator per real with
	magic value blank.}

\zitem{ZUVXPN.FOR}{expands packed visibility data and adds weight.}

\zitem{ZV20C2.FOR}{close Comtal Vision 1/20 TV device.}

\zitem{ZV20CL.FOR}{close a Comtal Vision 1/20 TV device.}

\zitem{ZV20MC.FOR}{issue a master clear to the 1/20 TV (for Comtal
	this is a No-Op).}

\zitem{ZV20O2.FOR}{opens Comtal Vision 1/20 TV device}

\zitem{ZV20OP.FOR}{open Comtal Vision 1/20 TV device}

\zitem{ZV20X2.FOR}{does I/O to Comtal Vision 1/20 TV device}

\zitem{ZV20XF.FOR}{read/write data to Comtal Vision 1/20 TV device}

\zitem{ZVLBIN.FOR}{performs the equivalence necessary for NRAO/SAO
	{\tt DECODE} format VLBI data.}

\zitem{ZVTVC2.FOR}{close virtual TV connection to remote, actual-TV
	computer.}

\zitem{ZVTVC3.FOR}{close connection in real-TV computer to client,
	virtual-TV computer.}

\zitem{ZVTVCL.FOR}{close connection in client (virtual-TV) to server
	(remote, real-TV).}

\zitem{ZVTVGC.FOR}{close \& reopen connection in server (real-TV) to
	client (virtual-TV).}

\zitem{ZVTVO2.FOR}{open connection in client (virtual-TV) to server
	(remote, real-TV).}

\zitem{ZVTVO3.FOR}{open connection in server (real-TV) to client
	(virtual-TV).}

\zitem{ZVTVOP.FOR}{opens connection from client (virtual-TV) to server
	(real-TV).}

\zitem{ZVTVRC.FOR}{closes channel in server (real-TV) to client
	(virtual-TV).}

\zitem{ZVTVRO.FOR}{open socket in server (real-TV) to any client
	(virtual-TV).}

\zitem{ZVTVRX.FOR}{does IO for server (real TV) to client (Virtual-TV)
	including close/reopen.}

\zitem{ZVTVX2.FOR}{writes/reads to/from server for the client (virtual
	TV) machine.}

\zitem{ZVTVX3.FOR}{reads/writes from/to client (virtual TV) for the
	server (real TV).}

\zitem{ZVTVXF.FOR}{sends data from the client (virtual TV) to server
	(real TV).}

\zitem{ZWAI2.C}{returns the error status of a an i/o operation not
	waited for by {\tt ZMI2} (lower-level routine called only
	by {\tt ZWAIT}).}

\zitem{ZWAIT.FOR}{waits until an i/o operation is complete (calls
	{\tt ZWAI2} to perform any actual wait servicing).}

\zitem{ZWHOMI.FOR}{gets POPS number {\tt n} of {\tt AIPSn} when it starts up
	(also where process shell variable values should be
	checked for such things as reserved terminals, TV
	and graphics display device assignments/priorities,
	etc.; see VMS version as an example of a full
	blown implementation).}

\zitem{ZX8XL.FOR}{converts a FITS table bit array to an \AIPS\ bit
	array.}

\zitem{ZXLX8.FOR}{converts an \AIPS\ table bit array to a FITS bit
	array.}

\vfill\eject %%% yea, it's done!
