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

new to dcl command files

 
Phil Rosenberg
Occasional Visitor

new to dcl command files

Hi
Firstly I want to appologise for my ignorance. I'm araid I've grown up on microsoft products and I'm a scientist with some programming knowledge not an IT specialist. Hence I hope this is the correct forum for my post.
I'm looking for some help automating some work we do on an OpenVMS system. I work for an atmospheric measurements group and we have one set of instruments (which, if you are interested, measure cloud properties) which collect data in a raw format which must be processed to provide user readable data. We currently perform the processing on an OpenVMS system but it's very time consuming and involves inputting data repeatedly at different stages of the processing so I'd like to automate it, presumabley using a command file. This is my first experience of OpenVMS and dcl so I'm struggling a bit. Here's an example of part of what we do. One exe file that we must run is executed with the line

run mrfb:[pms.spec2d.auto]spec2d_auto

which we currently type at the prompt.
The program then asks us for the measurement start and end times in the format hhmmss which we type in. We have to run a number of these programs each of which require us to enter start and end times.
I'd like to automate this if possible. If I was on an MS DOS system I'd create a batch file and pipe the input of the times from a file. However I'm struggling in OpenVMS. Even a simple command file with the line

$ run mrfb:[pms.spec2d.auto]spec2d_auto

fails with an error
dcl-w-actimage error activating image

I'd really be appreciative if anyone can offer any advice or give an example of what I would need to do.

Cheers
Phil
9 REPLIES 9
labadie_1
Honored Contributor

Re: new to dcl command files

Phil

Welcome to the Vms forums

Read carefully what John Gillings says in this thread

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1272378

You will find several ways to do it.
Jon Pinkley
Honored Contributor

Re: new to dcl command files

Phil,

In addition to the thread labadie referenced in the previous thread, here is another recent one that discusses passing info.

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1268313

Jon

it depends
Robert Gezelter
Honored Contributor

Re: new to dcl command files

Phil,

Welcome to the ITRC OpenVMS Forum!

There are quite a few ways to do this, and some of them depend upon how the program is reading its input data. [A side question is: Do you have the sources for the program?]

I would not expect an "error activating image" from an input file change. Are you sure that the file name in the RUN command is correct?

If the program is reading from the standard input (SYS$INPUT), there are two choices: point the input file temporarily to a text file using the ASSIGN/USER_MODE command; or include the text inline in the command file stream.

Personally, if the same inputs will be reused, I tend to query the user, enter the values, check that the values are valid, and then stash them in a temporary file that I reference repeatedly, often using ASSIGN/USER_MODE.

Another, simpler way to start is to work with a simpler example. What programming language is most familiar and is it available on your OpenVMS system?

- Bob Gezelter, http://www.rlgsc.com
Willem Grooters
Honored Contributor

Re: new to dcl command files

$ run mrfb:[pms.spec2d.auto]spec2d_auto
dcl-w-actimage error activating image

The image activator will try to load the program; it could locate the file (otherwise you would get en error indicating the file could not be found) but was unable to make the file ready to be executed.

Question: how did you execute the command file? Intercatively (@), in a subprocess (SPAWN @ or in batch (submit ). It could make the difference.
The following applies if you run the process in batch (have submitted it).
Since the executable is found (no RMS-FNF message) indicates that logical mrfb: is set correctly in your process,and when running the procedure. However, if the program requires shared images (in MS terms: .DLL files) or global sections that are referred by logicals, they may not be set correctly, or at all, when the procedure is run outside your process environment.
What you could do to find out, is:

$ SHOW LOG /FULL

interactively, and as the first command in your procedure. Check for differences.

These logicals can be set in a system-wide login (SYS$SYLOGIN:), or in your perosnal login file (SYS$LOGIN:LOGIN.COM) or any file invoked from either of these two. Beware that these logicals may be set in any of these files but not when run in BATCH mode
(a line like
$ IF F$MODE() .EQS. "BATCH" THEN EXIT
is quite common)

Second: RUN doesn't allow for arguments. This has been covered in both entries already mentioned
Willem Grooters
OpenVMS Developer & System Manager
Phil Rosenberg
Occasional Visitor

Re: new to dcl command files

Thank-you everyone for your warm welcomes and information. I'll have a good read about passing arguments.

I think I have found part of the problem. I have been creating my .com file on a windows pc with notepad and ftping it accross. As I tinkered with it I got various errors or nothing happening at all. I just tried instead creating the file with the create command on the vms system itself and I have now at least got the image to execute. I now need to work out the arguments.
Interestingly when I use type to display the contents of a file it looks the same whether created on a windows pc or natively. I wonder if there are differences in the carriage return character or something.

again thanks. I'll call back when i hit my next insurmountable problem ;)