Computing.Net > Forums > OpenVMS > Search command in Vi for VMS

Search command in Vi for VMS

Reply to Message Icon

Original Message
Name: saptarshi
Date: February 11, 2008 at 00:09:14 Pacific
Subject: Search command in Vi for VMS
OS: VMS
CPU/Ram: NA
Model/Manufacturer: NA
Comment:

Hi,
Please let me know what is the command that i can type in the Vi editor compiled in the VMS OS for searching for a text string. Basically i want the equivalent of the "/" command for search in Vi unix.
cheers
Sapti


Report Offensive Message For Removal


Response Number 1
Name: HakZan
Date: February 11, 2008 at 00:37:21 Pacific
Reply: (edit)

I'm not a frequent UNIX user so I haven't implemented any UNIX-style tools om VMS.

You are sure it is "Vi" on VMS you are using ?

You are not using a symbol called "vi" to start an existing OpenVMS editor ?

What command are you using to start the editor ?

"Vi" is not a standard VMS editor, so you have to supply more information.......what software is used ?,.....

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 2
Name: saptarshi
Date: February 11, 2008 at 01:43:12 Pacific
Reply: (edit)

Hi,
Thanks for the response.
The thing is that i am very new to VMS.
I am not sure whether i am actually running the Vi editor or Vi has been aliased to some other editor.
The exact command that i am typing is:
"vi abc.c"
Is there any way of knowing whether it is actually the vi editor or not?

regards,
Saptarshi.


Report Offensive Follow Up For Removal

Response Number 3
Name: HakZan
Date: February 11, 2008 at 06:17:08 Pacific
Reply: (edit)


$ SHOW SYMBOL VI

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 4
Name: saptarshi
Date: February 11, 2008 at 19:25:02 Pacific
Reply: (edit)

Hi,
I typed this command and the output that i am getting is this:
VI == "ED"
So, it seems like the Vi is aliased to some 'ED'.
Is this a VMS specific editor?
If so what is the search command in this editor?
Thanks
Saptarshi.


Report Offensive Follow Up For Removal

Response Number 5
Name: HakZan
Date: February 11, 2008 at 22:37:42 Pacific
Reply: (edit)

You are using the OpenVMS EVE editor.

Depending on your keyboard. The numeric keypad is used to control the editor.

PF4 will take you to the "command:" prompt at the bottom of the screen. Then you use the native HELP utility.

In my case PF4 is button in the upper right corner of the numeric keypad.

Take a look at

http://h71000.www7.hp.com/doc/73fin...

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal


Response Number 6
Name: saptarshi
Date: February 11, 2008 at 23:31:22 Pacific
Reply: (edit)

Hi,
I looked up the reference site that you sent however i haven't found any key with PF on it. I am using a standard DELL keyboard. Does this key exist in current keyboards?
I tried opening my file with the command
"eve file_name" and it gave the error
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\EVE\

cheers
Saptarshi


Report Offensive Follow Up For Removal

Response Number 7
Name: HakZan
Date: February 12, 2008 at 01:18:06 Pacific
Reply: (edit)

The top-row on the numeric keypad is called
PF1-PF4 ( On my keybord "NumLock","/","*" and "-" )

The VMScommand to invoke EVE is EDIT or EDIT/TPU.

use your "vi"-command.

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 8
Name: saptarshi
Date: February 12, 2008 at 02:31:59 Pacific
Reply: (edit)

Hi,
I tried using the keys P1-P4. P1-P3 says has no definition to it whereas P4 takes the cursor to the end of the line of the file that i have opened. Any other clue??

cheers
Saptarshi


Report Offensive Follow Up For Removal

Response Number 9
Name: Joseph.Huber
Date: February 12, 2008 at 04:38:03 Pacific
Reply: (edit)

EVE and EDT are editors steered with the keypad keys, and without having PF1 to PF4 almost nothing can be done.
There are two ways to get those 4 keys on non-DEC keyboards, depending on the way You are accessing the VMS system.

If not using Xwindows, but a terminal window:
Putty (Windows and Linux) does an acceptable mapping.
From a Unix type system, use xterm with a key-remapping: one example is at

http://www.huber-joseph.de/vmsterm

If working on an Xwindow system, You can use xmodmap to remap the keypad and/or function keys to the one expected by VMS.
Look into some examples at
http://wwwvms.mppmu.mpg.de/util_roo...
Then see some of the XMODMAP.* files near the bottom of the page.
The keycodes of xmodmap files are system/hardware dependent and have to be determined at Your system, using utilities like XEV (in decw$utils:), or more comfortable XKEYCAPS (see link at
http://wwwvms.mppmu.mpg.de/~huber/pds/



Report Offensive Follow Up For Removal

Response Number 10
Name: Kelly Stewart
Date: February 12, 2008 at 07:49:32 Pacific
Reply: (edit)

Hello Saptarshi,

My PF4 key deletes the line that the cursor is on.

The reason for the differences in keys is the configurability and programmability of EVE / TPU. It can be difficult to relate one installation to another because of all the customization. As it happens, the "raw" editor has almost no keys defined; most commands must be entered at the command prompt (and the command you want is "find"). The default key to invoke the command prompt is "Do" or F16, which is not on a standard PC keyboard. The "find" command is usually mapped to the Find key, which is not labeled as such on a PC keyboard, but which is often mapped as Insert or Home.

Please let us know the results of these VMS commands:

$ show logical tpu$section
$ show symbol ed*

Also give us details about your terminal emulation. Probably you are using a PC program that emulates a VT-series terminal; which program is it? Note that commercial emulators, such as Extra! and Reflection, have optional windows that emulate the missing VT-series keys.

Yours,
Kelly Stewart


Report Offensive Follow Up For Removal

Response Number 11
Name: Joseph.Huber
Date: February 12, 2008 at 10:45:28 Pacific
Reply: (edit)

As said earlier, Putty does a good job in remapping keypad keys, and it does it per terminal window, independent of the underlying windowing system.
Putty is available for Windows and Unix/Linux.

Putty homepage is at
http://www.chiark.greenend.org.uk/~...


Report Offensive Follow Up For Removal

Response Number 12
Name: saptarshi
Date: February 12, 2008 at 20:24:09 Pacific
Reply: (edit)

Thanks a lot for the help.
Will look into it when i get the time.
For the time being have copied the files into Unix and viewing it there :)
Thanks again

cheers
Saptarshi.


Report Offensive Follow Up For Removal

Response Number 13
Name: Joseph.Huber
Date: February 13, 2008 at 06:02:47 Pacific
Reply: (edit)

And finally, if You are working rather infrequently on VMS, You may install editors there, which do not rely on a DEC-(VT-,VMS-)keypad layout.
Amongst others are available:
VIM http://www.vim.org
NEDIT http://www.nedit.org
Emacs
Jedit (Java based) http://www.jedit.org

Look in the freeware linked from HPs Openvms home page,
or in
http://www.process.com/openvms


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Search command in Vi for VMS

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge