Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

DCL script doubts

DCL script to shell scr
Occasional Visitor

DCL script doubts

hi ,
this is vinay i have doubt abt converting following instructions which r in DCl to unix equivalents can anybody help ?

set noverify
set verify

submit/que=sjmpsc$batch/after="tomorrow+19:00"/log=cer_mgr_log:sjmpsc_oracle_backups.log -
/noprint/notify/keep/restart cust_proc:sjmpsc_oracle_backups.com


please help me
Kris Clippeleyr
Honored Contributor

Re: DCL script doubts

Might I refer you to the book
"Unix for OpenVMS users" ?

Kris (aka Qkcl)

I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Honored Contributor

Re: DCL script doubts

set noverify -> sh +x
set verify -> sh -x

The lexicals functions do not exist in Unixland and it is a pity. So you can forget about f$parse, f$trnlnm (and the logical names do not exist too).

The Unix way is
some_command | grep some_text | cut ...
(cut is more or less a f$edit on a string)

Joseph Huber_1
Honored Contributor

Re: DCL script doubts

Recently -in a different forum- somebody even asked for a general translator DCL -> shell, really!
Even if the syntax can be "translated", the semantics of commands and functions simply have no equivalent in "unix" land.
There are some implementations of DCL as a shell or interpreter (VX/DCL from sector7.com for example), which might be the easier way to port DCL procedures.

f$trnlnm: there is no such thing as logical names in unices.
shell variables come near in some cases, (symbolic) links for files may replace some uses.
One always has to see each individual use of f$trnlnm to understand what is wanted: is it simply a call to see if a name or variable is defined ?
is it a call to extract individual items of a search list ?
is it a logical name translation to use and handle a file-specification defined in the logical ?
Each of the uses requires a different "unix" equivalent (if any).

f$parse: "unix" has no strict file-specification syntax like VMS, so it depends again on the individual f$parse call to find a "unix" equivalent:
parse to find the device a file is on ? there is no device as part of a "unix" filespec, only a "root" directory if it begins with "/".
parse with default or related specs to complete a file-specification ??
parse to extract the file-name only ? (hint: basename in "unix")
parse to extract the file type ? (there is no equivalent in "unix", only widespread conventions to use the rest after the last dot in a filespec as "type").
parse to remove the version number ? there is no such thing in "unix".

submit: there is no standard batch queuing facility in "unix": You have to explicitly see the target "unix" system to find out its batch facility, all have "at", some "batch" or "nqs".

Honored Contributor

Re: DCL script doubts

You're going to have to convert DCL to bash and to Unix native utilities and such, or to use hardware emulation or such and run OpenVMS on the Unix box.

Or you might look to use contract with one of the organizations that sell conversion and porting and compatibility tools.

If you've been contracted to provide this, then you're going to have to learn DCL and you're going to have to learn bash, and map the two. This isn't a small base of knowledge, either; there aren't all that many folks that are really good at both bash and DCL.

And there are no direct mappings for any of the cited commands, either.

Here are some related discussions:


Rick Retterer
Respected Contributor

Re: DCL script doubts

You may find some good information at this website...

- Rick Retterer

Honored Contributor

Re: DCL script doubts

On that link, I disagree with

Unix -> Ctrl Z suspends a program
VMS -> nothing

never heard of
$ set proc/suspend...


Re: DCL script doubts

"The Unix way is
"some_command | grep some_text | cut ...
"(cut is more or less a f$edit on a string)

Unless you are trying to do something very simple, you will probably find sequences like "do-something | grep | cut" to be, awkward if not painful.

I'd recommend learning something like Perl. There are a number of tutorial sites on the web, and quite a few beginning Perl books available. Personally, I used "Learning Perl", by Randal L. Schwartz, for about a year before needing to get deeper in Perl.

Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

Honored Contributor

Re: DCL script doubts

For some the older folks still around.

edit by Digital Press in the Vax Users Series

Title "UNIX for VMS Users" by Philip E. Bourne

I have copy on the shelf next me, It does a good job .. aahh quality ! where have you been

But to read this you have to quite knowledgeable in either Vms environment and/or Unix shell.

Maybe you can get still hold of a copy (DP ISBN 1-55558-034-3).

Enjoy life,

Smile I will feel the difference
Richard W Hunt
Valued Contributor

Re: DCL script doubts

As an aside to Labadie:

Of the three basic non-executing states that are not resource-related or paging-related, SUSPEND is the "deepest" sleep, the others being HIBERNATE (HIB state) and Event Flag wait (LEF or CEF state).

SET PROCESS process/SUSPEND puts the process in SUSP scheduler state. SET PROCESS process/RESUME returns it to COM state.
SET PROCESS process/SUSPEND was described (in my VMS Operations class) as a way to stop a runaway process from eating your CPU alive and yet let you change your mind if you later decided you wanted this process to run a little bit more.

It has been a while since I played with these, but the main difference among the various voluntary sleep states is (I believe) that a SUSPENDED process cannot RESUME itself from an internal AST event. A process that is suspended needs external help to wake up.

By contrast, a hibernating process can execute an AST that performs a WAKE system service call on itself. A process in a WAIT state can execute an AST that sets an event flag and again, release itself back to COM state.

Regarding the mapping between UNIX & VMS functions, since the O/S are inherently different due to their different origins and growth paths, you will have to expect that some things don't map well.

For instance, OpenVMS "context" (a description of what a process can "see" at a given moment) includes a wider variety of possible things to be seen than are visible in most UNIX environments. The differences in the way file-search paths work is also a big issue.

I would seriously consider that at some point, a redesign of the application or process for the new environment. A simple conversion is not going to work perfectly simply because the system "styles" don't map perfectly.
Sr. Systems Janitor
DCL script to shell scr
Occasional Visitor

