VMS/IRAF Installation and Site Manager's Guide

VMS/IRAF Installation and Site Manager's Guide

Appendix A. Private TMP and IMDIR Directories

If local system management policies require that private tmp and imdir directories be defined for each user, you can define these directories for each user as subdirectories of their SYS$LOGIN directory. One way to do this is define imdir to be the same as tmp, and modify the definition of IRAFTMP in the IRAFUSER.COM file as shown below.

$! ----------- add these lines to irafhlib:irafuser.com ----------
$! This block of DCL assigns the logical name IRAFTMP to a
$! subdirectory of the user's VMS login directory.  It is necessary
$! to escape the "$" and "[" because they are IRAF filename
$! metacharacters.  This block of code should replace the current
$! definition in irafuser.com of IRAFTMP:
$!
$!   define/job  IRAFTMP  TEMPDISK:[IRAFTMP]        ! scratch files
$!
$! We assume only one occurrence of "$" or "[".
$!
$  tmpdir = f$logical ("SYS$LOGIN")
$  tmpdir = f$extract (0, f$locate("]",tmpdir), tmpdir) + ".IRAFTMP]"
$  define/job vmstmp 'tmpdir'
$  off = f$locate ("$", tmpdir)
$  tend = f$length (tmpdir)
$  if (off .ne. tend) then -
     tmpdir = f$extract (0, off, tmpdir) + -
       "\$" + f$extract (off+1, tend, tmpdir)
$  off = f$locate ("[", tmpdir)
$  if (off .ne. tend+1) then -
     tmpdir = f$extract (0, off, tmpdir) + -
       "\[" + f$extract (off+1, tend, tmpdir)
$  define/job iraftmp "''tmpdir'"

In irafhlib:login.cl, replace U_IMDIR with "tmp$".

In irafhlib:mkiraf.com, replace the block of statements beginning "imdir_file :=" with the following:
$  if (f$search ("sys$login:iraftmp.dir") .eqs. "") then -
	create/directory vmstmp