- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to optimize subroutine placement in DCL
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
03-18-2008 05:02 AM
03-18-2008 05:02 AM
Re: How to optimize subroutine placement in DCL
For my part PERL and SDA is on the FORTRAN list : not always to be known be a SM.
And the constant is within the loop because many loops are alike and the code is the same for any loop. And found is initiialized in real life.
And you can even nest the lexicals and remove the spaces. But I prefer it this way for readability.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2008 06:02 AM
03-18-2008 06:02 AM
Re: How to optimize subroutine placement in DCL
If I were to use DCL to code something like the more extensive attachment provided, then I would code it rather differently.
I'd highlight the search targets early on, in the expected order.
Two examples in slight different styles below. Specifically first one will we a very tight loop through the file.
I used numeric labels, but it is easy enough to make them text using something like:
$labels = "|main|proc|bal|non|bus|paged|lock"
:
$label = f$elem(target,"|",labels)
$goto do_23_'label'
fwiw,
Hein.
$ targets = -
"1234567890123| Main Memory| Process Ent| Balance Set|"+-
" Nonpaged Dy| Bus Address| Paged Dynam| Lock Manage|"
$ not_seen = "1 2 3 4 5 6 7 "
$ lt=f$len(targets)
$ close/nolog x
$ open/read x tmp.tmp
$r23:
$ read/end=e23 x x_rcd
$ target = f$loc(f$extr(0,13,x_rcd), targets)
$ if target.eq.lt then goto r23
$ target = target/14
$ not_seen = not_seen - "''target' "
$ goto d_23_'target
$
$d_23_0:
$d_23_1:
$d_23_2:
$d_23_3:
$d_23_4:
$d_23_5:
$d_23_6:
$d_23_7:
$d_23_8:
$d_23_9:
$write sys$output x_rcd
$goto r23
$e23:
$if not_seen.nes."" then write sys$output "did not find: ", -
not_seen, f$elem(f$elem(0," ",not_seen),"|",targets)
$exit
or...
$ targets="|Process Entry Slots|Balance Set Slots|"+-
"Paged Dynamic Memory|Nonpaged Dynamic Memory|"+-
"Bus Addressable Memory|Lock Manager Dynamic Memory|"+-
"Lock Manager Dyn Memory|Main Memory"
$ open/read x tmp.tmp
$r23:
$ read/end=e23 x x_rcd
$ li=f$len(x_rcd)
$ target = 0
$i23:
$ target = target + 1
$ it = f$element(target,"|",targets)
$ if it.eqs."|" then goto r23
$ pos=f$loc(it,x_rcd)
$ if pos .eq. li then goto i23
$ targets = targets - "|''it'"
$ goto d_23_'target
$
$d_23_0:
$d_23_1:
$d_23_2:
$d_23_3:
$d_23_4:
$d_23_5:
$d_23_6:
$d_23_7:
$d_23_8:
$d_23_9:
$write sys$output x_rcd
$goto r23
$e23:
$if targets.nes."" then write sys$output "did not find: ", targets
$exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2008 06:45 AM
03-18-2008 06:45 AM
Re: How to optimize subroutine placement in DCL
Fwiw
My code is dcl_check compliant. So, no "goto depending on" because can not be checked by dcl_check. Hated it in Cobol and hate it in DCL.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2008 12:35 PM
03-18-2008 12:35 PM
Re: How to optimize subroutine placement in DCL
http://www.youtube.com/watch?v=0PY7N4iRgLQ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2008 11:27 PM
03-18-2008 11:27 PM
Re: How to optimize subroutine placement in DCL
My memory is failing (again, but it has been 11 years I used COBOL). It was not go to depending on but alter.
http://home.swbell.net/mck9/cobol/style/alter.html
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2008 12:03 AM
03-19-2008 12:03 AM
Re: How to optimize subroutine placement in DCL
About This Video Groucho Marx performing "Whatever It Is, I'm Against It!" and "I Always Get My Man" from the Paramount Picture "Horsefeathers" (1932).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2008 03:23 AM
03-19-2008 03:23 AM
Re: How to optimize subroutine placement in DCL
That's too funny! How appropriate. QED.
$value =
$GOTO
IMHO that's a well, perfectly legal, DCL intentially provided, controlled, alternative to a sorely missing CASE or GOTO DEPENDING ON statement.
$IF p1.EQS."" THEN p1 = "start"
$GOTO 'p1
Now that's a different kettle of fish.
(I use it all the time though :-)
It seems time to close this topic.
There seems no no point in seriously worrying about 'stuff' (performance here) if there is no willingness to change anything.
met vriendelijke groetjes,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2008 04:56 AM
03-19-2008 04:56 AM
Re: How to optimize subroutine placement in DCL
Ok, I'll close it.
FYI : I tried shortening commands. DCL_CHECK didn't support it. So, I can only shorten variables or use dcl_diet and @ a diet version.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2008 04:57 AM
03-19-2008 04:57 AM
Re: How to optimize subroutine placement in DCL
- « Previous
-
- 1
- 2
- Next »