[U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Boydell, Stuart
Just wondering if anyone has a neat trick for picking up the highest ID from a 
file. Where the file ID is an integer.

With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need to 
do this within has the file (table) open and if I try to execute it returns the 
error 'Non-SQL re-entrant query calls are not allowed.'

The best I have so far is:
   st = 'SELECT FILE @ID BY.DSND @ID'
   st-1 = 'LIST ONLY FILE SAMPLE 1'
   exec st capturing cap
   maxId = trim(cap4)

Any other ideas?

Cheers,
Stuart




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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Brian Leach
Stuart

You're stuck with something like that, unless you know that all the possible
ids are present in the file. If so, you could use a form of binary search
pattern could find it quickly.

i.e.

start with a likely number and see if the id is there.
(filesize / recordsize)

If it is, double it.
If it is not, reduce it by half the difference to the previous number and
try that.

If that is found, increase by half the difference.
If not, reduce by half the difference again.

And so on.
 
If you follow the maths, it can scan wide ranges very quickly indeed.. just
like a binary sort algorithm.

And may be quicker than calling out to sort the entire file.

But it only works if there are no gaps in the numbering.

Brian

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Boydell, Stuart
Sent: 27 May 2011 07:03
To: U2 Users List
Subject: [U2] [UV] Emulate SQL MAX() function at TCL

Just wondering if anyone has a neat trick for picking up the highest ID from
a file. Where the file ID is an integer.

With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need
to do this within has the file (table) open and if I try to execute it
returns the error 'Non-SQL re-entrant query calls are not allowed.'

The best I have so far is:
   st = 'SELECT FILE @ID BY.DSND @ID'
   st-1 = 'LIST ONLY FILE SAMPLE 1'
   exec st capturing cap
   maxId = trim(cap4)

Any other ideas?

Cheers,
Stuart




___
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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Hona, David
Hi Stuart,

Probably too late now... but...

If you defined your SQL table with the DEFAULT NEXT AVAILABLE it will 
automatically increment the primary key value by 1 when you insert a new row...

CREATE TABLE MYTABLE
(CLIENT_NUMBER INT PRIMARY DEFAULT 'NEXT AVAILABLE',
CLIENT_NAME VARCHAR FMT 30T DEFAULT '',
CREATE_ADDRESS VARCHAR FMT 30T DEFAULT ''
...

See UniVerse SQL Reference Guide sqlref.pdf page 113 (UV11.1 docset).


Regards,
David



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Boydell, Stuart
Sent: Friday, 27 May 2011 4:04 PM
To: U2 Users List
Subject: [U2] [UV] Emulate SQL MAX() function at TCL

Just wondering if anyone has a neat trick for picking up the highest ID from a 
file. Where the file ID is an integer.

With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need to 
do this within has the file (table) open and if I try to execute it returns the 
error 'Non-SQL re-entrant query calls are not allowed.'

The best I have so far is:
   st = 'SELECT FILE @ID BY.DSND @ID'
   st-1 = 'LIST ONLY FILE SAMPLE 1'
   exec st capturing cap
   maxId = trim(cap4)

Any other ideas?

Cheers,
Stuart




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

** IMPORTANT MESSAGE *   
This e-mail message is intended only for the addressee(s) and contains 
information which may be
confidential. 
If you are not the intended recipient please advise the sender by return email, 
do not use or
disclose the contents, and delete the message and any attachments from your 
system. Unless
specifically indicated, this email does not constitute formal advice or 
commitment by the sender
or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. 
We can be contacted through our web site: commbank.com.au. 
If you no longer wish to receive commercial electronic messages from us, please 
reply to this
e-mail by typing Unsubscribe in the subject line. 
**



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


Re: [U2] 2

2011-05-27 Thread Ron Hutchings
..I can give you a good advice: visit this drugstore and your problem will be 
solved.  http://ecole2jauche.be/page.php?oyahoo=76eb3
  
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Wols Lists
On 27/05/11 07:03, Boydell, Stuart wrote:
 Just wondering if anyone has a neat trick for picking up the highest ID from 
 a file. Where the file ID is an integer.
 
 With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need 
 to do this within has the file (table) open and if I try to execute it 
 returns the error 'Non-SQL re-entrant query calls are not allowed.'
 
 The best I have so far is:
st = 'SELECT FILE @ID BY.DSND @ID'
st-1 = 'LIST ONLY FILE SAMPLE 1'
exec st capturing cap
maxId = trim(cap4)
 
 Any other ideas?
 
Extending your idea ...

SELECT FILE @ID BY.DSND @ID SAMPLE 1
READLIST

Not quite sure whether SAMPLE is the correct keyword, because I think
one keyword samples then sorts (that might be SAMPLING), but I'm sure
there is one that sorts then samples.

If you can't find the keyword, the other trick could be

SELECT FILE @ID BY.DSND @ID
READNEXT
CLEARLIST

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Rex Gozar
You could try:

SELECT FILE
READLIST IDS ELSE ABORT
MAX.ID = MAXIMUM(IDS)

rex

On Fri, May 27, 2011 at 6:40 AM, Wols Lists antli...@youngman.org.uk wrote:
 On 27/05/11 07:03, Boydell, Stuart wrote:
 Just wondering if anyone has a neat trick for picking up the highest ID from 
 a file. Where the file ID is an integer.

 With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need 
 to do this within has the file (table) open and if I try to execute it 
 returns the error 'Non-SQL re-entrant query calls are not allowed.'
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Charles Stevenson
I am going to assume we are talking about a HUGE file, otherwise 
efficiency wouldn't much matter.


I don't know a GOOD way outside basic or sql to prevent a sort-selected 
list from being created.   For humongous files, that may be painful.


Here is a way,  not a GOOD way, just a way.  I just can't help myself:

1. Use an I-descriptor to compare last max to current id and set new max 
if necessary.
2. Use REFORMAT to continually overwrite the  same record with the newly 
found max.


   (737 is the biggest id in this example):

CLEAR.FILE TINYWORK
   File TINYWORK has been cleared.
REFORMAT BIGDATA EVAL 'BIGDATA.MAXID' EVAL @2; IF @1  @ID THEN
   @1 ELSE @ID
   BIGDATA.MAXID
   @2 ; IF @1  @ID THEN @1 ELSE @ID
   File Name = TINYWORK
CT TINYWORK BIGDATA.MAXID

 BIGDATA.MAXID
   0001 737

DISPLAY  -- or if you prefer F(TINYWORK,BIGDATA.MAXID,1)
 -- or if you prefer  737


QED
(That's Latin for Quirky Example Demonstrated)

A related I-desc could be used as REFORMAT selection criteria to limit 
the writes to only when the max changes.  On average, that would halve 
the writes.


A huge sort-select is going to be writing to uvtemp anyway, but I'd bet 
your money it will be faster than the above.

__

If you're going to do it inside basic, like some others have suggested,
you might as well try this to avoid creating a sorted select list in 
memory / uvtemp:


   SELECT FVAR
   MAXID = 
   LOOP WHILE READNEXT ID
   IF ID  MAXID THEN MAXID = ID
   REPEAT

But test to see if it is a good idea.
I'm continually surprised by RetrieVe's efficiency compared to what I 
can do in Basic.








On 5/27/2011 5:40 AM, Wols Lists wrote:

On 27/05/11 07:03, Boydell, Stuart wrote:

Just wondering if anyone has a neat trick for picking up the highest ID from a 
file. Where the file ID is an integer.

With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need to 
do this within has the file (table) open and if I try to execute it returns the 
error 'Non-SQL re-entrant query calls are not allowed.'

The best I have so far is:
st = 'SELECT FILE @ID BY.DSND @ID'
st-1  = 'LIST ONLY FILE SAMPLE 1'
exec st capturing cap
maxId = trim(cap4)

Any other ideas?


Extending your idea ...

SELECT FILE @ID BY.DSND @ID SAMPLE 1
READLIST

Not quite sure whether SAMPLE is the correct keyword, because I think
one keyword samples then sorts (that might be SAMPLING), but I'm sure
there is one that sorts then samples.

If you can't find the keyword, the other trick could be

SELECT FILE @ID BY.DSND @ID
READNEXT
CLEARLIST


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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Israel, John R.
How about this:
Keep a control record that has the last value so you know where it was last 
time.

READ REC FROM F.CONTROL, LAST.TEST ELSE
REC = 0
REC2 = 1000
END

LAST.TEST = REC1  ;* last hit
INCREMENT = REC2  ;* how much to jump w/ each test
TEST.ID   = LAST.TEST
LAST.FOUND= LAST.TEST

DONE = @FALSE
LOOP
WHILE DONE = @FALSE
TEST.ID += INCREMENT
READV ZED FROM F.FILE, TEST.ID, 0 THEN
* id found, do another default increment
LAST.FOUND = NEXT.TEST
END ELSE
* id NOT found, so it must be between LAST.FOUND  NEXT.TEST
NEXT.TEST += INCREMENT  ;* ensure someone does not exceed the 
limit as you are testing
FOR XX1 = LAST.FOUND TO NEXT.TEST
READV ZED FROM F.FILE, XX1, 0 ELSE
HIGHEST.ID = XX1 -1
DONE = @TRUE
XX1  = NEXT.TEST;* kill the loop
END
NEXT XX1
END
REPEAT
WRITEV HIGHEST.ID ON F.CONTROL, LAST.TEST, 1


Obviously, you need to know your file and know how big it grows to determine 
REC2.




John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Friday, May 27, 2011 9:33 AM
To: U2 Users List
Subject: Re: [U2] [UV] Emulate SQL MAX() function at TCL

I am going to assume we are talking about a HUGE file, otherwise 
efficiency wouldn't much matter.

I don't know a GOOD way outside basic or sql to prevent a sort-selected 
list from being created.   For humongous files, that may be painful.

Here is a way,  not a GOOD way, just a way.  I just can't help myself:

1. Use an I-descriptor to compare last max to current id and set new max 
if necessary.
2. Use REFORMAT to continually overwrite the  same record with the newly 
found max.

(737 is the biggest id in this example):

 CLEAR.FILE TINYWORK
File TINYWORK has been cleared.
 REFORMAT BIGDATA EVAL 'BIGDATA.MAXID' EVAL @2; IF @1  @ID THEN
@1 ELSE @ID
BIGDATA.MAXID
@2 ; IF @1  @ID THEN @1 ELSE @ID
File Name = TINYWORK
 CT TINYWORK BIGDATA.MAXID

  BIGDATA.MAXID
0001 737
 
 DISPLAY  -- or if you prefer F(TINYWORK,BIGDATA.MAXID,1)
  -- or if you prefer  737
 

QED
(That's Latin for Quirky Example Demonstrated)

A related I-desc could be used as REFORMAT selection criteria to limit 
the writes to only when the max changes.  On average, that would halve 
the writes.

A huge sort-select is going to be writing to uvtemp anyway, but I'd bet 
your money it will be faster than the above.
__

If you're going to do it inside basic, like some others have suggested,
you might as well try this to avoid creating a sorted select list in 
memory / uvtemp:

SELECT FVAR
MAXID = 
LOOP WHILE READNEXT ID
IF ID  MAXID THEN MAXID = ID
REPEAT

But test to see if it is a good idea.
I'm continually surprised by RetrieVe's efficiency compared to what I 
can do in Basic.







On 5/27/2011 5:40 AM, Wols Lists wrote:
 On 27/05/11 07:03, Boydell, Stuart wrote:
 Just wondering if anyone has a neat trick for picking up the highest ID from 
 a file. Where the file ID is an integer.

 With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need 
 to do this within has the file (table) open and if I try to execute it 
 returns the error 'Non-SQL re-entrant query calls are not allowed.'

 The best I have so far is:
 st = 'SELECT FILE @ID BY.DSND @ID'
 st-1  = 'LIST ONLY FILE SAMPLE 1'
 exec st capturing cap
 maxId = trim(cap4)

 Any other ideas?

 Extending your idea ...

 SELECT FILE @ID BY.DSND @ID SAMPLE 1
 READLIST

 Not quite sure whether SAMPLE is the correct keyword, because I think
 one keyword samples then sorts (that might be SAMPLING), but I'm sure
 there is one that sorts then samples.

 If you can't find the keyword, the other trick could be

 SELECT FILE @ID BY.DSND @ID
 READNEXT
 CLEARLIST

___
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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread David A. Green
What comes to mind are these:

1. Have a the system write the Max key somewhere.
2. Create a Trigger that keeps a max key updated.
3. Create an Index then use a SUBR to access the Max Key.
4. If this statement is used a lot then every time you run it update your
own Max Key and start looking from that point.

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 Boydell, Stuart
Sent: Thursday, May 26, 2011 11:04 PM
To: U2 Users List
Subject: [U2] [UV] Emulate SQL MAX() function at TCL

Just wondering if anyone has a neat trick for picking up the highest ID from
a file. Where the file ID is an integer.

With UVSQL I would SELECT MAX(@ID) FROM TABLE; - however, the program I need
to do this within has the file (table) open and if I try to execute it
returns the error 'Non-SQL re-entrant query calls are not allowed.'

The best I have so far is:
   st = 'SELECT FILE @ID BY.DSND @ID'
   st-1 = 'LIST ONLY FILE SAMPLE 1'
   exec st capturing cap
   maxId = trim(cap4)

Any other ideas?

Cheers,
Stuart




___
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


Re: [U2] 2

2011-05-27 Thread Larry Hiscock
Your computer appears to be compromised.  I have temporarily unsubscribed
you from the U2 Users list.  Once you have corrected your infection, you can
resubscribe at http://listserver.u2ug.org.

Larry Hiscock
Moderator


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ron Hutchings
Sent: Friday, May 27, 2011 2:58 AM
To: scott_hutchi...@baylor.edu; scott220...@hotmail.com;
scrump...@sbcglobal.net; skiph...@dfwair.net; u2-users@listserver.u2ug.org
Subject: Re: [U2] 2

..I can give you a good advice: visit this drugstore and your problem will
be solved.  http://ecole2jauche.be/page.php?oyahoo=76eb3
  
___
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


Re: [U2] 2

2011-05-27 Thread Bob Woodward
Who are you directing this to, Larry?

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: Friday, May 27, 2011 7:16 AM
To: 'U2 Users List'
Subject: Re: [U2] 2

Your computer appears to be compromised.  I have temporarily
unsubscribed
you from the U2 Users list.  Once you have corrected your infection, you
can
resubscribe at http://listserver.u2ug.org.

Larry Hiscock
Moderator


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ron Hutchings
Sent: Friday, May 27, 2011 2:58 AM
To: scott_hutchi...@baylor.edu; scott220...@hotmail.com;
scrump...@sbcglobal.net; skiph...@dfwair.net;
u2-users@listserver.u2ug.org
Subject: Re: [U2] 2

..I can give you a good advice: visit this drugstore and your problem
will
be solved.  http://ecole2jauche.be/page.php?oyahoo=76eb3
  
___
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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Wols Lists
On 27/05/11 14:33, Charles Stevenson wrote:
 I am going to assume we are talking about a HUGE file, otherwise
 efficiency wouldn't much matter.
 
 I don't know a GOOD way outside basic or sql to prevent a sort-selected
 list from being created.   For humongous files, that may be painful.

Hmmm...

Assuming a huge file, as you suggest, create an index on @ID!

Indexes are always sorted, aren't they?

So either make it sort downwards or, if it's numeric, index on nought
minus id :-)

Then you can just

SELECTINDEX
READNEXT
CLEARLIST

All done!

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] 2

2011-05-27 Thread Wols Lists
On 27/05/11 15:15, Larry Hiscock wrote:
 Your computer appears to be compromised.  I have temporarily unsubscribed
 you from the U2 Users list.  Once you have corrected your infection, you can
 resubscribe at http://listserver.u2ug.org.
 
 Larry Hiscock
 Moderator
 
I'm always wary that these emails come from a compromised PC. I notice
it's a hotmail address ... :-)

It wouldn't surprise me if his hotmail account was compromised, and it
also wouldn't surprise me if changing his password has no effect.

Certainly I've been subject to persistent spam from friends, who can
find no trace of infection on their computer ...

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] 2

2011-05-27 Thread Larry Hiscock
Mea culpa.  I hit reply and didn't change TO: address.  I have sent a
separate email privately to Ron.

Larry Hiscock
Moderator


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bob Woodward
Sent: Friday, May 27, 2011 8:26 AM
To: U2 Users List
Subject: Re: [U2] 2

Who are you directing this to, Larry?

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock
Sent: Friday, May 27, 2011 7:16 AM
To: 'U2 Users List'
Subject: Re: [U2] 2

Your computer appears to be compromised.  I have temporarily
unsubscribed
you from the U2 Users list.  Once you have corrected your infection, you
can
resubscribe at http://listserver.u2ug.org.

Larry Hiscock
Moderator


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Ron Hutchings
Sent: Friday, May 27, 2011 2:58 AM
To: scott_hutchi...@baylor.edu; scott220...@hotmail.com;
scrump...@sbcglobal.net; skiph...@dfwair.net;
u2-users@listserver.u2ug.org
Subject: Re: [U2] 2

..I can give you a good advice: visit this drugstore and your problem
will
be solved.  http://ecole2jauche.be/page.php?oyahoo=76eb3
  
___
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] uv 2 ud

2011-05-27 Thread Symeon Breen
Here is a strange one - i have a friend with a uv system that he cannot
maintain - so he has asked me to do this. It needs transferring to a new
machine and some changes making and maintained over the coming years.
However my team has worked exclusively in ud for 10 years, so uv is rather
rusty to say the least, and would not fit with our existing portfolio- what
would people recommend, stick with it on uv and hopefully not make too many
mistakes and try to learn fast, or convert the app to run on ud ?  His uv
livence is long out of maintenance so there is no financial reason to stick
with uv.

 

 

Thanks

 

Symeon.

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


Re: [U2] uv 2 ud

2011-05-27 Thread Israel, John R.
As long as the customer has no preference, and there are not a bunch of funky 
things that only work with UV, I would go with what you know.  Completing the 
project SHOULD be quicker and thus cheaper.  Maintenance would also be quicker 
and cheaper.

But that is just the 10,000 foot view/opinion.


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342


-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
Sent: Friday, May 27, 2011 11:47 AM
To: 'U2 Users List'
Subject: [U2] uv 2 ud

Here is a strange one - i have a friend with a uv system that he cannot
maintain - so he has asked me to do this. It needs transferring to a new
machine and some changes making and maintained over the coming years.
However my team has worked exclusively in ud for 10 years, so uv is rather
rusty to say the least, and would not fit with our existing portfolio- what
would people recommend, stick with it on uv and hopefully not make too many
mistakes and try to learn fast, or convert the app to run on ud ?  His uv
livence is long out of maintenance so there is no financial reason to stick
with uv.

 

 

