There has always been a difference between the display format of date/time and the DCL format for delta time.
Display: ddd hh:mm:ss.cc
DCL: ddd-hh:mm:ss.cc
In the past, the common routine used by DCL and most time-related qualifiers for commands would attempt to parse either form (the display form requiring quotes) and wasn't always successful when handed a display format. Starting in V9.2-3, we're enforcing the DCL format. While this may cause some commands which previously worked (accidentally) to fail, this change forces consistency onto delta time specification.
To demonstrate the problem, try the following two commands:
$ WRITE SYS$OUTPUT F$CVTIME("0 1:00", "DELTA")
$ WRITE SYS$OUTPUT F$CVTIME("5 1:00", "DELTA")
F$CVTIME in V9.2-3 has an added keyword to return the DCL delta format: "DELTADCL". The original "DELTA" keyword returns the display format as it has always done.
Might be worthwhile to check your command procedures before upgrading to V9.2-3.
Enforced DCL Delta Time Format in V9.2-3
-
Topic author - VSI Expert
- Valued Contributor
- Posts: 69
- Joined: Tue May 09, 2023 7:57 am
- Reputation: 1
- Status: Offline
Enforced DCL Delta Time Format in V9.2-3
Executive Vice President of InfoServer Engineering at VSI.
Re: Enforced DCL Delta Time Format in V9.2-3
Code: Select all
Along a vaguely related vein, ...
> There has always been a difference between the display format of
> date/time and the DCL format for delta time.
Might one say the same for absolute time?
its $ dire /date = created jj%%
Directory ITS$DKA0:[SMS]
jj11.dat;1 10-NOV-2024 23:17:45.58
jj22.dat;1 10-NOV-2024 23:17:58.98
jj33.dat;1 10-NOV-2024 23:18:09.06
its $ dire /since = 10-NOV-2024:23:17:58.98 jj%%
Directory ITS$DKA0:[SMS]
jj22.dat;1 jj33.dat;1
Total of 2 files.
But:
its $ write sys$output f$file_attributes( "jj22.dat", "CDT")
10-NOV-2024 23:17:58.98
So:
its $ dire /since = 'f$file_attributes( "jj22.dat", "CDT")' jj%%
%DCL-W-PARMDEL, invalid parameter delimiter - check use of special characters
\:58\
I can imagine a universe where f$file_attributes() had item codes
like, say, BDTDCL, CDTDCL, EDTDCL, and RDTDCL, which would punctuate the
result date/time string differently.
Or am I missing some existing technique which would be equally
convenient to use in my DCL "make" substitute?
-
Topic author - VSI Expert
- Valued Contributor
- Posts: 69
- Joined: Tue May 09, 2023 7:57 am
- Reputation: 1
- Status: Offline
Re: Enforced DCL Delta Time Format in V9.2-3
dire /since = 'f$file_attributes( "jj22.dat", "CDT")' jj%%Or am I missing some existing technique which would be equally
convenient to use in my DCL "make" substitute?
becomes
dire /since = " ' 'f$file_attributes( "jj22.dat", "CDT")' " jj%%
(I inserted spaces to make it visually clearer, but the sequence is double quote, single, single, f$file..., single, double)
Parameters including spaces have always required double quotes for DCL. The single quote is the symbol substitution character and doubling it within a quoted string allows it to work even within the "protection" of the quoted string. And, while DCL is rather loose about terminating quotes in some unqoted cases, within a quoted string, you must start the substitution with 2 single quotes and terminate with one.
x = "don't" does what you expect.
write sys$output " ''x' do that!" prints " don't do that!"
--D
Executive Vice President of InfoServer Engineering at VSI.
-
- Member
- Posts: 8
- Joined: Sun Nov 10, 2024 4:15 pm
- Reputation: 0
- Status: Offline
Re: Enforced DCL Delta Time Format in V9.2-3
Hopefully you are not planning to enforce use of the documented "delta time" with the WAIT command.
It is useful to be able to wait until an absolute time, and it has worked this way for as long as I can remember.
Example where the show time commands are in the type-ahead buffer.
HP$ wait 'f$cvtime("17:07:15","absolute")'
HP$ show time
12-NOV-2024 17:07:15
HP$ wait 'f$cvtime("17:08","absolute")
HP$ show time
12-NOV-2024 17:08:00
HP$
It is useful to be able to wait until an absolute time, and it has worked this way for as long as I can remember.
Example where the show time commands are in the type-ahead buffer.
HP$ wait 'f$cvtime("17:07:15","absolute")'
HP$ show time
12-NOV-2024 17:07:15
HP$ wait 'f$cvtime("17:08","absolute")
HP$ show time
12-NOV-2024 17:08:00
HP$
-
Topic author - VSI Expert
- Valued Contributor
- Posts: 69
- Joined: Tue May 09, 2023 7:57 am
- Reputation: 1
- Status: Offline
Re: Enforced DCL Delta Time Format in V9.2-3
Never knew that worked.wait 'f$cvtime("17:08","absolute")
I just checked the source for DCL$WAIT and it simply calls $BINTIM for the "next token" and apparently it covers the whole absolute time.
I've also tested it on V9.2-3 and your example still works.
Executive Vice President of InfoServer Engineering at VSI.