You can't 'swap'. What you can do is save it as a new name and delete the old 
record.

If you are doing this on a live system as part of production support (hopefully 
development isn't been done there), make sure you understand how code is using 
that file and lock as appropriate, otherwise you might have it double process 
the same record under different names.

This probably isn't something you can do as a regular PreStore.

Regards,

Dan McGrath
Managing Director, U2 Servers Lab
Rocket Software



-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of David Wolverton 
Sent: Tuesday, May 28, 2013 12:11 PM
To: 'U2 Users List'
Subject: Re: [U2] UniData PreStore to change the KEY of a record?

But how would I 'swap out' the bad piece?

For example - -the key is currently  bad.1234  and I want it to be good.1234

How would I perform that 'replace' on the ID for the record?

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Colin Alfke
Sent: Tuesday, May 28, 2013 1:04 PM
To: 'U2 Users List'
Subject: Re: [U2] UniData PreStore to change the KEY of a record?

Sure, you should be able to write the record with the new key and then delete 
the existing record. The trouble comes in making sure another record doesn't 
already exist with the new key.

Hth
Colin

-----Original Message-----
From: David Wolverton
Sent: Tuesday, May 28, 2013 11: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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to