We have a handy little exec2 xedit script we use for this written by a.
durie named gpunch. This tool will insert characters throughout a file
from the command line in xedit.

Gpunch starting_column characters_to_insert number_of_rows

 

Gpunch 1 Q_DA *    

 

_ = blank.

* = all lines in file

 

            

 

________________________________

From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On
Behalf Of Robert Reuscher
Sent: Monday, February 21, 2011 5:52 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Xedit question

 

My original reply got eaten by the listserv as it thought I was sending
it commands (Didn't have any text of than the commands).

 

SET ARBCHAR ON (or just ARBCHAR ON)

ZONE 1 2

C/$/Q DA/*

 

since he also wanted to strip out the leading numbers as shown in his
desired results. 

Robert Reuscher

NR5AR

 

On Feb 21, 2011, at 3:18 PM, Rob van der Heij wrote:





On Mon, Feb 21, 2011 at 9:16 PM, Martin, Terry R. (CMS/CTR) (CTR)
<terry.mar...@cms.hhs.gov> wrote:




I want to insert the following command Q DA in front of each entry. What
is

        the best way to do this using xedit?


This sound like "how can a drill a hole with... " type of challenge. I
probably would not use XEDIT to do it but rather
:0 pipe xedit | spec ,Q DA, 1 w2 nw | cp | cons
(assuming you want to issue the commands, not just have a file with
the commands in it...)

Surprised none of the more experienced XEDIT people suggested ARBCHAR ?
set arbchar on $
:0 ch /$ /Q DA / *

Rob

 

Reply via email to