[U2] Perfomance of REC.ID = ID.LIST[@VM, 1, 1] vs REC.ID = ID.LIST1, 1

2012-11-22 Thread Marco Manyevere
I have a large dynamic array ID.LIST. 99% of it is made 
of ID.LIST1 which itself is multi valued. I need to extract only ID.LIST1, 
1. Im just wondering if the technical implementation of REC.ID = ID.LIST1, 1 
results in an unnecessary scan of almost the entire array looking for @FM to 
delimit the first field then a second scan to delimit by @VM or am I better off 
using the FIELD operator ID.LIST[@VM, 1, 1] in this case.
 
Marco.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] trimming a list (a test of your ability)

2012-07-13 Thread Marco Manyevere
You must do WHILE MORE:NEXT.ID or WHILE NEXT.ID:MORE otherwise the last 
NEXT.ID will not be processed

 


 From: dennis bartlett dqbartl...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org 
Sent: Friday, 13 July 2012, 7:09
Subject: Re: [U2] trimming a list (a test of your ability)
  
Hi Steven

The REMOVE statement process a multivalued list. The SETTING clause will
set the variable to either 3, or 2, or 1, or 0 depending on the value of
the delimiter last encountered...
   1 for @FM
   2 for @VM
   3 for @SM
   0 for End Of String

If the array consists only of @FM, then MORE will be set to 1 for each
iteration (since the delimiter it is encountering each time is an @FM) and
then, when the last element is read, MORE will be set to ZERO, and the
WHILE MORE will fail, thus the loop is exited.


If FM.ARRAY is empty, MORE will return as 0 and the loop will exit, but
you're right - the WHILE MORE line should be one line higher..

    UNIQ.LIST = ''
    LOOP
        REMOVE NEXT.ID http://next.id/ FROM FM.ARRAY SETTING MORE
    WHILE MORE
        LOCATE(NEXT.ID http://next.id/,UNIQ.LIST,1;POS) ELSE
UNIQ.LIST-1 = NEXT.ID http://next.id/
    REPEAT

the WHILE statement is in effect a while it is not zero and the second it
becomes a zero, the loop exits.
___
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] Changing lower case keywords to UPPER CASE

2010-01-31 Thread Marco Manyevere
I need to change all keywords in some UV BASIC programs to upper case. Global 
search and replace wont do because I should not change the keywords if they 
appear inside quotted strings or comments. Some of the programs are really 
looong. Does anyone have a better idea how to do this?
 
Kind regards, Marco. 


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


[U2] INFO BASIC BNF Spec

2009-08-05 Thread Marco Manyevere

Can anyone please help me with the full BNF spec for the structure of an INFO 
BASIC program?
 
Thanks for any help, Marco.


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


Re: [U2] INFO BASIC BNF Spec

2009-08-05 Thread Marco Manyevere

The reason I want the BNF description is that I want to _attempt_ a java lexer 
and parser that will trace the execution flow of a given subroutine and emit 
some documentation fragments that I can then use to make a flow chart. I am 
particulary interested in documenting all the logical evaluations that occur at 
IF...THEN,  CASE, LOCATE ... THEN,  WHILE, UNTIL, etc that lead to certain 
database actions. I want to be able to say for example for field X of file Y to 
be update in routine ABC conditions 1 2 3 should have been met.



- Original Message 
From: Martin Phillips martinphill...@ladybridge.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Wednesday, 5 August, 2009 10:02:01
Subject: Re: [U2] INFO BASIC BNF Spec

Hi Marco,

 Can anyone please help me with the full BNF spec for the structure
 of an INFO BASIC program?

I have never seen the language described in BNF. Perhaps one reason is that is 
is ambiguous in a few places. The most obvious example is
  A = BC + 1
where the   could be field expression delimiters or could be relational 
operators.

Out of interest, why are you looking for a BNF definition?


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
___
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] General guidelines on indexing

2009-07-09 Thread Marco Manyevere

On my DualCore WindowsXP laptop with 3GB ram @2.16GHZ, (UV 10.0.04):

The dynamic array test took 30 minutes.

I compiled the same program on jBASE 4.1 on the same laptop and it completed in 
0 seconds! I had to print LEN(S) before and after to confirm that the program 
was indeed running!




- Original Message 
From: David Ward damad...@comcast.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thursday, 9 July, 2009 16:24:17
Subject: Re: [U2] General guidelines on indexing

Original test and a couple of other variations. We use the DIM approach in
several cases where variable data is large and temporary.


Test system run on
WindowsXP
Single DuoCore @2.20ghz
2GB Ram

Original version - -1 variable append
Elapsed Time 00:25:04

Altered version - Using WRITESEQ - Same System
1.203 seconds

Altered version - Using DIM Variable - Same System
0.172 seconds


___
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] General guidelines on indexing

2009-07-08 Thread Marco Manyevere

In one test I did a couple of months back, I found that appending IDs to the 
end of a dynamic array perfomed _much_ _much_ slower than a WRITESEQ to the end 
of a disk file and the dynamic array wasnt even a 100 000 records long. We were 
able to reduce the time required to produce a report from over 30 minutes to 
less than 2 minutes by removing the dynamic array operations and replacing them 
with WRITESEQs. We tried all the different syntaxes of appending to the array 
with no noticeable difference in poor performance once the array got large.



- Original Message 
From: Baakkonen, Rodney A (Rod) 46K rodney.baakko...@cigna.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Wednesday, 8 July, 2009 17:15:57
Subject: Re: [U2] General guidelines on indexing

In theory, I would have to agree with you.  Who knows how all this stuff
really works under the hood. You have Unidata Shared memory management
and shared basic code server. We also have a huge SAN with a lots of
cache. Measuring performance and impacting it is different these days.
There are so many layers  and events, finding the bottleneck can be
tricky.

All I can tell you is that we did extensive testing and we would not be
doing what we are unless it worked. Maybe on you site, on your server
and your database, these techniques don't enhance performance. I'm
telling you what we found, your mileage may vary.

We have been told to use concatenate with a @AM to build our arrays, as
Unidata has a pointer to the end of a variable. We have been told to use
REMOVE when pulling data out of the array. We know that. We still had
performance gains that went from days to hours when we changed to a well
sized work file.

There are many reasons why we use the work file. Typically this is used
in the selection part of the process. The sorting and reporting is
after. Sometimes the work file contains more than keys ( vs. having
multiple dynamic arrays). Sometimes multiple reports are generated from
the same work file.  

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Edward Brown
Sent: Wednesday, July 08, 2009 6:47 AM
To: U2 Users List
Subject: Re: [U2] General guidelines on indexing

I don't agree. Disk access is inherently slower than RAM access.
Therefore a process that makes efficient use of RAM will be faster than
an equivalent algorithm making efficient use of disk.

In your case, it's just a matter of scale:

50 million records at (lets say) 14 bytes per ID plus the multivalue
marker needed to build up the dynamic array.

15 * 50,000,000 = 750,000,000 bytes.

That's 732,422KB,  715MB

If your process is running on a modern server then this kind of op
becomes practical.

Assumptions:
- that the dynamic array isn't using Unicode. If it is then memory
reqirements double.
- That you select every record - normally (presumably) it would be just
a fraction?


In fact isn't all of this theoretical? Using the index select / readfwd
/ own tests method, there's no need to build workfiles or dynamic arrays
at all - simply do the tests as each record is retrieved with readfwd
and then create the report / do the processing all within the same loop?

Ed



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baakkonen,
Rodney A (Rod) 46K
Sent: 08 July 2009 12:30
To: U2 Users List
Subject: Re: [U2] General guidelines on indexing


When you have a  file with 50 million records, it does not matter how
you build the or parse the dynamic array. A well sized work file will
run circles around the dynamic array. 



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Edward Brown
Sent: Wednesday, July 08, 2009 6:12 AM
To: U2 Users List
Subject: Re: [U2] General guidelines on indexing

 After indexing, we made a lot more use of the SETINDEX and READFWD
logic
in our programs. 

I find this curious / disappointing - is it really the case that unidata
can't take the mix of indexed / unindexed dictionary items and do just
as efficient a job as the code you're writing?

Also, the performance of dynamic arrays need not be as much an issue as
you've found. If they're built up with -1 rather than a counter then the
speed penalty of adding items to a very large list is much the same as a
tiny one. Then, when you loop through them for further processing use
the REMOVE (or FORMLIST) command rather than a counter.

The only real issue with dynamic arrays is if the machine does not have
the physical memory available to hold the variable.

Ed


---
Please remember to recycle wherever possible. Reduce, reuse, recycle,
think do you need to print this e-mail?

---
This e-mail 

[U2] UV BASIC Flowing Charting Tools

2009-05-25 Thread Marco Manyevere
Does anyone have a good recommendation for Universe BASIC source code flow 
charting software to aid with analysis and documentation of existing code?
 
Thanks for any help, Marco.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] How to 'transfer' a READU lock to another process/port

2009-05-04 Thread Marco Manyevere
The solution I have for a certain problem could easily be solved without 
redesigning large portions of the existing code if I could implement an 
algorithm to have process1 release a READU lock and have process2 acquire that 
lock ahead of all other processes that may be interested in the same lock. Does 
anyone have an idea how I could do this in UV?
 
Kind regards, Marco.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Guaranteed unique sequential keys

2008-04-25 Thread Marco Manyevere
   Thank you all for all the responses.

   I was hoping that somewhere within the operating system's scheduling
   mechanism there is something like a timeslice serial number which could be
   read with some system function. No 2 processes could ever return the same
   timeslice serial number within a day for example. My unique id would then be
   formed as follows:

   snip

   BASEKEY = DATE():*:time slice serial number
   IF BASEKEY EQ PREVBASEKEY THEN
  SEQ.NUM += 1
   ELSE
  PREVBASEKEY = BASEKEY
  SEQ.NUM = 1
   END

   UNIQUE.KEY = BASEKEY:*:SEQ.NUM

   /snip

   This way there would be no need for extra IOs and no bottlenecks on a
   syncronisation key.

   --- On Fri, 25/4/08, Glen B [EMAIL PROTECTED] wrote:

 From: Glen B [EMAIL PROTECTED]
 Subject: RE: [U2] Guaranteed unique sequential keys
 To: u2-users@listserver.u2ug.org
 Date: Friday, 25 April, 2008, 5:30 AM
You'll need a central key generator to manage high
resolution sortable
sequential keys. You can use whatever connection medium is feasible and let
a single process/phantom generate the keys in numerical order. The problem
with using a key generator like this is that you could easily produce a
bottleneck. On the other hand, the benefit of doing it this way is that the
generator can be a single phantom. It can keep track of the last used key in
memory and can pregenerate keys for near-future or parallel usage. If the
connection medium you choose allows for multiple requests at a time, then
your management code must be able to manage and pregenerate keys for each
thread concurrently. A wide solution could be a socket service that
serves
unique keys to clients. I use base-16 for a lot of sequential keys so that I
have many unique iterations per key length. I always use them as direct
pointers and I never sort them, though. Hex sortability from
LIST/SORT/SELECT could be questionable.

Glen

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Marco Manyevere
 Sent: Thursday, April 24, 2008 5:55 AM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] Guaranteed unique sequential keys


 What is the most reliable way to generate unique sequential keys without
 having to resort to a record on disk updated through readu/write? The
keys
 don't have to be contiguous but only be sortable in the order in
 which they
 were generated by several phantom processes running concurrently. I'm
 currently approximating this using a concatenation of date and time with
 millisecondsB but I'm worried about the possibility of two
 phantoms generating
 exactly the same key.
 B
 Although no collision has been detected so far, I
 have added an extra check where after generating the key I first test if
a
 record with that key exists. If so IB increment and append aB
 serial number
 and repeat the test until aB unique key is found. ItB seems to be
 working well
 but I still think there is a better way to do this.
 B
 Thanks for any help.
 B
 Marco.


   __
 Sent
 from Yahoo! Mail.
 A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
   http://listserver.u2ug.org/
 _

   Yahoo! For Good. Give and get cool things for free, reduce waste and help
   our planet. Plus find hidden Yahoo! treasure
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Guaranteed unique sequential keys

2008-04-24 Thread Marco Manyevere
What is the most reliable way to generate unique sequential keys without
having to resort to a record on disk updated through readu/write? The keys
don't have to be contiguous but only be sortable in the order in which they
were generated by several phantom processes running concurrently. I'm
currently approximating this using a concatenation of date and time with
millisecondsB but I'm worried about the possibility of two phantoms generating
exactly the same key.
B 
Although no collision has been detected so far, I
have added an extra check where after generating the key I first test if a
record with that key exists. If so IB increment and append aB serial number
and repeat the test until aB unique key is found. ItB seems to be working well
but I still think there is a better way to do this.
B 
Thanks for any help.
B 
Marco.


  __
Sent
from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Guaranteed unique sequential keys

2008-04-24 Thread Marco Manyevere
David, Allen, Edward, thanks for the suggestions but I want to be able to sort
theB records in the exact physical order in which they occured.B Using the
port or pid numbers could potentially give me the wrong sequence should two
events occur within the same millisecond (unless it is ruled out that this is
not possible).
Regards, Marco.



