Re: PI Open is going away

2004-04-16 Thread Martin Phillips
> Funny that... I was only thinking the other day that I should throw
>  out my ICL 1900 COBOL and PLAN Manuals!!! :-)

Don;t start me on that nostalgia!  I was an operating system developer with
ICL all those years ago.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: PI Open is going away

2004-04-16 Thread Martin Phillips
I was one of the two technical managers for the development of PI/open.
It's always sad watching a product that you worked on be put into
retirement.

Perhaps I can now throw out my collection of PI/open manuals.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Data typing in MV Basic

2004-03-31 Thread Martin Phillips
Ok, so I've deleted most of the discussion of this one but I felt it was
time to give my two cents (pence?) worth. Apologies if it's all been said
before..

Literal values are stored according to the way they are written.  Stick
quotes round something and its a string.  Just write a number and its an
integer (or float if it's got a decimal point in it).  Let's ignore the
problem of integers > 2^31. (UV confusingly refers to the float data type as
"number" for historic reasons).

All Basic operators start by converting their operands to the necessary
type.  Arithmetic operators require numbers.  String operators require
strings.  The type of the result of an assignment depends on the last
operator applied in evaluating the expression.  Once you accept this, most
of the examples quoted in previous mailing become clear.

IBM are very secretive about the internals of UniVerse but from simple
experiment it appears not to include any optimisation of the results of
division.  Is the result of A = B / C an integer or a float?  It all depends
on the values of B and C.  UV seems always to store the result as a float.
Some MV databases detect that it would be better to store this as an
integer.

Hidden data type conversion is great from a programmer's point of view.  You
don't have to worry about data types; it just gets on with it.  There are,
however, times when an understanding of data types is useful.  Some years
ago I came across a program where, because a value stored as a string was
used endlessly in a very repetitive loop as a number, the conversion costs
were enormous.  By changing just five lines of the program to ensure that
the right data type was used, the program ran over 10,000 times faster. (I
got in trouble for fixing this. The software house was going to sell the
customer a faster processor!)

Because Basic lacks any explicit conversion functions akin to the atoi() and
itoa(), etc of C, programmers sometimes write apparently pointless
statements such as
   A = A + 0
Don't remove it!  This is probably there to force A to be stored as an
integer.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


U2UG Contract

2004-03-29 Thread Martin Phillips
Hi all,

Firstly, thanks to Cliff for all his work over the years.

I guess that most of us are looking to move to the U2UG site.  I started off
down that path this morning but, being a careful sort of person, I read the
terms and conditions.  Clause 7a worries me.  I have discussed this briefly
with our legal advisors who said that we shouldn't agree to it without
clarification.

So what is clause 7a?...

7. Submission of Content on this Web Site.
By providing any Content to our web site:
(a) you agree to grant to us a worldwide, royalty-free, perpetual,
non-exclusive right and license (including any moral rights or other
necessary rights) to use, display, reproduce, modify, adapt, publish,
distribute, perform, promote, archive, translate, and to create derivative
works and compilations, in whole or in part. Such license will apply with
respect to any form, media, technology known or later developed;

My non-legal mind looks at this and reads into it that once I have submitted
a posting to the site, I give away all rights to everything I have done and
all my future work that may have any connection with what I have posted.
I'm not even certain that the connection is necessary!

Any views out there before we all (possibly) donate our life's work to IBM?


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Common DICT

2004-03-12 Thread Martin Phillips
> If you have 40 branches, each in a UVaccount, each with an INVENTORY-FILE,
> and a master inventory in HO,
> would there be any problem to let all the branch inventory files' DICTs
> point to the DICT of HO's master inventory?.
> Normally, one would not delete an entire inventory file, so the danger of
> getting the 'master' dict wiped is not a real one.

This is a common way of working.  As you say, you just have to avoid
deleting the master account!

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Calling Wayne Cox!

2004-03-12 Thread Martin Phillips
Please give me a fax number. Replies to your email are rejected saying it
gets too much SPAM from Europe!

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: EVAL

2004-03-11 Thread Martin Phillips
Hi Schalk,

> Can somebody help me with the syntax of EVAL.  I want to execute a SELECT
> on a file to get all records where (field 16)*0.9 < field(17).

Various ways to do this.  Try...
   SELECT file WITH EVAL "F16 * 0.9 < F17" = 1
where F16 and F17 are field names from the dictionary.

The most common mistake is to miss off the = 1 at the end.  Remember, this
EVAL expression is going to return true or false.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: ReCompiling UV

2004-03-05 Thread Martin Phillips
> If I migrate from A to B [like HP-Ux to AIX] do all of the UniBasic
programs
> need to be recompiled in order to run on the target platform ?

No.  If you need to run fnuxi to correct byte ordering on your files, you
have to do the same to the object code but everything else should be
compatible.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] Ever wondered how something works...

2004-03-05 Thread Martin Phillips
> Yes, but "Q" will subsequently log you off the system in UV, even if at
> the select list

Personally, I find Q so annoying that I take it out of the VOC where
possible.  I am forever quitting out of one page reports and finding I have
just logged myself out.

I also take out P as the shortcut for HUSH.  I'm sure most users have at
some time mistyped an ED command, not looked at the error and gone on to
type P.  OK, it's easy to reverse this one but on the rare occasion that I
want to use HUSH, I'll type the full command.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] Ever wondered how something works...

2004-03-04 Thread Martin Phillips
>  From experience (including from this thread) I'd say that the list is
> not kept unless there is a K.

Absolutely right!  The definition is that termination of a command clears
any default select list  unless the K processor mode is set in the VOC
record.  Many years ago, I wrote a command whose whole job was to create a
select list.  Having come from the world of PI/open, it took me ages to
uncover why the list never seemed to be there.

Incidentally (Sorry Chuck, I'm at it again), I have come across one user who
thought CS was a shortform for CLEARSELECT and reported it as a bug that it
cleared the screen.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Phantom process.

2004-03-04 Thread Martin Phillips
Firstly, I assume that ID.RECORD is assigned somewhere.

Secondly, do you have errlog enabled?  If so, take a look in there for any
UV errors that might have terminated your process.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

- Original Message - 
From: "Wade Sailor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 9:41 AM
Subject: Phantom process.


> Hi,
>
> I have written a program which run as a Phantom.
>
> PROGRAM TEST
> CONDITION = 0
> LOOP
> UNTIL CONDITION DO
> READ R.RECORD FROM F.FILE, ID.RECORD ELSE NULL
> LOOP
> UNTIL R.RECORD<1> = '' DO
> 
> DEL R.RECORD<1>
> REPEAT
> SLEEP 60
> <>
> REPEAT
>
> Then I will run it as
> >EXECUTE TEST
>
> Sometimes, the process does nothing.
> If I check the process at UniVerse level, it shows as running. But at the
> Unix level the process got killed. Is there any setup at Unix server level
> like TIMEOUT where I have to look at.
>
> Thanks.
>
> Wade.

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: UV losing print characters

2004-03-03 Thread Martin Phillips
The most common cause of this in my experience is incorrect use of flow
control with serial printers.

For the non-techies (are there any on this list?)  Your UV system can
probably produce data faster than the printer can handle it so it needs a
way to say "stop!".  There are fundamentally two techniques in use though
there are variants.

The first technique uses one of the wires in the printer cable (DTR - Data
Terminal Ready), to say stop/go.  The other technique sends a character
(X-OFF, Ctrl-S) from the printer to the computer to say stop and (X-ON,
Ctrl-Q) to say go.  (If you've ever wondered why this works on most terminal
output processes, they often do the same).

If your computer is set up to use DTR but your printer is expecting to use
X-OFF/X-ON, the system is not going to stop sending data when required and
you lose characters.  Obviously, the same happens if the settings are the
other way around too.

A variation on this which is more difficult to find is that not some low
cost serial cables don't have a DTR wire.  So, you printer says stop but
this never gets to the other end of the cable.

You say that this is an infrequent problem.  Although that makes this sort
of scenario less likely, it can still happen because many modern printers
have buffers large enough to hold quite big print jobs.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

- Original Message - 
From: "gerry simpson" <[EMAIL PROTECTED]>
Subject: UV losing print characters


> a client has reported that they are randomly & infrequently having
> characters dropped from print jobs.
> this recently happened during an invoice run where a tax value of 1147.90
> was printed as 117.90 - the invoice total printed correctly, the invoice
> data on file has the correct value and a reprint shows the correct value.
>
> I am thinking that this is
> - a problem with the printer in question ( i am not yet sure if this
is
> a single printer issue or not )
> - a problem with a network connection
> - an issue to be raised with either IBM or HP
>
> has anyone seen this happen before ?
>
> gerry

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] Variable never assigned a value warning

