From: Simon Bosse <bosse () python ! konbib ! nl>
To: tru64-unix-managers
Subject: SUMMARY - DCL to perl conversion
Date: Wed, 08 Apr 1998 07:12:40 +0000 [thread overview]
Message-ID: <96078705511402.tru64-unix-managers.marc@archive.invalid> (raw)
Thanks to:
H. Blakely Williford
Charles Bailey
Peter Prymmer
J.James(Jim)Belonis II
It seems that there is no ready to use script, but some of the answers
contained usefull beginnings.
By studying the scripts I came to the conclusion that it is probably
easier to rewrite them than to convert them.
Digital offers also a page with hints and tips:
http://www.unix.digital.com/products/interop/vms_unix/html/index.htm
(chapter 3).
Here's the separate answers:
=========================================================================
> we are converting from a vax/vms system to a DU system. Does anyone know
> of scripts to convert DCL programs/scripts to perl scripts (or shell
> scripts).
>
Seems like there was (at one time) somthing called "Sector 7".
--
H. Blakely Williford | Men never do evil so completely &
cheerfully
Systems Programer/Administrator | as when they do it with religious
conviction.
The Fuller Brush Company | - Blaise
Pascal
=========================================================================
Jarkko Hietaniemi <jhi@iki.fi> wrote:
>
> I am aware of the fact that you may not necessarily empathize with
> Simon's task :-) but if you know of any such attempt...
Well, yes, it is in the wrong directon . . . :-)
I don't know of any working DCL-to-perl converters, though the idea's been
discussed a few times. Most of the conversion would be pretty straightforward,
but emulating some of DCL's parsing behavior might be tricky. Jerome Lauret
did make a stab at Perl equivalents for some of the DCL lexicals; I can't
recall where it lives just now, but I think there's reference to it in the
VMSPerl list archives.
If you have specific questions, feel free to give a holler.
Regards,
Charles Bailey bailey@newman.upenn.edu
==============================================================================
Jerome Lauret's Lexical.pm is at:
http://nucwww.chem.sunysb.edu/public/vms/lexical.html
!If you have specific questions, feel free to give a holler.
The general idea involves substitutions such as:
s/^(\s*)\$/$1/; # remove leading dollar signs from DCL
s/IF/if/i; # IF -> if (DCL is case insensitive)
s/THEN/{/i; # begin perl block (DCL is case insensitive)
s/ENDIF/}/i; # end perl block (DCL is case insensitive)
s/CALL|GOSUB/&/i;
s/\@/system(\@/i; # sort of
adding the requisite perl $ and/or @ signs for variables back in is a
bit trickier. Another problem that crops up is DCL's case
insensitivity regarding variable names - hence you may wish to pass
through a script a few times to regularize the case of certain
/\b\w\b/ words. (I usually wind up doing some of the above
under perl -pi -e then finishing the whole thing by hand :-).
Good luck.
Peter Prymmer
Peter Prymmer <pvhp@forte.com>
==============================================================================
No. But you might be interested in a perl script we have to convert
VMS mail folders to unix mail folders.
--
J.James(Jim)Belonis II, U of Washington Physics Computer Cost Center Manager
belonis@phys.washington.edu Internet University of Washington Physics Dept.
http://www.phys.washington.edu/~belonis r. B234 Physics Astronomy Building
1pm to midnite 7 days (206) 685-8695 Box 351560 Seattle, WA 98195-1560
__________________________________________________________________
| ____________ |
| Redactie InfoServices /_/_/_/_/_/_/ |
| SURFnet bv / Koninklijke Bibliotheek /_/ ____ _/ |
| E-mail: redactie@is.konbib.nl /_/ / . / . |
| Tel. : *31 70 3140615 /_/ /___/__\ |
| Fax. : *31 70 3140501 /_/_ / / |
| The NETHERLANDS /_/_/ . / . |
| |
| URL : http://www.surfnet.nl/ |
| URL : ftp://ftp.surfnet.nl/ |
|________________________________________________________________|
reply other threads:[~1998-04-08 7:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox