From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  8-SEP-1989 09:04
To:	MRGATE::"ARISIA::EVERHART"
Subj:	RE: Re:  batch job...

Message-Id:  <8909081257.AA24745@crdgw1.ge.com>
Received: From CUNYVM.CUNY.EDU by CRVAX.SRI.COM with TCP; Fri,  8 SEP 89 05:28:47 PDT
Received: from NIHKLMB.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 7013; Fri, 08 Sep 89 08:29:29 EDT
Date: Fri, 8 Sep 89 08:28 EDT
From: Gerson H Cohen <GHC%NIHKLMB.BITNET@CUNYVM.CUNY.EDU>
Subject: RE: Re:  batch job...
To: INFO-VAX@KL.SRI.COM
X-Vms-To: INFO-VAX,GHC

> Yes, I also find it annoying that batch jobs always start out defaulted to
> one's login directory instead of the directory holding the procedure (one
> of the things that I still miss from my TOPS-20 days).  If you're running
> VMS V5.0 or better then you can do what I've done, by adding the following
> lines to your LOGIN.COM in such a way that they are executed during batch
> logins:
>
> $ COM_FILESPEC     = F$GETQUI("DISPLAY_FILE","FILE_SPECIFICATION",,"THIS_JOB")
> $ DEFAULT_DIRECTORY = F$PARSE(COM_FILESPEC,,,"DEVICE") + -
>       F$PARSE(COM_FILESPEC,,,"DIRECTORY")
> $ SET DEFAULT 'DEFAULT_DIRECTORY'

Wait - don't leave those of us still at 4.x out of the picture - just
replace the f$getqui with f$environment as below and we're also off and
running.  Thanks for the idea!!

$ com_filespec = f$environment("procedure")  ! This accomplishes the same
$ DEFAULT_DIRECTORY = F$PARSE(COM_FILESPEC,,,"DEVICE") + -
        F$PARSE(COM_FILESPEC,,,"DIRECTORY")
$ SET DEFAULT 'DEFAULT_DIRECTORY'

