Ernie,
I know that Qedit 'handles' regular expressions. When I read your message
yesterday I tried to figure out a solution using 'regexp' but gave up. I
tried again today and came up with the following solution for the situation
described in your original e-mail.
c "([0-9][0-9][0-9][0-9])([0-9][0-9][0-9][0-9])"(10/17,reg) "\2\1" all
The regular expression could be 'tweaked' to only consider valid dates
instead as it is currently specified of just a string of 8 digits.
Regards
Paul Christidis
Thanks to all...
That was actually quite simple. I just cut the command
file from the email and pasted it into Qedit,
saved it and followed the example...pretty slick...
For those of you with a need to use this, keep in mind
the it will write over existing data in the columns
that you copy to. I gave myself four spaces in those
columns and it worked great!
Thanks again.
Ernie
-----Original Message-----
From: Bruce Collins [mailto:[log in to unmask]]
Sent: Thursday, June 26, 2003 7:11 AM
To: Newton, Ernie; [log in to unmask]
Subject: Re: [HP3000-L] Qedit question
Here is the example of the "copycol" command file taken from Qedit's
online "/help replace":
COPYCOL.CMD.SYS
parm fromcol,tocol,length,rangelist
/set right
/set left
setjcw right := !fromcol + !length
setjcw right := right - 1
/set right !right
/set left !fromcol
/holdq !rangelist
setjcw right := !tocol + !length
setjcw right = right - 1
/set left
/set right !right
/set left !tocol
/replaceq $hold !rangelist
/set right
/set left
For example, to copy text from columns 1/5 to column 30 in all lines,
you would enter:
/copycol 1 30 5 @
----- Original Message -----
From: "Newton, Ernie" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, June 25, 2003 7:29 PM
Subject: [HP3000-L] Qedit question
Greetings,
I am creating a file for a vendor that wants
a date in MMDDYYYY format. Problem is that
our dates are stored in YYYYMMDD format. What
I want to do is use Qedit to flip YYYY and MMDD.
For the purposes of this query, lets assume that
YYYYMMDD takes up columns 10/17. Can this be done?
Thanks,
Ernie
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|