- Original Message 
From: Edward
Brown [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Thursday,
24 April, 2008 1:07:13 PM
Subject: RE: [U2] Guaranteed unique sequential keys
Of course if the port number is added to the end of the key then you can
still
sort by date/time.

In the past I've done an R%5 oconv on both the (internal)
date and time
before concatenation - this gives you a 10 digit number
regardless of
the date and time used, so no need for separators...

Edward
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Murray
Sent: 24
April 2008 11:53
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Guaranteed
unique sequential keys

Marco,

I have used similar processes in the past, but
also have appended port
number to the beginning of the key. Separating the
fields with '*' so
the
date and time can also be used as a time stamp rather
than duplicate the
same info in the record.

Cheers,


David Murray



*B B B 
B B B  Learn and do 
*B B B  Excel and share 

http://u2blog.org
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere
Sent:
Thursday, April 24, 2008 5:55 AM
To: u2-users@listserver.u2ug.org
Subject:
[U2] Guaranteed unique sequential keys

What is the most reliable way to
generate unique sequential keys without
having to resort to a record on disk
updated through readu/write? The
keys
don't have to be contiguous but only be
sortable in the order in which
they
were generated by several phantom
processes running concurrently. I'm
currently approximating this using a
concatenation of date and time with
millisecondsB but I'm worried about the
possibility of two phantoms
generating exactly the same key.
B
Although no
collision has been detected so far, I have added an extra
check
where after
generating the key I first test if a record with that key
exists. If so IB
increment and append aB serial number and repeat the
test
until aB unique key
is found. ItB seems to be working well but I still
think
there is a better way
to do this.
B
Thanks for any help.
B
Marco.


B  B  B 
__
Sent
from Yahoo!
Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users
mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
http://listserver.u2ug.org/
-
--
Please remember to recycle wherever possible. 
Reduce, reuse,
recycle, think do you need to print this e-mail?
-
--
This e-mail and any attachment(s), is confidential and may be
legally privileged. It is intended solely for the addressee. If you are not
the addressee, dissemination, copying or use of this e-mail or any of its
content is prohibited and may be unlawful. If you are not the intended
recipient please inform the sender immediately and destroy the e-mail, any
attachment(s) and any copies. All liability for viruses is excluded to the
fullest extent permitted by law. It is your responsibility to scan or
otherwise check this email and any attachment(s). Unless otherwise stated (i)
views expressed in this message are those of the individual sender (ii) no
contract may be construed by this e-mail. Emails may be monitored and you are
taken to consent to this monitoring.B  

Civica Services Limited, Company No.
02374268; Civica UK Limited, Company No. 01628868
Both companies are
registered in England and Wales and each has its registered office at 2
Burston Road, Putney, London, SW15 6AR.
-
--
---
u2-users mailing list
u2-users@listserver.u2ug.org
To
unsubscribe please visit http://listserver.u2ug.org/
__
Sent from Yahoo!
Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Guaranteed unique sequential keys

2008-04-24 Thread Marco Manyevere
I have already found records that are only 28 milliseconds apart and the
server isnt really a big one. Its not so much the clock accuracy thats
important but the records must be processed in exactly the same order in which
they were written to disk. Thanks for the confirmation. It seems there is no
other way to do this.
Regards, Marco.
Wow - what kind of application needs
THAT kind of accuracy?!?...B  old man
voice Why I remember when two items
writing in the same SECOND was a feat!
/old man voice

In this case, I don't
know how you escape having to do a READVU on the
item, and only writing on
the ELSE clause, and changing the key if a THEN or
LOCKED happens -- someone
else showed using a READV, but you really have to
do a READVU to ensure the
items are not hitting at EXACTLY the same time.

BASE.KEY = KEY
SEQCNT = 1
DO.WRITE = 0
LOOP UNTIL DO.WRITE
B  READVU TESTINGIT FROM FILENAME, KEY, 0
LOCKED
B  B  * No need to wait, Drop To Key Update
B  END THEN
B  B  * Need a
new key, Drop to Key Update
B  END ELSE
B  B  * Go!
B  B  EXIT
B  END
B  *
Once here, start adding sequence data...
B  KEY = BASE.KEY:*:SEQCNT
B 
SEQCNT += 1
REPEAT
WRITE REC ON FILENAME, KEY

D3 has a 'System-Wide' Unique
ID generator in their SYSTEM() selectiosn...
U2 does not.B  Darn it.



-Original Message-
 From: [EMAIL PROTECTED] 

[mailto:[EMAIL PROTECTED] On Behalf Of 
 Marco Manyevere

Sent: Thursday, April 24, 2008 7:47 AM
 To: u2-users@listserver.u2ug.org

Subject: Re: [U2] Guaranteed unique sequential keys
 
 David, Allen, Edward,
thanks for the suggestions but I want 
 to be able to sort theB records in
the exact physical order 
 in which they occured.B Using the port or pid
numbers could 
 potentially give me the wrong sequence should two events 

occur within the same millisecond (unless it is ruled out 
 that this is not
possible).
 Regards, Marco.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
http://listserver.u2ug.org/
___ 
Yahoo! For Good.
Give and get cool things for free, reduce waste and help our planet. Plus find
hidden Yahoo! treasure 

http://green.yahoo.com/uk/earth-day/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Piping to a unix command with echo

2008-02-15 Thread Marco Manyevere
Problem is STR1 may contain a ', then echo will not know where the string
ends, hence the need to escape it.


- Original Message 
From: Mats
Carlid [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Friday, 15
February, 2008 3:02:59 PM
Subject: Re: [U2] Piping to a unix command with echo
Unix is supposed to not process any special characters inside single quotes
so
drop the change commands and use  SQUOTE .

-- mats



Marco Manyevere skrev:
 Im trying to process the contents of a string generated in Universe with an
 external program by shelling out to the OS as follows:

 CHANGE '\' TO
'\\' IN
 STR1
 CHANGE '' TO '\' IN STR1
 SH.CMD = 'SH -c echo
':QUOTE(STR1):' |
 ./myscript'
 EXECUTE SH.CMD CAPTURING RESULT

 STR1 can
contain any characters
 so to avoid interpratation by the shell I put the two
CHANGE statements but it
 seems some situations are still not covered, for
example when STR1 contains
 \008, the output is wrong. Does anyone know how I
can make this foolproof or
 an alternate method? I am able to get consistent
results by writing STR1 to a
 temp file then running my script with input and
output redirection but I want
 to cut down on unnecessary disk IO.


Another question: While STR1 is
 guaranteed not to exceed 4k, does anyone
know the maximum size of the command
 I can run in this way? Im on AIX.


Marco.
 __
 Sent
from Yahoo!
 Mail - a smarter inbox http://uk.mail.yahoo.com
 ---

u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please
visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit
http://listserver.u2ug.org/
__
Sent from Yahoo!
Mail - a smarter inbox http://uk.mail.yahoo.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Piping to a unix command with echo

2008-02-14 Thread Marco Manyevere
Im trying to process the contents of a string generated in Universe with an
external program by shelling out to the OS as follows:

CHANGE '\' TO '\\' IN
STR1
CHANGE '' TO '\' IN STR1
SH.CMD = 'SH -c echo ':QUOTE(STR1):' |
./myscript'
EXECUTE SH.CMD CAPTURING RESULT

STR1 can contain any characters
so to avoid interpratation by the shell I put the two CHANGE statements but it
seems some situations are still not covered, for example when STR1 contains
\008, the output is wrong. Does anyone know how I can make this foolproof or
an alternate method? I am able to get consistent results by writing STR1 to a
temp file then running my script with input and output redirection but I want
to cut down on unnecessary disk IO.

Another question: While STR1 is
guaranteed not to exceed 4k, does anyone know the maximum size of the command
I can run in this way? Im on AIX.

Marco.
__
Sent from Yahoo!
Mail - a smarter inbox http://uk.mail.yahoo.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Deep and long indentations vs multiple exit points

2007-12-03 Thread Marco Manyevere
That was an over simplified example. The additional IF tests usually occur in
situations where you can neither AND them together nor put them in a CASE
structure. For example:

PROCESS.ID:
READ RECORD1 FROM FILE1, ID ELSE RETURN
IF RECORD1FLD1 NE COND1 THEN RETURN
* Some processing to derive NEXT.ID
based on RECORD1
* Initialise some variables here
READ RECORD2 FROM FILE2,
NEXT.ID ELSE RETURN
IF RECORD2FLD4 NE RECORD1FLD5 THEN RETURN
* Some
processing to derive NEXT.ID based on RECORD1 and RECORD2
* Initialise some
more variables here
READ RECORD3 FROM FILE3, NEXT.ID ELSE RETURN
COND3 =
RECORD1FLD7 : RECORD2FLD8
IF RECORD3FLD9 NE COND3 THEN RETURN
*  We
passed the tests lets do the processing using RECORD1, 2 and 3 and the
*  the
iniatialised variables
...
RETURN

The final processing block would end up
indented a minimum 6 levels without the early RETURNs. Granted you can put the
final part in a GOSUB but even that GOSUB is still deeply indented.

If you
restructure this into SUBs (which I dont oppose per se) you end up with six
SUBs that become more difficult to comprehend as you go further down. You
would have to scroll up and down to find out at what point some variables came
into being.


- Original Message 
From: David A Barrett
[EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Friday, 30
November, 2007 4:03:16 PM
Subject: Re: [U2] Deep and long indentations vs
multiple exit points

Curious, I would have done:

LOOP WHILE READNEXT ID
READ RECORD FROM FILE,ID THEN
IF ((RECORDFLD.1 EQ COND1) AND
(RECORDFLD.2 EQ COND2) AND
(RECORDFLD.3 EQ COND3)) THEN
RECORDFLD.4 = 'PROCESSED'
END
  END
REPEAT

If I was worried about the
IF statement getting too long, then I'd do this:

LOOP WHILE READNEXT ID
READ RECORD FROM FILE,ID THEN
ANS1 = (RECORDFLD.1 EQ COND1)
ANS2 =
(RECORDFLD.2 EQ COND2)
ANS3 = (RECORDFLD.3 EQ COND3)
IF (ANS1 AND
ANS2 AND ANS3) THEN
  RECORDFLD.4 = 'PROCESSED'
END
  END
REPEAT
While I'm on it, I probably wouldn't do the looping like that either, I'd
do
this:

MORE = @TRUE
LOOP
  READNEXT ID ELSE MORE = @FALSE
WHILE (MORE = @TRUE)
DO
  READ RECORD FROM FILE,ID THEN
IF ((RECORDFLD.1 EQ COND1) AND
(RECORDFLD.2 EQ COND2) AND
(RECORDFLD.3 EQ COND3)) THEN
RECORDFLD.4 = 'PROCESSED'
END
  END
REPEAT

Not that I actually think
there's anything wrong with the original way it
was done...

I  use CONTINUE
all the time when processing
records that must meet multiple conditions in a
loop. This way my code
doesnt
look like 'flying geese'. I will write:

LOOP
WHILE READNEXT ID
  READ RECORD
FROM FILE, ID ELSE CONTINUE
  IF
RECORDFLD.1 NE COND1 THEN CONTINUE
  IF
RECORDFLD.2 NE COND2 THEN
CONTINUE
  IF RECORDFLD.3 NE COND3 THEN
CONTINUE
  RECORDFLD.4 =
'PROCESSED'
  WRITE RECORD TO FILE, ID
REPEAT
instead of:

LOOP WHILE
READNEXT ID
  READ RECORD FROM FILE,ID THEN
  IF
RECORDFLD.1 EQ COND1
THEN
IF RECORDFLD.2 EQ COND2 THEN
IF RECORDFLD.3 EQ COND3 THEN

RECORDFLD.4 = 'PROCESSED'
WRITE RECORD TO FILE, ID
END

END
  END
  END
REPEAT


Dave Barrett,
Lawyers' Professional Indemnity
Company
---
u2-users mailing list
u2-users@listserver.u2ug.org
To
unsubscribe please visit http://listserver.u2ug.org/
__
Sent from Yahoo! -
the World's favourite mail http://uk.mail.yahoo.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Deep and long indentations vs multiple exit points

2007-11-29 Thread Marco Manyevere
snip
I had to look up the CONTINUE statement.  In 25 years I've never used
it,
and don't even remember seeing it used.  Now I know what it does I think
it
should be banned.
/snip

I  use CONTINUE all the time when processing
records that must meet multiple conditions in a loop. This way my code doesnt
look like 'flying geese'. I will write:

LOOP WHILE READNEXT ID
   READ RECORD
FROM FILE, ID ELSE CONTINUE
   IF RECORDFLD.1 NE COND1 THEN CONTINUE
   IF
RECORDFLD.2 NE COND2 THEN CONTINUE
   IF RECORDFLD.3 NE COND3 THEN
CONTINUE
   RECORDFLD.4 = 'PROCESSED'
   WRITE RECORD TO FILE, ID
REPEAT
instead of:

LOOP WHILE READNEXT ID
   READ RECORD FROM FILE,ID THEN
  IF
RECORDFLD.1 EQ COND1 THEN
 IF RECORDFLD.2 EQ COND2 THEN
IF RECORDFLD.3 EQ COND3 THEN
   RECORDFLD.4 = 'PROCESSED'
WRITE RECORD TO FILE, ID
END
 END
  END
   END
REPEAT
___
Yahoo! Answers -
Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Deep and long indentations vs multiple exit points

2007-11-29 Thread Marco Manyevere
My rule of thumb is that I should be able to see on the same page the
structure for IF/END, LOOP/REPEAT, READ/END, FOR/NEXT, etc. Otherwise the
block in between becomes a good candidate for a GOSUB.

snip
Than see a
single case statement that ran across hundreds of lines of code.
I've also
done stuff like this:

GOSUB OPERATION.1
IF (NOT(ERROR)) THEN
  GOSUB
OPERATION.2
  IF (NOT(ERROR)) THEN
GOSUB OPERATION.3
IF (NOT(ERROR))
THEN
  GOSUB OPEARTION.4
END
  END
END

Which I think nicely splits
out the control structure and makes it clear at
a glance how the program
works.
/snip
___
Yahoo! Answers -
Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Deep and long indentations vs multiple exit points

2007-11-28 Thread Marco Manyevere
There has been a lot said recently about styles, standards and good practice
and I wonder what your take is on deeply indented routines with a common exit
point versus unindented routines but with multiple exit points. I almost
always prefer the later and find it much easier to follow. I come accross
several routines or GOSUBs that get indented from line 1 right up to the end
and I always change that to an early return and remove the indentation. Below
are some examples:

PROCESS.ID:
READ RECORD FROM FILE, ID THEN
* Several
lines of indented code to calculate DESIRED.VALUE
 IF RECORDFIELD.NO EQ
DESIRED.VALUE THEN
 * Several lines of even more indented code
END
END
RETURN

versus:

PROCESS.ID:
READ RECORD FROM FILE, ID ELSE
RETURN
END
* Several lines of unindented code to calculate DESIRED.VALUE
IF
RECORDFIELD.NO NE DESIRED.VALUE THEN
RETURN
END
*  Several lines of
unindented processing code
RETURN

Or

LOOP
READ RECORD FROM FILE, ID THEN
IF RECORDFIELD.NO EQ 1 THEN
* Processing code
END
END
REPEAT UNTIL SOMECONDITION

Versus:

LOOP
READ RECORD FROM FILE, ID
ELSE
CONTINUE
END
IF RECORDFIELD.NO NE 1 THEN
CONTINUE
END
* Processing code
REPEAT UNTIL SOMECONDITION
___
Yahoo! Answers -
Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [jBASE] SELECT operator precedence

2007-07-27 Thread Marco Manyevere
I expected the following three SELECT statements to be equivalent but they
dont seem to be:

CLEARSELECT
[528] List '0' cleared.
jsh rbk ~ --SELECT
ACCOUNT WITH CATEGORY EQ 1000 OR GE 1002 AND LE 
173218 Records selected
CLEARSELECT
[528] List '0' cleared.
jsh rbk ~ --SELECT ACCOUNT WITH CATEGORY
GE 1002 AND LE  OR EQ 1000
102160 Records selected 
CLEARSELECT
[528]
List '0' cleared.
jsh rbk ~ --SELECT ACCOUNT WITH CATEGORY (GE 1002 AND LE
) OR EQ 1000
173218 Records selected

The second select seems to be
ignoring the OR EQ 1000 as it is returning the same number of records with:
CLEARSELECT
[528] List '0' cleared.
jsh rbk ~ --SELECT ACCOUNT WITH CATEGORY
GE 1002 AND LE 
102160 Records selected

I expect the brackets around (GE
1002 AND LE ) to be superfluous (only required to make the syntax clearer)
but they seem to be having an impact on the number of records selected. Can
someone please clarify.

Regards, Marco.
___
Yahoo! Answers -
Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] Permutations and Combinations

2007-05-14 Thread Marco Manyevere
Hi Everyone.

I need help coming up with a UV BASIC algorithm to find combinations of amounts 
that add up to a given figure. For example given the table below:

1  .33
2  5000.00
3  6000.00
4  7233.49
5  8000.00
6 2.00
7 16999.99
8 1.00
9  1000.00

a) If the given amount is 16999.99, I can say with certainty that only entry 7 
makes up the total. I want the program to print something like:

Combination 1:
--
7 16999.99 *

b) Similary if the given amount is 10566.82, the only possible combination is 
that of entries 1 and 4 which should be printed thus:

Combination 1:
---
1  .33 *
4  7233.49 *

c) If the given amount is 11000, The combination of entries 2,3 or 8,9 should 
be printed as follows:

