Computing.Net > Forums > OpenVMS > About command Procedures in openvms

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

About command Procedures in openvms

Reply to Message Icon

Name: xiaohu0411
Date: May 21, 2009 at 19:00:46 Pacific
OS: OpenVMS
Subcategory: General
Comment:

hi,
I want to transfer more than 8 parameters when perform a command procedure.
How do that?



Sponsored Link
Ads by Google

Response Number 1
Name: Ken Robinson (by kenrbnsn)
Date: May 21, 2009 at 20:16:22 Pacific
Reply:

You need to put the rest of the parameters in the 8th
parameter and parse them yourself. Something like:

$@test one two three four five six seven "eight nine ten"

test.com:

$ set noon
$ set nover
$ np = 8
$p8_loop:
$ if p8 .eqs. "" then goto nop8
$ myp'np' = f$ele(0," ",p8)
$ p8 = p8 - myp'np' - " "
$ np = np + 1
$ goto p8_loop
$nop8:
$ sho sym myp*
$exit

Ken


0

Response Number 2
Name: xiaohu0411
Date: May 21, 2009 at 22:23:04 Pacific
Reply:

This method is ok.But is there a command like 'shift in unix' in OpenVMS?


0

Response Number 3
Name: Entry in vms
Date: June 3, 2009 at 23:10:39 Pacific
Reply:

Hi ken,

i started my career in VMS.I tried ur program, it's working fine.One clariffication:

Any way to print the order the way we passed in 8 ELEMENT


0

Response Number 4
Name: amuir
Date: July 29, 2009 at 16:09:24 Pacific
Reply:

There is no "shift" function in DCL. But a slight variation on Ken's example would allow you to get the same (possibly better) functionality.

I would recommend passing all values in a single parameter (P1) as a quoted string with each value separated by a unique delimiter. Then use the F$ELEMENT() lexical function as shown in Ken's example to "shift" through the values.

To display the values in the order they were passed in, simply add the following command inside the loop as you're parsing the values:

$ write sys$output "P''np' = ", myp'np'

(Of course, if you do that, you'd probably want to take out the show symbol command.)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: About command Procedures in openvms

command procedure searching tape da www.computing.net/answers/openvms/command-procedure-searching-tape-da/376.html

Refresh disc systema in alpha of Op www.computing.net/answers/openvms/refresh-disc-systema-in-alpha-of-op/208.html

Multicasting in OpenVMS www.computing.net/answers/openvms/multicasting-in-openvms/48.html