2004-03-03 Thread Martin Phillips
Marco,

The easy answer is no.  This would require the compiler to establish all
possible paths through a program and determine whether it was possible to
arrive at any place that uses a variable without setting it first.  Although
some compilers (many C compilers for example) make a good attempt at this,
there are always cases that cannot be resolved.

As a very simple example, consider the following:

BEGIN CASE
   CASE A = 1
   B = 'Apple'
   CASE A = 2
   B = 'Orange'
   CASE A= 3
   B = 'Banana'
END CASE
DISPLAY B

Clearly, if A is not 1, 2 or 3 B will not be assigned when we get to the
DISPLAY statement.  But, the compiler cannot treat this as an error/warning
because the author of the program may know that A can only have these
values. We do not want to have to set variables explicitly for cases that
cannot happen.

Incidentally, I find the worryingly common practice of setting all variables
to zero / null at the top of a program very annoying as it hides the very
useful unassigned variable trap, leaving you thinking your program works
when actually it doesn't  I am told that a UV user somewhere has asked for
this trap to be optional.  I wouldn't like to try to support their code!

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

- Original Message - 
From: "Marco Manyevere" <[EMAIL PROTECTED]>
Subject: [UV] Variable never assigned a value warning


> Hi All,
>
> Is it technically or theoretically possible for the BASIC compiler (or any
other compiler for that matter) to catch (during compilation) all the
situations that might result in the use of unassigned variable at runtime
within the scope of the subroutine being compiled? Under what circumstances
does the compiler catch or fail to catch such situations?

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] Recursive GOSUB

2004-03-01 Thread Martin Phillips
Yes, you can do GOSUB's recursively.  Most often it happens by accident and
you hit the limit (256?) of GOSUB depth.

The only problem is that internal subroutines do not have local variables so
the second call is using the same variables as its parent.  If this is a
problem, using dynamic arrays to stack the necessary items is quite neat.

Be sure to document thoroughly what you are doing in the code or you will
open up a whole new area for disasters when someone comes to modify the
routine in the future.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

- Original Message - 
From: "Marco Manyevere" <[EMAIL PROTECTED]>

> Can a UV GOSUB directly or indirectly refer to itself? Something like so:
>
> LABEL:
>
>IF (SOME.CONDITION) THEN GOSUB LABEL
>
>RETURN

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Universe File Corruption

2004-03-01 Thread Martin Phillips
To add to JJ's response...

The UV Internals course is 5 days:
Day 1: The internal architecture. The content of the UV account and what you
can do by tweaking some of the files in it. The interfaces in/out of UV.
Day 2: The shared memory areas. Diagnostic tools for examining these areas
to find out what is going on.  Locking mechanisms (very detailed).
Day 3: The file system. How it works on the inside. Loads of detail about
how records are stored and located. Looks at all the different file types.
Alternate key indices.
Day 4: The file system. What goes wrong when it doesn't work. Performance
tuning. Fixing corrupt files.
Day 5: The UV run machine. How to make you applications work with UV instead
of fighting against it. The spooler.

Location: As JJ says, for UK clients it's normally at Staines though on-site
is available.

Cost: Check the IBM web site or call their training department
(020-8818-1169).

My involvement is that I deliver this course for IBM.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Universe File Corruption

2004-02-27 Thread Martin Phillips
I keep pushing it but

The UniVerse Internals course teaches you how to repair files for yourself.
The cost of the course is far lower than IBM's standard minimum charge for
fixing a file for you so it's money well spent.

The next Internals course in the UK is scheduled for the week starting 15
March but will only run if there is sufficient interest.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [OT] Making Linux bootable CD

2004-02-24 Thread Martin Phillips
Jeff,

Thanks for the solution to my woes.  I think I rather like Dawn's suggestion
but I'll got with yours.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


