Operating System - OpenVMS
1753613 Members
6013 Online
108797 Solutions
New Discussion юеВ

Re: awk, external command and quotes

 
SOLVED
Go to solution
Jess Goodman
Esteemed Contributor

Re: awk, external command and quotes

I tried what was posted at that url and it has some major issues. It tries to use the files bbb.awk and a.tmp as input files without first creating these files.

Also you should not use == to create DCL symbols when the symbols are only being used by the command procedure that creates them.
I have one, but it's personal.
labadie_1
Honored Contributor

Re: awk, external command and quotes

Sorry about that, I will fix it.
Jess Goodman
Esteemed Contributor

Re: awk, external command and quotes

I tried running what was posted at that url and it has some major issues. The command procedure tries to use the files bbb.awk and a.tmp as input files without first creating these files.

I recommend using the current process's PID as part of the file name for any temporary files created by a command procedure.

Also you should not use == to create DCL symbols when the symbols are only being used by the command procedure that creates them.
I have one, but it's personal.
labadie_1
Honored Contributor

Re: awk, external command and quotes

>>> I recommend using the current process's PID as part of the file name for any temporary files created by a command procedure.

Yes, like how fntmp is defined in this procedure ?
http://dcl.openvms.org/stories.php?story=03/09/23/7962305
Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: awk, external command and quotes

As Hein has suggested a scriptting language is probably more suitable.

As example, I have attach a Python script doing a similar job (including a sort option on any of the displayed item).

Choice of sort direction can easily be added.

JF
labadie_1
Honored Contributor

Re: awk, external command and quotes

Fine work

python bg.py -s ior
will sort by I/O received
python bg.py -s remp
will sort by remote port

How do I get a sort ascending and not descending, in the options ?

Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: awk, external command and quotes

Two options added to choose the sort direction.

To view the help just use
python ipstat.py --help (or -h)

JF