Combination 1:
--
2 5000.00
3 6000.00

Combination 2:
--
8 1.00
9 1000.00

d) If the given amount is 14333.33, the program should print:

Combination 1:
--
1 .33 *
2 5000.00
3 6000.00

Combination 2:
--
1 3.33 *
8 1.00
9 1000.00

e) If the given amount is 3.00, the program should print:

Combination 1:
--
6 2.00
8 1.00 *
 
Combination 2:
--
2 5000.00
3 6000.00
5 8000.00
8 1.00 *
9 1000.00
 
An '*' should be printed against all amounts that appear in all possible 
combinations. The table of amounts could contain anything up to 2000 entries 
and the differences being investigated are usually so unique that even visual 
identification will work except when 2 or more entries are involved. The 
program should stop finding more combinations once the number of unique entries 
in the combinations found so far exceed 10. After the analysis has run for 
about 2 minutes, an estiamate of how long the total analysis is going to take 
should be given with an option to quit the analysis.

Thanks for any help.


  ___
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Difference between two TIMEDATES in seconds

2007-03-16 Thread Marco Manyevere
Hello everyone,

Can someone help me with this. I need a way to calculate the difference between 
two TIMEDATE() and return the results in seconds. The biggest difference I 
expect between the two time dates is 100 days.

