Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!decvax!ucbvax!8004SLB@rsch.wisc.edu@mucsd.UUCP
From: 8004SLB@rsch.wisc.edu@mucsd.UUCP
Newsgroups: mod.computers.vax
Subject: Re: $ Set Day / {Primary|Secondary|Default}
Message-ID: <8612171832.AA12614@csd1.milw.wisc.edu>
Date: Wed, 17-Dec-86 13:26:57 EST
Article-I.D.: csd1.8612171832.AA12614
Posted: Wed Dec 17 13:26:57 1986
Date-Received: Thu, 18-Dec-86 22:08:47 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 65
Approved: info-vax@sri-kl.arpa

> Could anyone tell me of a routine which will enable me to find out whether the
> current DAY has been defined as Primary, Secondary or Default, via the DCL
> command $ Set Day ?

It's not that hard to do. Here's a sample macro program that displays the
type of day. It would be a small matter to convert it into a callable routine.
Hope this helps.
-------------------------------------------------------------------------
	.title	whatday - display primary/secondary/default day
;
; Written by:
; Sanford L. Berger
; Marquette University
; Computer Services Division
; Technical Services
; Milwaukee, WI
;
	.psect	data,long,noexe,wrt
primary:.ascid	/Today is a primary day./
second:	.ascid	/Today is a secondary day./
default:.ascid	/Today is a default day./
	.psect 	inst,long,nowrt,exe
	.entry	start,^m<>
	bbc	#exe$v_explicits,exe$gl_flags,def
	bbc	#exe$v_explicitp,exe$gl_flags,prim
	pushaq	second
	calls	#1,g^lib$put_output
	$exit_s
def:	pushaq	default
	calls	#1,g^lib$put_output
	$exit_s
prim:	pushaq	primary
	calls	#1,g^lib$put_output
	$exit_s
	.end	start
-------------------------------------------------------------------------

One problem you should be aware of though. There is currently a bug in VMS,
including 4.4, (haven't checked 4.5 yet), which I reported to DEC some time
ago. The SET DAY/DEFAULT command clears the wrong bit in the EXE$GL_FLAGS
longword. I wrote the following program which does what that command should
do. This program requires CMKRNL privilege. Here it is:

-------------------------------------------------------------------------
	.psect	inst,long,nowrt,exe
	.entry	start,^m<>
	$cmkrnl_s routin=fixday
	ret
	.entry	fixday,^m<>
	moval	handler,(fp)
	bbcc	#exe$v_explicits,exe$gl_flags,10$
10$:	ret
	.entry	handler,^m<>
	$exit_s
	.end	start

-------------------------------------------------------------------------

--Sandy Berger
  Marquette University
  Computer Services Division
  Technical Services
  Milwaukee, WI

UUCP:  ...!{seismo|harvard}!uwvax!uwmacc!uwmcsd1!marque!mucsd!8004slb