Thanks

 

Symeon.

___
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


Re: [U2] uv 2 ud

2011-05-27 Thread John Thompson
You better check to see if the customer has any Pick type dictionaries
or correlatives (ala A,F's etc.).  Universe DOES support these.  I
thought Unidata did NOT.  That will probably be one of your biggest
obstacles in converting them.

On 5/27/11, Israel, John R. johnisr...@daytonsuperior.com wrote:
 As long as the customer has no preference, and there are not a bunch of
 funky things that only work with UV, I would go with what you know.
 Completing the project SHOULD be quicker and thus cheaper.  Maintenance
 would also be quicker and cheaper.

 But that is just the 10,000 foot view/opinion.


 John Israel
 Senior Programmer/Analyst
 Dayton Superior Corporation
 1125 Byers Road
 Miamisburg, OH  45342


 -Original Message-
 From: u2-users-boun...@listserver.u2ug.org
 [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Symeon Breen
 Sent: Friday, May 27, 2011 11:47 AM
 To: 'U2 Users List'
 Subject: [U2] uv 2 ud

 Here is a strange one - i have a friend with a uv system that he cannot
 maintain - so he has asked me to do this. It needs transferring to a new
 machine and some changes making and maintained over the coming years.
 However my team has worked exclusively in ud for 10 years, so uv is rather
 rusty to say the least, and would not fit with our existing portfolio- what
 would people recommend, stick with it on uv and hopefully not make too many
 mistakes and try to learn fast, or convert the app to run on ud ?  His uv
 livence is long out of maintenance so there is no financial reason to stick
 with uv.





 Thanks



 Symeon.

 ___
 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


-- 
Sent from my mobile device

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


Re: [U2] uv 2 ud

2011-05-27 Thread Wols Lists
On 27/05/11 16:53, Israel, John R. wrote:
 As long as the customer has no preference, and there are not a bunch of funky 
 things that only work with UV, I would go with what you know.  Completing the 
 project SHOULD be quicker and thus cheaper.  Maintenance would also be 
 quicker and cheaper.
 
 But that is just the 10,000 foot view/opinion.

Actually, providing the underlying architecture is unchanged, completing
the project should be very quick by sticking with UV.

Can you get hold of a temporary licence?

Assuming it's on x86, copying accounts between widely different systems
is a doddle (I've done it between SCO, linux and Windows), and I'd guess
it's the same for others.

Even if you're going from an old SCO system to a new 2008 system, I'd be
inclined as a first attempt to copy the IBM directory and the account
across, re-install UV over the old system, and see if it works.
There's a good chance it will ...

Are you in the uk? Contact me off-line and we can discuss it...

Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] uv 2 ud

2011-05-27 Thread fft2001
+1 Convert.
 


Here is a strange one - i have a friend with a uv system that he cannot
maintain - so he has asked me to do this. It needs transferring to a new
machine and some changes making and maintained over the coming years.
However my team has worked exclusively in ud for 10 years, so uv is rather
rusty to say the least, and would not fit with our existing portfolio- what
would people recommend, stick with it on uv and hopefully not make too many
mistakes and try to learn fast, or convert the app to run on ud ?  His uv
livence is long out of maintenance so there is no financial reason to stick
with uv.

 

 


 

 

-Original Message-
From: Symeon Breen syme...@gmail.com
To: 'U2 Users List' u2-users@listserver.u2ug.org
Sent: Fri, May 27, 2011 8:47 am
Subject: [U2] uv 2 ud


Here is a strange one - i have a friend with a uv system that he cannot
maintain - so he has asked me to do this. It needs transferring to a new
machine and some changes making and maintained over the coming years.
However my team has worked exclusively in ud for 10 years, so uv is rather
rusty to say the least, and would not fit with our existing portfolio- what
would people recommend, stick with it on uv and hopefully not make too many
mistakes and try to learn fast, or convert the app to run on ud ?  His uv
livence is long out of maintenance so there is no financial reason to stick
with uv.

 

 

Thanks

 

Symeon.

___
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


Re: [U2] Uniquery

2011-05-27 Thread Greg Coelho
U2 Users!

I am trying to pass in arguments into a UniQuery form using JSPARAMS. This 
works fine when I working with a SELECT LIST:

V.JS.VAR1 = Smith
 PROCEDURE LINE SELECT PERSON WITH LAST.NAME EQ :V.JS.VAR1

But when I try to pass this into a literal statement such as a HEADER - 
things go haywire (process goes into a loop)

X.LIST.STMT:= \HEADER AR Invoices with customer last name :V.JS.VAR1: 
and customer first name John.\

Does anyone have any clues as to what I should be looking for - 
UDT.OPTIONS, HEADING settings?  Also, when I pass in a V.JS.DATE.VAR to 
the HEADER I get the internal date regardless how I try to format it.  Any 
insight would be greatly appreciated.

Thanks,

Greg

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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Charles Stevenson

That's the best answer yet, Wol.

Assuming there's no Next-Sequential-Id counter to poll.

 assuming a large file, and an ongoing need. (If not, who cares?)

 assuming normal writes to the file aren't so frequent that maintaining 
the extra index -- albeit ever so evenly distributed -- isn't too taxing 
compared to the occasionally need for that max.


Probably reasonable assumptions, all.

cds

On 5/27/2011 10:34 AM, Wols Lists wrote:

On 27/05/11 14:33, Charles Stevenson wrote:

I am going to assume we are talking about a HUGE file, otherwise efficiency 
wouldn't much matter.

I don't know a GOOD way outside basic or sql to prevent a sort-selected list 
from being created.   For humongous files, that may be painful.

Hmmm...

Assuming a huge file, as you suggest, create an index on @ID!

Indexes are always sorted, aren't they?

So either make it sort downwards or, if it's numeric, index on nought minus 
id :-)

Then you can just

SELECTINDEX
READNEXT
CLEARLIST

All done!

Cheers,
Wol

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


Re: [U2] [UV] Emulate SQL MAX() function at TCL

2011-05-27 Thread Boydell, Stuart
:)
Thanks all

-Original Message-
From: Wols Lists
Sent: Saturday, 28 May 2011 1:34
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Emulate SQL MAX() function at TCL


On 27/05/11 14:33, Charles Stevenson wrote:
 I am going to assume we are talking about a HUGE file, otherwise
 efficiency wouldn't much matter.

 I don't know a GOOD way outside basic or sql to prevent a sort-selected
 list from being created.   For humongous files, that may be painful.

Hmmm...

Assuming a huge file, as you suggest, create an index on @ID!

Indexes are always sorted, aren't they?

So either make it sort downwards or, if it's numeric, index on nought
minus id :-)

Then you can just

SELECTINDEX
READNEXT
CLEARLIST

All done!

Cheers,
Wol
___
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