From:	HENRY::IN%"uwmacc!uwmcsd1!marque!mucsd!8004SLB%RSCH.WISC.EDU%SRI-KL.ARPA%relay.cs.net@rca.com" 20-DEC-1986 01:47
To:	marque!uwmcsd1!uwmacc!uwvax!SRI-KL.ARPA!INFO-VAX@rsch.wisc.edu
Subj:	Re: $ Set Day / {Primary|Secondary|Default}

> 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

