- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Vms DCL Code
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
Discussions
Discussions
Forums
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
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
тАО07-13-2008 06:30 AM
тАО07-13-2008 06:30 AM
Ex. Enter # of Days >
How can I limit the number of days requested to a maximum value of 31 or 365 or whatever.
What would the DCL code be for this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 08:43 AM
тАО07-13-2008 08:43 AM
Re: Vms DCL Code
Command line argument? From terminal?
Here is an example of a value checking read loop:
$MIN_DAYS = 31
$MAX_DAYS = 365
$read_days_loop:
$READ/END=done/PROMPT="Enter # of Days > " SYS$COMMAND days
$IF F$TYPE(days).NES."INTEGER" -
.OR. days.LT.MIN_DAYS -
.OR. days.GT.MAX_DAYS
$THEN
$ WRITE SYS$OUTPUT "Please enter a NUMBER from ''MIN_DAYS' to ''MAX_DAYS'"
$ GOTO read_days_loop
$ENDIF
$
$ WRITE SYS$OUTPUT "Processing ''days' days."
$ GOTO read_days_loop
$
$done:
$ WRITE SYS$OUTPUT "Bye now."
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 12:43 PM
тАО07-13-2008 12:43 PM
Re: Vms DCL Code
You might consider the book, "Writing Real Programs in DCL." http://www.alibris.com/search/books/qwork/8739673/used/Writing%20Real%20Programs%20in%20DCL
Although out of print, it can still be found.
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 12:56 PM
тАО07-13-2008 12:56 PM
Re: Vms DCL Code
There are two questions here.
First, the syntax of an IF statement in DCL. This is covered in the "DCL Dictionary", in the standard documentation library, available on the HP OpenVMS www site at http://www.hp.com/go/openvms , and is documented in the online HELP text.
The short answer to that question is something along the lines of:
$ IF (days .ge. 500) then $ xxx
There are several variants that may be appropriate, depending on what is written in the command file already.
There is a second question, namely, WHY is the command file failing? Also, "At what point does the command file fail?". This, IMHO, is a more serious problem. Generally, I recommend careful investigation of this type of question, as it often uncovers far more serious problems.
I hope that the above is helpful.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 09:05 PM
тАО07-13-2008 09:05 PM
Re: Vms DCL Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 11:24 PM
тАО07-13-2008 11:24 PM
Re: Vms DCL Code
After the line:
$ if f$type(date) .nes. "INTEGER" then goto detail
insert a line:
$ if date .gt.
...where
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2008 11:38 PM
тАО07-13-2008 11:38 PM
Re: Vms DCL Code
Maybe you could "set verify" your code and attach the output of the run ?
Jean-Francois
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 12:58 AM
тАО07-14-2008 12:58 AM
Re: Vms DCL Code
f$cvtime("-''date'-00",...
will display errors for values bigger than 9999 and this will look like it's looping on an error.
fwiw
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2008 07:10 AM
тАО07-14-2008 07:10 AM
Re: Vms DCL Code
After the line:
$ if f$type(date) .nes. "INTEGER" then goto detail
insert a line:
$ if date .gt.
...where
Yes, When I put in 31 days for the max and type in 32 it just hangs there? Shouldn't it just exit or prompt me to put in the right # of days again?