.ENABLE SUBSTITUTION
.ENABLE GLOBAL
.ENABLE QUIET
.;
	.SETN status 1
	.SETS stmon p1
	.SETS styr p2
	.SETS curmon p3
	.SETS curyr p4
	.SETS loc "DU3:[1,6]"
	.SETS deffil "TMPLOG.ERR"
	.SETS mnlst "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
	.TEST mnlst
	.SETN lenlst <strlen>
	.TEST mnlst stmon
	.IF <strlen> <= 0 .GOTO Err4
	.SETN curloc <strlen>
	.SETD curloc
	.SETN i 1
	.SETD i
.;
.; Convert STYR to integer.
.;
	.SETS tmp1 styr[1:1]
	.SETS tmp2 styr[2:2]
	.SETD valyr
	.SETN valyr 'tmp1%V'-48.
	.SETN valyr (valyr*10.)+'tmp2%V'-48.
.Loop1:
	.TESTFILE 'loc''stmon''styr'LOG.ERR
	.IF <filerr> <> 1 .GOTO Inci
		.SETS pipswt "/AP"
		.TESTFILE 'deffil'
		.IF <filerr> <> 1 .SETS pipswt "/NV"
		PIP 'deffil''pipswt'='loc''stmon''styr'LOG.ERR
.Inci:
		.IF stmon = curmon .IF styr = curyr .GOTO Xitlp1
			.SETN curloc curloc+3
			.IF curloc < lenlst .GOTO SetIt
				.SETN curloc 1
				.INC valyr
				.IF valyr >= 100. .SETN valyr 0
				.SETS styr "'valyr%DZR2'"
.SetIt:
			.SETS stmon mnlst[curloc:*]
			.SETS stmon stmon[1:3]
			.GOTO Loop1
.Xitlp1:
	.TESTFILE 'deffil'
	.IF <filerr> <> 1 .GOTO Err2
.Xit:
	.EXIT status
.Err2:
	.SETN status 2
	.GOTO Xit
.Err4:
	.SETN status 4
	.GOTO Xit