[OT] Making Linux bootable CD

2004-02-24 Thread Martin Phillips
OK, I give up.  Someone out there must have done this and have the
answer

I need to set up a new Linux system.  I have downloaded the five RedHat 8.0
.iso CD image files.  I now need to make a set of bootable CDs.  Everything
on the RedHat web site starts from the assumption that your CD writer is on
a running Linux system.  Mine isn't.  It's on a Windows 2000 system.  I have
Roxio Easy CD Creator 5 which has an option to write bootable CDs.

RedHat suggest using cdrecord.  This in turn requires CygWin.  I downloaded
this but the instructions don't work because the commands they use aren't
there.  I want to do the job with my existing Easy CD software.

I have spent the entire day trying to do this.  I will be forever grateful
to anyone who can email me the steps to make these CDs.  Unless you think it
is worth publishing to the whole group, please email it to
[EMAIL PROTECTED] to reduce off topic mailings.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Recommended education

2004-02-24 Thread Martin Phillips
Cyndi,

Where in the world are you?

Ladybridge Systems deliver a comprehensive set of UniVerse and Unidata
training courses in the UK and Europe.  We also deliver most of IBM's
training for these products in the UK. See www.ladybridge.com for more
information.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] paragraph labels

2004-02-20 Thread Martin Phillips
This is just plain, simple bad programming.  In a paragraph, jumping to an
undefined label terminates the paragraph.  It is totally unsafe to use this
as a nifty way to end because someone might later add the label for some
other meaning in the same paragraph.

In a Basic program, as one responder showed, you get a compilation error.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: COUNT modifying unix timestamp

2004-02-17 Thread Martin Phillips
Apologies if I missed anyone already giving this explanation...

> The other thing, of course, which timestamp? Date modified, or date
> accessed? Are you sure your client isn't looking at the wrong one?

UniVerse file system revision 12 which came in at release 9.5 includes a
count of records in the file header for use by uvbackup and uvrestore.  This
is updated by COUNT and by uvbackup itself (perhaps other places too).

Maybe it's time for another plug for the UniVerse Internals course where
these things get discussed???

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Hashing Algorithm

2004-02-13 Thread Martin Phillips
> When HASH.HELP became robust enough I quit using my program as I couldn't
> justify the development time/effort.  Instead I wrote a front-end which
> generated paragraphs consisting primarily of HASH.HELP %filename%
> statements.  The paragraphs included COMO statements, and the final
> statement ran a program to interpret the output from the HASH.HELP and
> execute an appropriate RESIZE command.

Many users do this.  But beware that HASH.HELP is not perfect.  There is one
bug, for example, that we exploit in an example in the UK UniVerse training
courses, where HASH.HELP gets it hopelessly wrong but which is easy to fix
by hand.

Personally, I am a great believer in dynamic files.  About five years ago I
did a migration from PI/open to UniVerse for a site with over 13000 files.
There was absolutely no way that I was going to do file calculations for all
of those so I made the lot dynamic and said that I would tune up any that
presented performance problems.

I visited the site last week.  They are still overjoyed with performance,
have spent absolutely NO time on file tuning, and have experienced no
problems with these files.  Of course, I have lost a good source of income
providing a regular file tuning service!

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Hashing Algorithm

2004-02-13 Thread Martin Phillips
> Why not? .. I'd bet on simple (or not so simple) curiousity .. Aren't we
all
> pretty much tech geeks here? .. Maybe he wants to see the hashing
> mathematics for himself and then check out a high speed data structures
book
> and see if they're all they're cracked up to be ..

I have the algorithms (from a legal source long before IBM acquired the
product) but because they are now secret I cannot divulge the details.  They
are, however, extremely simple except for the dynamic algortihms which are
rather more exciting.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Hashing Algorithm

2004-02-13 Thread Martin Phillips
> Could anyone let me know where can I found information about
> the way the Hash Algorithm Works with each one of the File Types
> in UniVerse?

As Ray says, these are no longer considered to be public.  However, the
dynamic file algorithms come straight out of a computing text book and it is
not difficult to work out the static file algorithms by a carefully chosen
set of file modulo and id combinations.