Thanks and regards, Marco.



___ 
The all-new Yahoo! Mail goes wherever you go - free your email address from 
your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Difference between two TIMEDATES in seconds

2007-03-16 Thread Marco Manyevere
Thanks its the last formula that I was actually failing to visualise. I thought 
it would involve some complicated algorithm.

Thanks, Marco.


- Original Message 
From: Perry Taylor [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Friday, 16 March, 2007 1:31:10 PM
Subject: RE: [U2] Difference between two TIMEDATES in seconds


Marco,

BEG.TIMEDATE = TIMEDATE()
END.TIMEDATE = TIMEDATE()

BEG.TIME = ICONV(FIELD(BEG.TIMEDATE, ' ', 1, 1), 'MT')
BEG.DATE = ICONV(FIELD(BEG.TIMEDATE, ' ', 2, 3), 'D')

END.TIME = ICONV(FIELD(END.TIMEDATE, ' ', 1, 1), 'MT')
END.DATE = ICONV(FIELD(END.TIMEDATE, ' ', 2, 3), 'D')

ET = END.TIME - BEG.TIME + (END.DATE - BEG.DATE) * 86400

This assumes TIMEDATE() outputs in the format hh:mm:ss dd mmm .
Adjust the code if your system is configured differently.

Is this what you are looking for?

Perry


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere
Sent: Friday, March 16, 2007 6:25 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Difference between two TIMEDATES in seconds

Hello everyone,

Can someone help me with this. I need a way to calculate the difference
between two TIMEDATE() and return the results in seconds. The biggest
difference I expect between the two time dates is 100 days.

Thanks and regards, Marco.



___ 
The all-new Yahoo! Mail goes wherever you go - free your email address
from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited. ZirMed, Inc. has strict policies regarding the 
content of e-mail communications, specifically Protected Health Information, 
any communications containing such material will be returned to the originating 
party with such advisement noted. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



___ 
Inbox full of unwanted email? Get leading protection and 1GB storage with All 
New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] STRVAR[4,1] = ' JBASE and UNIVERSE differences

2006-07-11 Thread Marco Manyevere
If I run this piece of code:
 
STRVAR = ABCDEFG
STRVAR[4, 1] =  ;* Assign NUL character
PRINT STRVAR
PRINT LEN(STRVAR)
 
On JBASE I get:
 
ABCEFG
6
 
On UV I get:
 
ABC EFG
7
 
Which is correct behaviour? (I prefer the jbase behaviour). I only have the 
online help for UV and cant quite find the documentation for this in the JBASE 
manuals. The UV manuals arent clear on what should happen.
 
On UV, PRINT SEQ(STRVAR[4, 1]) prints 32.

Regards, Marco.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] jBASE : PRINT FMT('6.71509648127128E-02', 'R9') error

2005-12-21 Thread Marco Manyevere
Thanks all,
   
  I settled for:
   
  Base = Number['E', 1, 1]
  Factor = Number['E', 2, 1]
  Result = Base * PWR(10, Factor)
   
  Regards, Marco

Brian Leach [EMAIL PROTECTED] wrote:
  Chuck,

You were right first time. Must be the hour.

Number = 1.234567E+14

Base = Number[E,1,1]
Factor = Number[E,2,1]

Multiplier = 1 : Str(0, Factor)
If Factor  0 Then
Result = Base / Multiplier
End Else
Result = Base * Multiplier
End
Crt Result

Should give: 1234567


Brian
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
  



-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] jBASE : PRINT FMT('6.71509648127128E-02', 'R9') error

2005-12-20 Thread Marco Manyevere
I'm processing numeric data from an excel spreadsheet using jbase and the 
statement PRINT FMT('6.71509648127128E-02', 'R9') gives non numeric value when 
numeric expected.
   
  I have compiled the same statement into a Universe test program and I'm 
getting the expected result of 0.067150965.
   
  Does anyone have suggestions how to get the correct result in jbase? I'm 
reading the excel values using an ADO driver interface and have no way of 
changing how the data is presented to me from the interface.
   
  Thanks for any help, Marco.


-
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Finding last day of month

2005-06-03 Thread Marco Manyevere
Will,
 
This was exactly my method, except I was adding 35 days (it could have been 30 
as well) to the first day of the month to get to next month.
 
I also dislike the lookup table idea  i.e. 31,28,30,31,etc, the leap year or 
12th month logic.
 
Thanks for all the responses guys.

[EMAIL PROTECTED] wrote:
Ok smartass you say let's see you do it 

First of all, you can always get from the month you are in, to the next month 
by simply add 30 days to the middle of the month. And you never need to 
worry about leap years nor about 12th month logic

Input Date ; * format mmdd
Middleofthismonth = date[1,6]:'15'
I.Middle = Iconv(Middleofthismonth,'D')
I.Next = I.Middle + 30
NextMonth = Oconv(I.NEXT,'D2-')
FirstDayNextMonth = NextMonth[1,2]:'01':NextMonth[5,2]
I.FirstDay = Iconv(FirstDayNextMonth,'D')
I.LastDayPreviousMonth = I.FirstDay - 1

Now can we scrunch this down?
Input Date ; *format mmdd
NextMonth = Oconv(Iconv(date[1,6]:'15','D') + 30,'D2')
I.LastDayPreviousMonth = Iconv(NextMonth[1,2]:'01':NextMonth[5,2],'D') + 1

Do I win the big stuffed pickle?
Will Johnson
Fast Forward Technologies
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


-
Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Finding last day of month

2005-06-02 Thread Marco Manyevere
Hi,

Given a date like 20040203, I want to return the last valid date for that month 
and year (20040229 in this case). What is the shortest code fragment to achieve 
this?

At the moment I'm replacing the day with 01, then iconv, add 35 days to the 
internal date and then oconv and replace the day again with 01. I'm then on the 
first day of the next month. I then iconv, subtract 1 day and oconv.

Thanks for any help.


-
Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] making 00001 our of 1

2005-03-03 Thread Marco Manyevere
...and also watch out for:
 
3: A = FMT(5, '60R')
3 0 : 09C format 5 60R  = A
4: B = FMT(5, 6'0'R)
4 8 : 09C format 5 6'0'R  = B

[EMAIL PROTECTED] wrote:
Chuck,

Now if only Jbase had something like VLIST (sigh...).

Regards,
Charlie Noah

[EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) 
writes:

Speaking of Y2K-related programs, I too wrote one, but it searched the
VLIST of the program. That way I didn't care about spacing, etc.. You
might find that method helpful.

For example, these 4 source lines compile to the same PCODE:

VLIST CDS.BP MARK

1: NBR = NBR 5'0'R
1 0 : 09C format NBR 5'0'R = NBR 

2: NBR=NBR5'0'R
2 8 : 09C format NBR 5'0'R = NBR 

3: NBR = NBR \5'0'R\
3 00010 : 09C format NBR 5'0'R = NBR 

4: NBR = NBR 5'0'R
4 00018 : 09C format NBR 5'0'R = NBR 

5: NBR = FMT( NBR, 5'0'R )
5 00020 : 09C format NBR 5'0'R = NBR 
6 00028 : 190 stop 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Send instant messages to your online friends http://uk.messenger.yahoo.com 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV]Unable to get process lock semaphore

2005-02-17 Thread Marco Manyevere
Hi,

I get the error message 'Unable to get process lock semaphore' in a complicated 
application for which I have no source code.

1) What could be the cause of my problem? The only setup parameter I see linked 
to process semaphores is PSEMNUM which is set to 64. Can I increase this? What 
unix parameters are related if any?

2) How do I diagnose how many semaphores are actually being used? I'm on 
Unixware and the system says SEMAPHORE.STATUS is not supported.

3) How can I intentionally cause this problem in my own code?

Thanks for any help.

Marco.


-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] LIST.LOCKS - Unable to get process lock semaphore

2005-02-17 Thread Marco Manyevere
In addition to my message below, when I enter the UV command LIST.LOCKD I get 
the following:
 
LIST.LOCKS
Unable to get process lock semaphore.
[EACCES] Permission denied
Unable to get process lock semaphore.
[EACCES] Permission denied
[192.168.1.1: remote disconnect]

Marco Manyevere [EMAIL PROTECTED] wrote:
Hi,

I get the error message 'Unable to get process lock semaphore' in a complicated 
application for which I have no source code.

1) What could be the cause of my problem? The only setup parameter I see linked 
to process semaphores is PSEMNUM which is set to 64. Can I increase this? What 
unix parameters are related if any?

2) How do I diagnose how many semaphores are actually being used? I'm on 
Unixware and the system says SEMAPHORE.STATUS is not supported.

3) How can I intentionally cause this problem in my own code?

Thanks for any help.

Marco.


-
ALL-NEW Yahoo! Messenger - all new features - even more fun! 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] How to setup MALLOCTRACING?

2004-11-30 Thread Marco Manyevere
The COMO, SAVEDLISTS and HOLD files are simple type 19 (directory) files. 
Can they get corrupted and what tool should I use to check for this?

Glenn Herbert [EMAIL PROTECTED] wrote:At 10:44 AM 11/30/2004, you wrote:
I can understand an edit of a 30mb file failing but the delete is a bit
strange.

Sounds like the file has a corruption; the DELETE code simply does a READVU 
of the item on field 0 (the key) so it doesn't actually read the entire 
record into memory. Maybe check the file for corruption.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere
Sent: 30 November 2004 13:46
To: [EMAIL PROTECTED]
Subject: RE: [U2] How to setup MALLOCTRACING?

The problem shows itself up in 2 ways:

1) DELETEing or EDiting a record from COMO, SAVEDLISTS, or HOLD
thats more than 30Mb fails with 'Available memory exceeded'

2) A number of reports on the system use the TEMP.LIST-1 = TEMP.STR
construct and these are failing for big files. Unfortunately I cant
change this because I have no access to the source code and it would be
a major major exercise based on the size of the system.

Every time you append (which is what -1 implies), you actually have to make 
a copy of the existing string (TEMP.LIST), append to the copy, destroy the 
original, then rename the copy. This means that you can have, at times, 
two full copies of the item in memory. For big items, you will exhaust 
memory rather quickly.

Memory in universe, for those systems that use the universe memory manager 
and NOT the system memory manager, is limited to the amount of memory 
dictated by the placement of the system disk shared memory segment (i 
believe its 0xacec). On most systems this will be well below actual 
physical memory.

I don't believe that the uvconfig file for universe has a tunable to change 
the shared memory location; I know for DSEngine we rewrote all the attach 
code so that we could easily relocate the segments as well as run multiple 
versions and copies of the engine on a single system. In the past we had 
to actually rebuild universe with different attach points for the segments 
as they couldn't be adjusted in the field; if you can't change the offset 
values in the uvconfig file, then the only recourse would be to get a new 
build from IBM with adjusted offset values, or don't have such large items.

Good luck!


Regards, Marco.



Adrian Matthews wrote:
What are you running within Universe?

Seems like quite a lot of memory to be using, none of our processes (on
Windows or Unix) ever go over 15mb of physical memory.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere
Sent: 30 November 2004 07:42
To: [EMAIL PROTECTED]
Subject: [U2] How to setup MALLOCTRACING?

Hi Everyone,

I'm still battling with the 'Available memory exceeded' problem on Sco
Unixware. I haven't been able to receive feedback from anyone on the
list running UV on Unixware on how they have configured their system and
how much memory they can be mallocated in one big chuck. I can only get
30Mb max before the memory exceeded error is thrown even though I have 8
Gig RAM and am the only user on the system. The system runs nothing else
but UV and all possible Unixware parameters must be optimised for UV.

