Or, you could download the BPTEST or TRY program from:

     http://www.pickwiki.com/cgi-bin/wiki.pl?BasicSource

...then write the simple code from the command line. Not only are these programs good to test syntax, but they're great for performing simple tasks that don't work from the command line.

Bill

------------------------------------------------------------------------
----- Original Message -----
*From:* mec...@gmx.net
*To:* U2 Users List <u2-users@listserver.u2ug.org>
*Date:* 5/29/2013 12:25 AM
*Subject:* Re: [U2] UniData PreStore to change the KEY of a record?
To stay with the picture of not using a hammer to drive in a screw, I would just write a Basic program to do this.
Use the right tool for the job!
Open the file
Execute GET-LIST
Then a loop that generates the new Ids including checking that it doesn't already exist, READU record from old Id, WRITE record to new ID, DELETE old record.
A few lines of code written in less than a minute.
Compile, generate list, run program, job done!


On 28/05/2013 21:59, Charlie Noah wrote:
Dang, David, you beat me to it. ;^) I was just going to suggest the same thing. Just because the OP wanted to use ED (a hammer) to drive in a screw doesn't mean that it is the best tool ( a screwdriver). Good answer.

Charlie Noah

On 05-28-2013 3:42 PM, David A. Green wrote:
I would take my saved list and copy it to a text editor then using copy
commands and a quick macro convert the list into a bunch of COPY FROM FILE.A
BAD.KEY, GOOD.KEY commands.  Then save it as a PA and then execute it.

David A. Green
(480) 813-1725
DAG Consulting

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton
Sent: Tuesday, May 28, 2013 10:48 AM
To: 'U2 Users List'
Subject: [U2] UniData PreStore to change the KEY of a record?

I am always using what I call 'PreStore' command...

In the AE editor, I need to change  Attb 2  from A]thisbad]C]D   to be
A]thisgood]C]D  on a list of items...

So I get the list, AE FILENAME and then...

=FIX 2`R/thisbad/thisgood/`FI`=FIX

Viola!  The data is updated.

I have a need to 'fix' a KEY to a record...

Is there a way to use a PreStore command that could do that? It's 95
records. Too many to hand edit. Too few to write a program. A PreStore
would be JUST RIGHT... if there was a way to do it!

DW

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to