Questions tagged [dcl]

DCL is the language for command lines and batch files of RSX and VMS operating systems; it stands for Digital Command Language (*Digital* was a computer and software vendor 1958-1998).

DIGITAL Command Language is the standard command language adopted by most of the DEC operating systems. It evolved from the IAS, TOPS-20, and RT-11 operating systems and was implemented as a standard across most of Digital's operating systems, notably RSX-11, but took its most powerful form in the operating system.

DCL is a scripting language supporting several datatypes, including strings, integers, bit arrays, arrays, and booleans, but not floating point numbers. Access to OpenVMS system services (kernel API) is through lexical functions, which perform the same as their compiled language counterparts and allow scripts to get information on system state. DCL includes IF-THEN-ELSE, access to all the RMS file types including stream, indexed, and sequential, but unfortunately lacks a DO-WHILE or other looping construct, requiring users to make do with IF and GOTO-label statements instead.

Indirect variable references are possible. Though it largely resembles most other scripting languages, one of its most unique attributes is how a batch file is treated differently from a terminal command input with regard to commands and pure data:

$ TYPE SYS$INPUT:
This is an example of using the TYPE verb
in the DCL language.
$ EXIT

Command files are extremely powerful and convenient for performing many system operations, including privileged operations. Many system functions are implemented by command file due to the great challenge of writing an equivalent program using the (unwieldy) system API.

References:

DCL related tags

39 questions
5
votes
3 answers

DCL symbol syntax in OpenVMS

I am really confused by some syntax in the DCL of OpenVMS. For example, these are some of the lines which confused me: $ wo = "write sys$output" Does it create a symbol wo for write sys$output? $ billing_run_number == p1 Is p1 a parameter…
lamwaiman1988
  • 3,729
  • 15
  • 55
  • 87
3
votes
3 answers

OpenVMS - batch to check if running latest version of script

Is it possible to code a batch script to check that there has been no versions added since this one was queued up and if so run the updated script instead. I could do this by sub-scripting it but that would mean 2 scripts for each script i have in…
Marcus Culver
  • 305
  • 1
  • 4
  • 8
3
votes
3 answers

hide error messages in dcl script

I have a test script I'm running that generates some errors,shown below, I expect these errors. Is there anyway I can prevent them from showing on the screen however? I use the $ write sys$output to display if there is an expected error. I…
user1943219
  • 396
  • 2
  • 5
  • 19
2
votes
1 answer

Iterate with files in Openvms DCL

I have this file input.text with say 20 lines. (Although I would like to be able to use any number of lines) So I want to open the said file and use each string as though it was a parameter for another command. This other command would take each…
DiggidyDale
  • 75
  • 1
  • 7
2
votes
1 answer

How to enable case sensitive in HP openVMS DCL?

My DCL as below (TEST.EXE just print the input ) $ DEFINE DCL$PATH SYS$DISK:[],SYS$LOGIN:,SYS$SYSTEM: $ PIPE TEST.EXE abc | DEFINE/JOB RET_VALUE @SYS$PIPE $ x = f$logical("RET_VALUE") $ WRITE SYS$OUTPUT x I want to let this DCL show the result is…
Y.C.
  • 77
  • 6
2
votes
4 answers

files opened by a process on VMS

I have a DCL script on VMS which calls a perl script. Is there a VMS/DCL command I can use that will tell me every file handle opened by the perl script?
Jason
  • 681
  • 1
  • 9
  • 19
1
vote
2 answers

Can VMS filenames combine logical names and subdirectories?

I wonder about an apparent limitation to the flexibility of using filenames and logical names (~ filename aliases in this context) on VMS. You can have names like [dir]name or [.subdir]name and you can combine them with a device like dskxy:[dir]name…
1
vote
2 answers

While updating the record in Sql using query...0(Zero) is getting omitted while storing in database

My requirement is -- Am trying to store the value entered by user into database (One of the Table in the database). But when am entering 0921 as department, then 0 (Zero) is getting ommitted and only 921 is getting stored in the database !! Which is…
1
vote
2 answers

How to Edit a text from the output in DCL -- OpenVMS scripting

I wrote the below code, which will extract the directory name along with the file name and I will use purge command on that extracted Text. $ sear VAXMANAGERS_ROOT:[PROC]TEMP.LIS LOG/out=VAXMANAGERS_ROOT:[DEV]FVLIM.TXT $ OPEN IN…
1
vote
3 answers

How to assign the output of a program to a variable in a DCL com script on VMS?

For example, I have a perl script p.pl that writes "5" to stdout. I'd like to assign that output to a variable like so: $ x = perl p.pl ! not working code $ ! now x would be 5
Jason
  • 681
  • 1
  • 9
  • 19
1
vote
3 answers

How to store a result to a variable in HP OpenVMS DCL?

I want to save the output of a program to a variable. I use the following approach ,but fail. $ PIPE RUN TEST | DEFINE/JOB VALUE @SYS$PIPE $ x = f$logical("VALUE") I got an error:%DCL-W-MAXPARM, too many parameters - reenter command with fewer…
Y.C.
  • 77
  • 6
1
vote
1 answer

Handling DCL ON ERROR actions after first error?

The OpenVMS DCL command HELP ON EXAMPLE displays: ON Examples 1.$ ON SEVERE_ERROR THEN CONTINUE A command procedure that contains this statement continues to execute normally when a warning or error occurs during execution. When…
CW Holeman II
  • 4,661
  • 7
  • 41
  • 72
1
vote
5 answers

How to store a command output in OpenVMS

Im having an issue writing a DCL in OpenVMS in that I need the DCL to call a command and capture its output (but not output the output to the screen) Later on in the DCL I then need to print that output I stored. Heres an example: ICE SET FASTER…
Festivejelly
  • 670
  • 2
  • 12
  • 30
1
vote
1 answer

Problems with DCL Symbols

I have been using VMS/OpenVMS for over 30 years now. I found something interesting yesterday. I always have symbols PU*RGE :== PURGE/CONF, and DE*LETE :== DELETE/CONF in my setups. This is to avoid accidental deletions and purges. However, one…
1
vote
2 answers

dcl executing program using foreign command

How would you go about doing this? I have a file which contains roughly 40 lines, each line are variables for an .exe file. I've setup a foreign command $ CC := "$something$something:file.exe" I then try to loop through the file line by…
user1943219
  • 396
  • 2
  • 5
  • 19
1
2 3