I want to turn on MALLOCTRACING to 1 in the hope that I will be able to
find out the exact nature of the failure. I have tried but then UV fails
to start with a missing parameter message. Does anyone know how to setup
the malloctracing? Where does the tracing information get written to and
how to interpret it?

Thanks for any help.

Regards, Marco.


-
Win a castle for NYE with your mates and Yahoo! Messenger
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/




The information contained in this email is strictly confidential and for
the use of the addressee only, unless otherwise indicated. If you are
not the intended recipient, please do not read, copy, use or disclose to
others this message or any attachment. Please also notify the sender by
replying to this email or by telephone +44 (0)20 7896 0011 and then
delete the email and any copies of it. Opinions, conclusions (etc.) that
do not relate to the official business of this company shall be
understood as neither given nor endorsed by it. IG Markets Limited and
IG Index Plc are authorised and regulated by the Financial Services
Authority and, in Australia, by the Australian Securities and
Investments Commission.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/





-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/




The information contained in this email is strictly confidential and for 
the use

[U2] How to setup MALLOCTRACING?

2004-11-29 Thread Marco Manyevere
Hi Everyone,
 
I'm still battling with the 'Available memory exceeded' problem on Sco 
Unixware. I haven't been able to receive feedback from anyone on the list 
running UV on Unixware on how they have configured their system and how much 
memory they can be mallocated in one big chuck. I can only get 30Mb max before 
the memory exceeded error is thrown even though I have 8 Gig RAM and am the 
only user on the system. The system runs nothing else but UV and all possible 
Unixware parameters must be optimised for UV.
 
I want to turn on MALLOCTRACING to 1 in the hope that I will be able to find 
out the exact nature of the failure. I have tried but then UV fails to start 
with a missing parameter message. Does anyone know how to setup the 
malloctracing? Where does the tracing information get written to and how to 
interpret it?
 
Thanks for any help.
 
Regards, Marco.


-
Win a castle  for NYE with your mates and Yahoo! Messenger 
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] How far can STR1 := SPACE(1000000) grow?

2004-11-22 Thread Marco Manyevere
Please try the following on your server and find out how far you can go before 
malloc fails.

On my Unixware server with 8Gb RAM, I can only go as far as 24 to 30 MB before 
the process fails with 'Available memory exceeded'.  Running 'sar -r' at the 
Unix prompt shows me over 3 Gig of RAM is still free. Are there any parameters 
I can change to increase the limit?

On my XP latop with 512MB RAM, I can run the program upto 250MB then it begins 
to really crawl, taking upto 15 seconds to go through the loop.

BLOCK = SPACE(100)
STR1 = ''
FOR I = 1 TO 100
   STR1 := BLOCK
   PRINT I:' STR1 SIZE = ':100*I
NEXT

RETURN
END



-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] How far can STR1 := SPACE(1000000) grow?

2004-11-22 Thread Marco Manyevere
Please try the following on your server and find out how far you can go before 
malloc fails.

On my Unixware server with 8Gb RAM, I can only go as far as 24 to 30 MB before 
the process fails with 'Available memory exceeded'.  Running 'sar -r' at the 
Unix prompt shows me over 3 Gig of RAM is still free. Are there any parameters 
I can change to increase the limit?

On my XP latop with 512MB RAM, I can run the program upto 250MB then it begins 
to really crawl, taking upto 15 seconds to go through the loop.

BLOCK = SPACE(100)
STR1 = ''
FOR I = 1 TO 100
   STR1 := BLOCK
   PRINT I:' STR1 SIZE = ':100*I
NEXT

RETURN
END




-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] How far can STR1 := SPACE(1000000) grow?

2004-11-22 Thread Marco Manyevere
Please try the following on your server and find out how far you can go before 
malloc fails.

On my Unixware server with 8Gb RAM, I can only go as far as 24 to 30 MB before 
the process fails with 'Available memory exceeded'.  Running 'sar -r' at the 
Unix prompt shows me over 3 Gig of RAM is still free. Are there any parameters 
I can change to increase the limit?

On my XP latop with 512MB RAM, I can run the program upto 250MB then it begins 
to really crawl, taking upto 15 seconds to go through the loop.

BLOCK = SPACE(100)
STR1 = ''
FOR I = 1 TO 100
   STR1 := BLOCK
   PRINT I:' STR1 SIZE = ':100*I
NEXT

RETURN
END






-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] How far can STR1 := SPACE(1000000) grow?

2004-11-22 Thread Marco Manyevere
Thanks guys for all the responses. Can someone tell me why I'm getting a 
miserly 30MB on a system with 8Gb. Anyone try this on unixware or sco 
openserver? If you get anything different for unixware/sco, please I want to 
know how your system is configured.

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:Wendy Smoak wrote:

 1036 STR1 SIZE = 103600
 
 Error when creating a shared memory segment
 (size=1166625024), errno=22
 
 Do I win???

No Wendy - you cheated and used UniData where variable space
is allocated (and
garbage collected) from shared memory by smm which means
that you can tune this
sort of thing in udtconfig.

On UniVerse variable space is malloc()ed (or an equivalent)
so:
1) the limits are different - probably kernel or maybe
ulimit
based on UNIX; and
2) there is a further issue that after you've created this
large variable,
you may get strange behaviour out of other code which
normally works fine because
you've already used up the memory available to you from the
heap.

Cheers,

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



-
Win a castle  for NYE with your mates and Yahoo! Messenger 
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] Help with 'Available memory exceeded' on 8Gig Ram server

2004-11-20 Thread Marco Manyevere
Hi Everybody,

A crucial job has failed on a client server with the error message 'Available 
memory exceeded'. The machine has 8Gb RAM and I do not see how this could be 
happening. I have also noticed that DELETE(ing) or ED(iting) a record more than 
16MB will fail with the same error message even when I'm the only user on the 
system.

What UV/Unix tunables must I change to solve this problem if any?

Regards, Marco.


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Help with EVAL in SELECT statement

2004-11-19 Thread Marco Manyevere
Martin,
 
here is the uparrow mode for the field in question:
 
: 25
0025: 0.000225
: ^
Up-arrow display mode= enabled
0025: 0.000225
:
 
There is nothing unusual as far as I can see. Field 5 of the dict record for 
BALANCE has 19R and field 3 is blank.

Martin Phillips [EMAIL PROTECTED] wrote:
Can't remember whether I said this yesterday but EVAL takes on the
properties of the first field referenced in the expression. Hence, if
BALANCE is defined as having an MD2 conversion, so will EVAL ABS(BALANCE)

It is interesting that the value for BALANCE shown in the original email has
more decimal places than any other field. My money is on the data stored in
the record having a non-printing character in it. The conversion then fails,
returning the original data.

I have deleted all the old messages from this thread so I cannot remember
who originally posted it. Can you try going into ED for the relevant
record, type ^ to switch into up arrow mode so that non-printing
characters are displayed, and then look at the data.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/



-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Help with EVAL in SELECT statement

2004-11-19 Thread Marco Manyevere
Tom,
 
Here is a CT of the item. The field we are interested in is 25.
 
Press any key to continue...
0022
0023 0.000225
0024 0.000225
0025 0.000225
0026 0.000225
0027 0.000225

