- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Calculate weeknumber with a DCL-script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2006 09:12 PM
01-09-2006 09:12 PM
Maybe it's possibel to use daynumber in the year together with a modulo function?
Thanks
Geir
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2006 09:19 PM
01-09-2006 09:19 PM
Re: Calculate weeknumber with a DCL-script
use the lexical f$cvtime to get the weeknumber.
Rgds
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2006 09:33 PM
01-09-2006 09:33 PM
Re: Calculate weeknumber with a DCL-script
I have problem to find suitable arguments to calculate weeknumber. Myabe I have som trouble to see the correct argument??
geir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2006 09:34 PM
01-09-2006 09:34 PM
Re: Calculate weeknumber with a DCL-script
WEEKNO = 1+ f$cvtime(,"ABSOLUTE","DAYOFYEAR")/7
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2006 10:49 PM
01-09-2006 10:49 PM
SolutionGot this (=attachment) a while back from the net (don't know where exactly).
According to the comments, the algorithm is by Rick McCarty.
It seems to do what you want.
Have fun,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2006 12:02 PM
01-10-2006 12:02 PM
Re: Calculate weeknumber with a DCL-script
Other definitions of week 1 would be the week that contains Jan 1; the week that contains the first Monday of the year; or the first week that contains a majority of days in this year.
So probably best that you define in words what your definition of the first week of the year is, then doubtless someone will come up with a bit of DCL for you!
Have fun,
PJ
Peejay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If it can't be done with a VT220, who needs it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2006 08:42 PM
01-10-2006 08:42 PM
Re: Calculate weeknumber with a DCL-script
see the attachment by QKCL for the official ISO definition.
The week (monday though sunday) containing the first THURSDAY of the year is defined to be Week 01.
And if you wonder how they got to THAT definition: they probably were utterly drunk and at the same time using some illegal hallicinogens at the same time!
hth.
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 12:04 AM
01-11-2006 12:04 AM
Re: Calculate weeknumber with a DCL-script
(Although I admit it is true for western culture only, where Sat./Sunday is the weekend).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 12:13 AM
01-11-2006 12:13 AM
Re: Calculate weeknumber with a DCL-script
Thanks to all. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 01:23 AM
01-11-2006 01:23 AM
Re: Calculate weeknumber with a DCL-script
the thursday rule is equivalent to "week containing at least 4 days" or "majority of days in the week".
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 01:25 AM
01-11-2006 01:25 AM
Re: Calculate weeknumber with a DCL-script
"week containing the first thursday" is equivalent to "first week containing at least 4 days" or "first week with a majority of days in the week".
cu,
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 01:35 AM
01-11-2006 01:35 AM
Re: Calculate weeknumber with a DCL-script
ok, that explains it a bit better than the official text!
Tnx.
Proost.
Have one on me.
jpe