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

Using pipe in VMS 7.6

haibara
Occasional Visitor

Using pipe in VMS 7.6

I am using VMS 7.6 and i find there is no "pipe" command in it.
How do i do to input the text when runing the com file like:

pipe type input.txt | @runtest

thanks a lot
11 REPLIES
Ian Miller.
Honored Contributor

Re: Using pipe in VMS 7.6

Can you check which version of VMS you have.
I don't recall there being a 7.6 release.

A list of VMS versions can found found at

http://h71000.www7.hp.com/openvms/openvms_supportchart.html

____________________
Purely Personal Opinion
Steven Schweda
Honored Contributor

Re: Using pipe in VMS 7.6

> I am using VMS 7.6 [...]

What? On what?

As usual, showing actual commands with their
actual output can be more helpful than vague
(and inaccurate) descriptions or
interpretations.

write sys$output f$getsyi( "arch_name")
write sys$output f$getsyi( "version")

> [...] i find [...]

What, exactly, did you do, and what, exactly,
happened when you did it?
Andy Bustamante
Honored Contributor

Re: Using pipe in VMS 7.6

There was no 7.6 release of OpenVMS.
Please post the results of

$ write sys$output f$getsyi("version")
$ write sys$output f$getsyi("arch_type")
(1 - VAX, 2 - Alphaserver, 3 - Integrity).



If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Hoff
Honored Contributor

Re: Using pipe in VMS 7.6

PIPE was added at OpenVMS V7.1.

You either need to upgrade to V7.1 or later to use PIPE, or you need to re-code the DCL to eliminate the use of the PIPE command.

Specifically for the DCL PIPE example shown, you would likely need to re-code RUNTEST to read the file directly.

Here is a general example of using DCL file-processing to perform the necessary file I/O to read and display the contents of a file:

http://labs.hoffmanlabs.com/node/383

John Gillings
Honored Contributor

Re: Using pipe in VMS 7.6

>pipe type input.txt | @runtest

Regardless of the version of OpenVMS you're running, for this case, (assuming your RUNTEST procedure reads from SYS$PIPE), you should be able to recode your PIPE command as:

$ OPEN/READ SYS$PIPE INPUT.TXT
$ @RUNTEST
$ CLOSE SYS$PIPE

More generally, you can break up your PIPE commands into segments:

$ DEFINE/USER SYS$OUTPUT pipe1.tmp
$ execute 1st pipe segment

$ OPEN/READ SYS$PIPE pipe1.tmp
$ DEFINE/USER SYS$OUTPUT pipe2.tmp
$ execute 2nd pipe segment
$ CLOSE SYS$PIPE

etc...

However, there are cases where this won't work. For example anywhere a pipe segment can't be executed to completion before passing the data to the next segment.
A crucible of informative mistakes
haibara
Occasional Visitor

Re: Using pipe in VMS 7.6

Thanks everyone's help.
I just find that there is typo in my thread.

OpenVMS is in version 6

what i want to do, actually, is instead of
input data from terminal, i want to input data stored in input.txt

here is the example:

testpipe.com


$ write sys$output "please input the value"
$ INQUIRE/NOPUNC in_ans "Enter Value:"
$ write sys$output "answer is ''in_ans'"


==================================
input.txt

HELLO

=================================
I don't want to edit the COM file.
but how can i input "HELLO" to when i run
testpipe.com from input.txt??

thanks a lot
Hoff
Honored Contributor

Re: Using pipe in VMS 7.6

Here is a general example of using DCL file-processing to perform the necessary file I/O to read and display the contents of a file:

http://labs.hoffmanlabs.com/node/383

The HP VMS documentation is here:

http://www.hp.com/go/openvms/doc

Read the User's Guide first, and then the DCL dictionary.

And do yourself a favor, and don't use the INQUIRE command. That command is far weirder than might be realized, and (because of those behaviors) that command is specifically locked out in various OpenVMS contexts. Use the READ command in place of INQUIRE.
MarkOfAus
Valued Contributor

Re: Using pipe in VMS 7.6

Hi,
Try this:

pipe type input.txt | @testpipe

But as you have a version without pipe, it's all academic really. Pipe was introduced in 7.1 I believe.

Cheers
Mark
MarkOfAus
Valued Contributor

Re: Using pipe in VMS 7.6

Hi,
I'm sorry, I should offer a solution. This is based on what I know of your problem (which is very little):


$ define sys$error nl:
$ set message/nofac/noident/notext/nosev
$ spawn /input=input.txt @testpipe
$ deassign sys$error
$ set message/fac/ident/text/nosev

Set message hides the message guff from spawn (there are other ways but...)

Cheers
Mark
Jeremy Begg
Trusted Contributor

Re: Using pipe in VMS 7.6

Haibara, it's a pity you don't want to modify your procedure. Replace your INQUIRE command by a READ SYS$INPUT command then you can easily get input from any file you like.

E.g.

$ define/user sysinput input.txt
$ @testpipe.com

Otherwise you're stuck with using Mark's SPAWN solution. You can simplify it however by using SPAWN/NOLOG which removes the need for all the other statements before and after SPAWN.

Regards,
Jeremy Begg
Jeremy Begg
Trusted Contributor

Re: Using pipe in VMS 7.6

Sorry, one more thing ....

I remembered that before PIPE was built into VMS there was a freeware utility which did much the same thing.

You can find it on the OpenVMS web site under the Freeware archives, or mirrored on my server at

http://www.vsm.com.au/ftp/kits/adv_pipe.zip

Regards,
Jeremy Begg