Wendy Smoak wrote on: Thu, 22 Jul 2004 17:26:59 -0700

> It seems that CNAME is not a popular UniBasic command.  Is there
> some history here I'm not aware of, maybe it was unreliable?
>
> From a UniBasic program, why would you open a file, read a record,
> write it back to the same file under a different key, then delete
> the original record, when you could just:
>
>   X.CMD = "CNAME filename ":X.ID:',':X.NEW.ID
>   EXECUTE X.CMD

Two reasons for me:

1) I learned MV under Pick, where CNAME wasn't available.  As previously
stated, you had to use the COPY command (with the "(D" option) and DATA the
destination.  I've only been using UniData for about 3 years under SB+, so
I'm still learning some of the "non-Pick" syntax options.

2) Crash safety net :->  If the system were to crash during the CNAME
operation, I wouldn't know for certain where the record was, and it could
be completely lost.  If it crashed during the WRITE/DELETE sequence, I
would either have just the original, just the new, or possibly both.

--Tom Pellitieri
  Century Equipment
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to