- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - OpenVMS
- >
- Case/switch statement in DCL
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- Report Inappropriate Content
11-20-2008 04:46 AM
11-20-2008 04:46 AM
Is there any equivalent statement call to case/switch and is there something like linux "shift"?
Best regards
Fredrik Eriksson
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-20-2008 05:19 AM
11-20-2008 05:19 AM
SolutionYes. This is a question that is actually in the backlog for my OpenVMS Consultant column on OpenVMS.org (see http://www.openvms.org ).
The way that a case/switch (aka FORTRAN computed GOTO) is handled is via use of symbol substitution, to wit:
$ X = 15
$ ...
$ IF (X .LT. 0) .OR. (X. GT. 20)
$ THEN
$ .... (Error Processing) ...
$ ENDIF
$!
$ GOTO TARGET_'X'
$!
$ TARGET_0:
$ ...
$ GOTO TARGET_COMMON:
$!
$ TARGET_1:
$ ...
$ TARGET_20:
$ ...
$ TARGET_COMMON:
The usual tricks that can be done with this class of construct (e.g., coalescing different cases) are straightforward.
I hope that the above is helpful.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-20-2008 05:22 AM
11-20-2008 05:22 AM
Re: Case/switch statement in DCL
case $1 in
case-trigger)
;;
shift
esac
Best regards
Fredrik Eriksson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-20-2008 05:33 AM
11-20-2008 05:33 AM
Re: Case/switch statement in DCL
With all due respect, there is no "linux case statement", it is a shell case statement.
There is a shell available on OpenVMS, is is available as part of the separate tools installation.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-20-2008 06:05 AM
11-20-2008 06:05 AM
Re: Case/switch statement in DCL
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP