From: st@eniac.seas.upenn.edu (Stephen W. Thompson)
Newsgroups: comp.os.vms
Subject: Re: EVE specins function? (SUMMARY)
Keywords: eve hex characters control specins
Date: 13 Nov 92 15:48:21 GMT
Organization: University of Pennsylvania

I posted earlier this week asking how to enter and globally replace control
characters in EVE.  Here is my summary of the responses, all of which were much
appreciated.

My question, in part:
>Some null characters were in a file received from 'elsewhere'.  I'd like
>to know how to do a global replace to make the nulls into spaces.
>How does one enter the null (x'00') character in EVE?
> [...]
>I know about the Quote character ^V, but that doesn't seem to help me with
>the null character, does it?

I received responses from 
   Dave Cantor  09-Nov-1992 2114 <cantor@star.enet.dec.com>
   michael@hermes.chpc.utexas.edu (Michael Lemke)
   Carl J Lydick <carl@SOL1.GPS.CALTECH.EDU>
   "Ken Fairfield; [415] 926-2924 SLAC" <FAIRFIELD@SCS.SLAC.STANFORD.EDU>
   Larry Horn <hornlo@okra.millsaps.edu>
   Dave Lennon <348588060@ucis.vill.edu>
   Dave Jerome <jeromed@fsdec3.wtp.gtefsd.com>

Others came posted to the list, even though I asked for them directly.  They
are not listed here (mainly because I'm not a regular reader, as opposed to
being a stick-in-the-mud).

The various solutions they returned, in order of how convenient/appropriate
they were for my needs, are:

1. Ctrl-V Ctrl-2 gives me the null I needed.  Shows me that computing is all
   by convention, and if you don't know the convention (or where to look it
   up) you're stuck.

2. <DO> TPU COPY_TEXT( ASCII( 0 ) ) also works nicely, and gives me a general
   answer.  If I need character n, just substitute n for 0.  Nice!

3. Define a key to perform the EDT function: DEF KEY=control-g EDT GOLD/PF3
   Nice because I don't lose my good old dependable EVE keypad keys.

4. Use the EVE command SET KEYPAD WPS, then use the EDT command:
   <Gold>, 0, <Gold>, KeyPad3.  (Normally Gold=F1, but not always.)

5. Use EDT instead of EVE, and use the keystrokes from #3.

6. Ctrl-V Ctrl-Space works on some keyboards.  Not mine, unfortunately.


Thanks, all!  Some of the replies which were especially helpful follow.

Steve

----------
Date: Mon, 09 Nov 1992 21:25:20 PST
From: Carl J Lydick <carl@SOL1.GPS.CALTECH.EDU>
Subject: Re: EVE specins function? (or 'How to enter hex?')

In article <96875@netnews.upenn.edu>, you write:
>Some null characters were in a file received from 'elsewhere'.  I'd like
>to know how to do a global replace to make the nulls into spaces.
>How does one enter the null (x'00') character in EVE?

Either <CTRL-V><CTRL-@> or <DO>COPY_TEXT(ASCII(0))<RETURN>

>I know about the Quote character ^V, but that doesn't seem to help me with
>the null character, does it?

Yes, it does.  You just have to remeber that the NULL character is <CTRL-@>

>My understanding is that EVE is primarily a text-only editor.  But since
>you can quote certain control characters, I have hopes that I can specify
>the null as I can the form feed (^L) character.
>
>Lastly, though my need currently is to remove the nulls, I hope that your
>answer would enable me to *insert* nulls if I needed to at another time.

To remove NULLs:
<DO>REPLACE <CTRL-V><CTRL-@> " "<RETURN>
----------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.

-----
Date: Mon, 9 Nov 1992 23:36 PDT
From: "Ken Fairfield; [415] 926-2924 SLAC" <FAIRFIELD@SCS.SLAC.STANFORD.EDU>

Stephen,

You wrote:
> Some null characters were in a file received from 'elsewhere'.  I'd like
> to know how to do a global replace to make the nulls into spaces.
> How does one enter the null (x'00') character in EVE?

    It would be nice if you could enter a null with CTRL/V CTRL/SPACE
(I don't have my ascii chart at home, null _is_ CTRL/SPACE isn't it?).
Here's a way to get around it:

    1) If there are null's in your file already (the little N/L character),
       put your cursor on one of them and press the ERASE CHARACTER key
       (or type ERASE CHAR at the DO Command: prompt).

	1b) If you don't have any null's handy, hit DO and at the Command: 
	    prompt type:

		Command: TPU COPY_TEXT(ASCII(0))

	    That _will_ get a null into the current buffer which 
	    you can ERASE CHAR as above.

    2) If you don't have RESTORE bound to a key, do a DEFINE KEY of 
       RESTORE to some key (we'll call that the "Restore_Key" below).

    3) Press DO and at the Command: prompt, type the following, but
       note that Restore_Key means type that KEY, not the word:

	    Command: replace "Restore_Key" " "

    4) When REPLACE prompts you with:

	    Replace? Type Yes, No, All, Last, or Quit: 

       respond with "A".
	
    That's how to do it on the fly.  If you'll need to do this frequently,
write a TPU procedure to use in EVE that loops, searching the current_buffer 
for ascii(0), erasing it, and doing a copy_text(ascii(32)).

		Cheers, Ken
-- 
 Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slac.Stanford.Edu
 SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
 Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
 ----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...

-----
Date: Thu, 12 Nov 1992 07:51:26 CST
From: Larry Horn <hornlo@okra.millsaps.edu>
Subject: EVE - inserting nulls

To insert a null with EVE:

        ctrl/V + ctrl/@  (that is, the [@/2] key)

        ctrl/V + ctrl/space  (at least on some terminals)

To use the EDT SPCINS:

        Command: SET KEYPAD EDT
        PF1 + 0 + PF1 + KP3

If you don't want to use the SET KEYPAD EDT mode, you can put
this in your EVE$INIT (or just enter it at the command prompt):

        define key=gold/kp3 EDT GOLD/KP3
                   ^^^^^^^^
                      +------- whatever key you want here

To do searches for nulls, I believe you'll have to use the ctrl/V
form, but I've not checked that out.

- ---------------------------------- signed: 12-NOV-1992 07:51 C*T (USA) --- -
    Larry Horn / Millsaps College / Jackson, MS / hornlo@okra.millsaps.edu
- -------------------------------------------------------------------------- -
--
Stephen W. Thompson, University of Pennsylvania, 215-898-4585 ('til 11/25)
Institute for Research on Higher Education, thompson@a1.quaker.upenn.edu -OR-
     ** SMILE! **                               st@eniac.seas.upenn.edu