Re: DCL script doubts

how to create job queue in unix ?
init/queue instruction creates job queue in DCL I need an equivqlent command in unix
Steven Schweda
Honored Contributor

Re: DCL script doubts

> how to create job queue in unix ?

"unix" is not a very useful description of an
OS. AIX, HP-UX, Solaris, Tru64, ... would be
more helpful.

man at

man -k queue

man queuedefs

For example:

VMS and UNIX(like) operating systems are
different. Exact translations from one to
the other are generally not possible. You
might do better if you try to learn more
about your particular UNIX(-like) operating
system(s), and quit trying to translate the
Honored Contributor

Re: DCL script doubts

cron, launchd/launchctl, /usr/local/etc/periodic/, GNU batch, Condor or, well, most anything that a Google search or a trip through available listings including http://en.wikipedia.org/wiki/Job_scheduler might show as available on your platform.

As for Unix questions...

HP-UX forum:

HP Linux forum:

When posting questions, do consider not asking for a VMS feature by name; you're porting, which means you're going to be ripping out most of the OpenVMS features, and you will be replacing them with platform-specific alternatives. The Unix folks won't know the features of OpenVMS like you or the folks here do, but they will know how to answer questions like "What are the recommended unix job scheduling software packages for [platform]", or similar.

Asking Unix questions in an OpenVMS forum serves to delay your port, and (unless you happen to hit a Unix user here in the forum) may not get you the best available or the most current answer(s) for your particular Unix platform.
DCL script to shell scr
Occasional Visitor

Re: DCL script doubts

thank you for the help.I am able to solve my most of the doubts.

$ name = f$getjpi(pid, "prcnam")
$ pgcnt = f$getjpi(pid, "ppgcnt")
$ wspeak = f$getjpi(pid, "wspeak")
$ astcur = f$getjpi(pid, "astcnt")
$ astmax = f$getjpi(pid, "astlm")
$ enqcur = f$getjpi(pid, "enqcnt")
$ enqmax = f$getjpi(pid, "enqlm")
$ pgcur = f$getjpi(pid, "pagfilcnt")
$ pgmax = f$getjpi(pid, "pgflquota")
$ filcur = f$getjpi(pid, "filcnt")
$ filmax = f$getjpi(pid, "fillm")
$ f$type(ctx)

please check the attached file also.
can anybody help me in understanding these functions and how to get same vvalues in unix/linux
Steven Schweda
Honored Contributor

Re: DCL script doubts

> [...] how to get same vvalues in unix/linux

> "unix" is not a very useful description of an
> OS. AIX, HP-UX, Solaris, Tru64, ... would be
> more helpful.

"unix/linux" is not much more helpful.

Uh, rewrite the "unix/linux" kernel? What
makes you think that these VMS parameters
have any analogues in "unix/linux"?

> please help me

You don't seem to be paying attention.
Honored Contributor

Re: DCL script doubts

The vmsbackup tool; a tool that can read (but not write) BACKUP saveset on Mac OS X, Unix and Linux boxes:

The bash analogs of DCL set noverify and set noon:

General list of DCL commands to bash commands:

There are no analogs to the logical name mechanisms and services including sys$trnlnm, DEFINE command, and the f$trnlnm lexical function, though there are alternatives. That DCL code will need to be replaced.

Filename handling and filename parsing is completely different between Unix and Linux and that of OpenVMS; that code will need to be entirely replaced.
DCL script to shell scr
Occasional Visitor

Re: DCL script doubts

i need to now what those functions actually return the values
Honored Contributor

Re: DCL script doubts

Please talk to your manager or (depending on your organization) your project leader about your requirements and questions here.

Your manager (or project leader) is best positioned to provide you with the organizational and technical guidance and resources that you are seeking here.

Certainly point your manager (or project leader) to these ITRC discussions, too.
Willem Grooters
Honored Contributor

Re: DCL script doubts

The VERY BASIC solution for your problems is EDUCATION.
You should have a fair understanding of the OS's you're dealing with. The more different these are, the more important this is - as you have experienced.
Without that knowlegde, you'll keep running into issues because you have no clue on what it means.

If you look around (on openvms.org, for instance) you'll find a lot of places to egt training and gain experience - free, if you like.
If you have access to a VMS system, use HELP on that system to find out.
Willem Grooters
OpenVMS Developer & System Manager
Honored Contributor

Re: DCL script doubts

I am aware of very little available material on this topic area; on porting OpenVMS software to Unix platforms, and for porting code from DCL to bash.

I've posted a very general porting sequence here:


This is a very technical undertaking, regardless.

Most any port requires detailed knowledge of both OpenVMS and of the target Unix platform; of the source and target of the port. This knowledge might be known to one person, or it might be case where a programmer familiar with the application and with OpenVMS creates a general design and requirements specification for an engineer familiar with Unix to review and implement. That design document does not and would not and should not include references to f$trnlnm or to logical names or another such OpenVMS features, but rather contains the purpose behind those references; the requirements and not the implementation.

DCL script to shell scr
Occasional Visitor

Re: DCL script doubts

Thank you to everyone who responded if any body have some material to study about open VMS
or DCL please send the links or material
Honored Contributor

Re: DCL script doubts

Start with the User's Guide and the Programming Concepts manuals here:


Willem Grooters
Honored Contributor

Re: DCL script doubts

offers free courses
Willem Grooters
OpenVMS Developer & System Manager
John McL
Trusted Contributor

Re: DCL script doubts

I have vague recollection of a VCL utility for running DCL command procedures on another platform. I can't recall if it was Unix or Windows.

I think this was from the same people who created an EDT-style editor for Windows and if my recollection is correct, this was a company in Boston.

There's not much that I'm sure of ;-) but maybe someone can rectify that.