It does, of course, lead to the question of why you want to know!


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] VARIABLE<-1> = "" and BasicCompile"$OPTIONSEXTRA.DELIM"work "consistently"

2004-02-03 Thread Martin Phillips
Mark,

> ...the use of a MV counter either derived or managed is clearly the best
solution...

Some interesting performance figures...

X has 100 fields (I cannot remember how big they were for this test)

X<-1> = 'A'  takes 100 time units
X := @FM : 'A'takes 150 time units
X<101> = 'A'   takes 9320 time units
X = X : @FM : 'A'   takes 9010 time units

Perhaps, sometimes, X<-1> is a winner!

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

___
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Recent issues

2004-02-03 Thread Martin Phillips
Just to add my few cents worth to a couple of recent issues...

X<-1> = '' works exactly as it has been defined to work for the last 35
years!
One of the things about not (originally) having the concept of an SQL style
null item is that you cannot tell the difference between an empty list and a
list with one null entry.  It is trivial to program around this once you
recognise the problem.


X = '123' + '456' performs an arithmetic calculation.
This is absolutely fundamental to how UV/Udt work.  I have lost the original
mail that started this thread but I recall it was being blamed on a
particular release of UV.  If this didn't work, nothing would work so it
must be more subtle than that.

Although we think of UV Basic as being a typeless language, it isn't.  There
are actually around a dozen data types inside the product. All operators
look at the data they are working on and, where appropriate, transform it to
the correct type.  The addition operator (and all other arithmetic
operators) will try to convert character string data to numeric form.  If
the conversion is successful, the addition takes place.  If not, you get the
"non-numeric data where numeric required" message.

The entire product relies on this translation taking place.  For example, if
you ask a user to type in a number it will actually be stored as a character
string.  Each use of the data as a number will transform it.  Whilst this is
no problem if we only use the data infrequently, a loop that does the
conversion hundreds of thousands of times will do the conversion each time:

INPUT CT (user types 100)
FOR I = 1 TO CT

NEXT CT

This will convert CT for every iteration of the loop.  It gets worse if you
use CT many times in the loop too.  For this reason, programmers sometimes
force a data conversion with the apparently pointless "add zero" statement:

INPUT CT (user types 100)
CT = CT + 0
FOR I = 1 TO CT

NEXT CT

The extra statement takes CT as a string, adds 0 to it forcing a conversion
and stores it as a number.  The loop then goes faster.  I once worked on an
application where getting the data types optimised in this way made the
program go over 1 times faster!


In my work I encounter many UV/Udt users and get to see many different
applications.  I find it amazing how little some programmers understand
about the product they are using.  The questions raised on this list are
sometimes so simple that it makes me wonder if the users concerned have
actually ever looked at the documentation or been on a training course.  By
way of a quick advert, my company (Ladybridge Systems) offer UV/Udt training
in the UK and parts of Europe.  IBM have courses that are delivered
worldwide (by us in the UK).  I know I have plugged it before but I strongly
recommend the UniVerse Internals course for those who really want to get a
deep understanding of how this system works.  Sadly, there is no equivalent
for Unidata.  The programming courses are great fun and address many issues
like the ones discussed above.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

___
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: SELECT NOT WORKING [uv 10 - unix]

2004-02-02 Thread Martin Phillips
I suspect that since TYPE is a mutlivalued field, some records have CREDIT
in one value and something else in another value.  Given that every record
meets the TYPE # "CREDIT" condition, I would take a careful look at the data
to see if there is a stray value mark in every record resulting in an
apparent extra value.

The WITH clause says at least one element must meet the condition.  The WITH
EVERY clause may help depending on what you are trying to do.

Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200

- Original Message - 
From: "George Gallen" <[EMAIL PROTECTED]>
To: "'Ardent List'" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 9:41 PM
Subject: SELECT NOT WORKING [uv 10 - unix]


> OKWhat gives.
>
> GET-LIST MYLIST
>
> 253 ITEMS SELECTED
> >SELECT FILE WITH TYPE # "CREDIT"
> 253 ITEMS SELECTED
> >
>
>
>
> BUT
>
> GET-LIST MYLIST
>
> 253 ITEMS SELECTED
> >SELECT FILE WITH TYPE = "CREDIT"
> 10 ITEMS SELECTED

___
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users