Tom Dodds [EMAIL PROTECTED] wrote:
What does the real data look like. CT that item, 0048108, and lets see
how the data is really stored.

Tom Dodds
[EMAIL PROTECTED]
630-235-2975 Cell
708-482-4510 Office



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marco Manyevere
Sent: Wednesday, November 17, 2004 12:57 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] [UV] Help with EVAL in SELECT statement


Thanks for the suggestion but I want to know is why this doesnt work. What
looks broken?

Allen E. Elwood wrote:Looks broken.

Why not make a dict to round it up to MD2 and then just select everything
with a balance not equal to zero?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marco Manyevere
Sent: Wednesday, November 17, 2004 08:10
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UV] Help with EVAL in SELECT statement


Martin,

Here again:

SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL ABS(BALANCE)

0955485 1972.55
0971405 114629.25
0987328 45803.12
0048108 0.0002
2006146 54125.35


SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL QUOTE(BALANCE)

0955485 1972.55
0971405 114629.25
0987328 45803.12
0048108 0.000225
2006146 54125.35


Here is the DICT record for BALANCE
0001: D
0002: 25
0003:
0004: BALANCE
0005: 19R
0006: S
Bottom at line 6.

Martin Phillips wrote:
Hi Brian,

I can see that this will run on a bit

 I think Mats is correct.

 The 'field' in question is an EVAL expression, so doesn't have its own 
 conversion code unless you explicitly state it using the CONV keyword.
Hence
 the confusion over the result.

EVAL takes on the properties of the first item in the expression, in this
case BALANCE.

Regardless of what it is doing, the output of displaying BALANCE should be
equivalent to the value used in the comparison. It would be interesting to
see the results of EVAL QUOTE(BALANCE) as I thing this is going to show
that the field is faulty in some way.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail
to make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/



-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail
to make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] Help with EVAL in SELECT statement

2004-11-17 Thread Marco Manyevere
Hi All,

I typing the following commands in succession:

SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL ABS(BALANCE)

Here is part of the output:

 0955485 1972.55
 0971405   114629.25
 098732845803.12
 0048108  0.0002
 200614654125.35

I'm wondering why the record with balance 0.0002 got selected. Can someone help 
me out?

Regards, Marco.


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Help with EVAL in SELECT statement

2004-11-17 Thread Marco Manyevere
Martin,
 
Here again:
 
SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL ABS(BALANCE)

 0955485 1972.55
 0971405   114629.25
 098732845803.12
 0048108  0.0002
 200614654125.35

 
SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL QUOTE(BALANCE)
  
 0955485   1972.55
 0971405 114629.25
 0987328  45803.12
 0048108  0.000225
 2006146  54125.35

 
Here is the DICT record for BALANCE
0001: D
0002: 25
0003:
0004: BALANCE
0005: 19R
0006: S
Bottom at line 6.

Martin Phillips [EMAIL PROTECTED] wrote:
Hi Brian,

I can see that this will run on a bit

 I think Mats is correct.

 The 'field' in question is an EVAL expression, so doesn't have its own
 conversion code unless you explicitly state it using the CONV keyword.
Hence
 the confusion over the result.

EVAL takes on the properties of the first item in the expression, in this
case BALANCE.

Regardless of what it is doing, the output of displaying BALANCE should be
equivalent to the value used in the comparison. It would be interesting to
see the results of
EVAL QUOTE(BALANCE)
as I thing this is going to show that the field is faulty in some way.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Help with EVAL in SELECT statement

2004-11-17 Thread Marco Manyevere
Thanks for the suggestion but I want to know is why this doesnt work. What 
looks broken?

Allen E. Elwood [EMAIL PROTECTED] wrote:Looks broken.

Why not make a dict to round it up to MD2 and then just select everything
with a balance not equal to zero?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Marco Manyevere
Sent: Wednesday, November 17, 2004 08:10
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UV] Help with EVAL in SELECT statement


Martin,

Here again:

SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL ABS(BALANCE)

0955485 1972.55
0971405 114629.25
0987328 45803.12
0048108 0.0002
2006146 54125.35


SELECT F.ACCOUNT WITH EVAL ABS(BALANCE) GT 0.01
15480 record(s) selected to SELECT list #0.
LIST F.ACCOUNT EVAL QUOTE(BALANCE)

0955485 1972.55
0971405 114629.25
0987328 45803.12
0048108 0.000225
2006146 54125.35


Here is the DICT record for BALANCE
0001: D
0002: 25
0003:
0004: BALANCE
0005: 19R
0006: S
Bottom at line 6.

Martin Phillips wrote:
Hi Brian,

I can see that this will run on a bit

 I think Mats is correct.

 The 'field' in question is an EVAL expression, so doesn't have its own
 conversion code unless you explicitly state it using the CONV keyword.
Hence
 the confusion over the result.

EVAL takes on the properties of the first item in the expression, in this
case BALANCE.

Regardless of what it is doing, the output of displaying BALANCE should be
equivalent to the value used in the comparison. It would be interesting to
see the results of
EVAL QUOTE(BALANCE)
as I thing this is going to show that the field is faulty in some way.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail
to make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/



-
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo! Mail to 
make your dream a reality.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Readu lock lost after 1 hour.

2004-10-13 Thread Marco Manyevere
I have tested your programs with one major difference on my UV9.6: PGM2 eventually 
abandoms the wait but does not go into the THEN block, i.e., the 'READU END' is not 
displayed. As per Martin's email, the time to wait is controlled by the LOCK.WAIT.

Sibut Pascal [EMAIL PROTECTED] wrote:Dear all,

I had problem in a batch application so 
I have written 2 small test programs

PGM1
OPEN TEST TO TEST ELSE STOP CANT OPEN TEST
READU R.TEST FROM TEST,1 THEN 
LOOP
SLEEP 60
REPEAT
END
END 

PGM2 
OPEN TEST TO TEST ELSE STOP CANT OPEN TEST
CRT OCONV(TIME(),MTS) :  READU START
READU R.TEST FROM TEST,1 THEN 
CRT OCONV(TIME(),MTS) :  READU END
END 
END

I have launch PGM1 on a first telnet session and let it run.

Then, I have launch PGM2 on a second telnet session.

I was expecting the PGM2 waits until I kill PGM1.
Instead of that I get the following output from PGM2:


10:56:08 READU START
11:56:09 READU END
-

It seems the locks are automatically released by UV after one hour ???

Is something wrong in my configuration ?
Does this mean the READU locks are released after one hour ?
Is there a tunable parameter to adjust this delay ?

Can anybody help me ?

I am using UV 9.5.2.1 on an alpha server Unix tru64 V5.1 

Thanks and regards,

== The EFG Mail Gateway made the following annotation(s). ==
 Disclaimer 
This e-mail is confidential. If you are not the intended recipient, you should not 
copy it, re-transmit it, use it or disclose its contents, but should return it to the 
sender immediately and delete the copy from your system. 
EFG is not responsible for, nor endorses, any opinion, recommendation, conclusion, 
solicitation, offer or agreement or any information contained in this communication.
EFG cannot accept any responsibility for the accuracy or completeness of this message 
as it has been transmitted over a public network. If you suspect that the message may 
have been intercepted or amended, please call the sender.
Should you require any further information, please contact the Compliance Manager on 
[EMAIL PROTECTED]
===
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/



-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/