Hi script OpenVms and PML (288 Views)
Reply
Occasional Contributor
CIDJULIO
Posts: 6
Registered: ‎08-15-2009
Message 1 of 4 (288 Views)

Hi script OpenVms and PML

Hi, mi name´s Julio. I need to do a monitoring script in OpenVms that help me to monitoring process of PML.

I hope that you can help me.

Thanks a lot.

This is my little script, but no ok the sentense pmlfile...

$ create mi.pml
$ open /write /error=SEND_PML PMLFILE mi.pml
$ write pmlfile "CONNECT"
$ write pmlfile "ENABLE OUTPUT /FILE=salida.txt"
$ write pmlfile "show class smh /sm_rec/sm_trans /notif_trans"
$ write pmlfile "show class smh /msg_buff"
$ write pmlfile "DISCONNECT"
$ write pmlfile "EXIT"
$ close pmlfile PML
Honored Contributor
Robert Gezelter
Posts: 2,367
Registered: ‎10-30-2003
Message 2 of 4 (288 Views)

Re: Hi script OpenVms and PML

CIDJULIO,

Welcome to the HP ITRC OpenVMS forum!

The script in the original posting merely creates the file, it does nothing to feed the file into PML.

The sample code appears almost identical to that in an article on OpenVMS.org at http://dcl.openvms.org/stories.php?story=09/01/04/7641409

One difference is that the example has variable data to be included in the commands, and this sample code does not.

The invocation of PMI from the above article is:

pml := $smsc$root:[bin]pml
$ define/user sys$output nla0:
$ pml/input_file='pml_script'/queue=send_pml_command/response_time=60

If the commands are the same every time, and do not include any variable data, it is often better if you do not build an auxiliary file, and merely pass them implicitly using SYS$INPUT, to wit:

$ pml/input=sys$input/...
connect
enable output/file=salida.txt
show class smh ...
show class smh ...
DISCONNECT
EXIT
$ (whatever other commands are to follow the code).

If there is actually variable data in the input file, then creating the intermediate file is needed, and the example on OpenVMS.org is appropriate.

Any output will appear on SYS$OUTPUT or SYS$ERROR, as appropriate.

- Bob Gezelter, http://www.rlgsc.com
Occasional Visitor
BenitoFontes
Posts: 1
Registered: ‎02-25-2013
Message 3 of 4 (278 Views)

Re: Hi script OpenVms and PML

Hi,

 

I didn't understand the line: $ pml/input=sys$input/...

can you explain?

 

I wanna put some PML commands in my script...

 

Please help me!

 

Thanks!!

Honored Contributor
Hein van den Heuvel
Posts: 6,588
Registered: ‎05-19-2003
Message 4 of 4 (259 Views)

Re: Hi script OpenVms and PML

Benito,

 

You are asking for an explanation on standard OpenVMS methods/behaviour.

 

IF (and only if) you haved FIXED (static ) input data to provide to a file, then you can put that data straight into the DCL script file.

After starting an executable, any line NOT starting with a $ sign is available as a file "sys$input:" 

 

For example:

$ TYPE sys$input:

hello

world

$ EXIT

 

Now if the data is variable ( dynamic )  then is first needs to be written to a file (or pipe or maillbox )  and thne that file can be indicated as input stream.

 

Note: Be sure to check out : $ HELP DECK

 

Hope this helps,

Hein

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.