tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY - DCL to perl conversion
@ 1998-04-08  7:12 Simon Bosse
  0 siblings, 0 replies; only message in thread
From: Simon Bosse @ 1998-04-08  7:12 UTC (permalink / raw)
  To: tru64-unix-managers


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/                                |
 |________________________________________________________________|

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-04-08  7:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-08  7:12 SUMMARY - DCL to perl conversion Simon Bosse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox