RE: [U2] U2 & XML

2004-06-18 Thread djordan
Mike

The xml interface in U2 can process xml data in a variable through a Basic
program.  This would allow you to do it on the fly.

Was there other issues related to this.  Any comments would be valuable
feedback to IBM engineers, if you could post it on the U2canXML forum on the
www.u2ug.org site.  

Regards

David Jordan

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Rajkowski
Sent: Wednesday, 16 June 2004 12:17 AM
To: [EMAIL PROTECTED]
Subject: RE: [U2] U2 & XML


Like Mark, we are using UOJ to send and receive the XML to UniVerse.  We
ended up developing our own routines, to get a better response.  We have the
need for near real time access, in our J2EE environment, and utilize XML in
the web app as well as the means to communicate to the UniVerse Back end.

Interesting enough, we are using DB2 for our Cache Database, and a common
XML schema for both databases.  Updates are sent to Universe, and then the
change is replicated back to the DB2 Cache.  

( Over simplification, but the point is that we needed a way to process the
XML quickly, and saving it to disk before processing was to resource
intensive )

Mike
---
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/


RE: [U2] modelling tool

2004-06-18 Thread Ross Ferris
You can do a reasonable job with pretty well any UML based tool I'd think ... Rational 
Rose springs to mind, but there are other options that are lighter on the wallet !

Ross Ferris
Stamina Software
Visage - an Evolution in Software Development


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:owner-u2-
>[EMAIL PROTECTED] On Behalf Of Bjvrn Eklund
>Sent: Saturday, 19 June 2004 1:53 AM
>To: '[EMAIL PROTECTED]'
>Subject: [U2] modelling tool
>
>Hi,
>are there anyone out there using a modelling tool for their MV-databases.
>We
>are looking for a tool with which we can document our database. I' ve only
>seen tools for databases like Oracle and MS Sql server.
>
>TIA
>Bjvrn Eklund
>---
>u2-users mailing list
>[EMAIL PROTECTED]
>To unsubscribe please visit http://listserver.u2ug.org/
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.707 / Virus Database: 463 - Release Date: 15/06/2004
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.707 / Virus Database: 463 - Release Date: 15/06/2004
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] .Net Provider for Unidata or Universe

2004-06-18 Thread Ross Ferris
Not related

Ross Ferris
Stamina Software
Visage  an Evolution in Software Development


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:owner-u2-
>[EMAIL PROTECTED] On Behalf Of Tom Firl
>Sent: Friday, 18 June 2004 1:25 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [U2] .Net Provider for Unidata or Universe
>
>> I've heard of MUMPS and interviewed at a hospital were that
>> was used. Was
>> that written in U2 ... Mumps was a DEC implementation?
>>
>
>My understanding is that MUMPS/Cache is somehow related to Revelation.  I
>don't know if that's true or not, just one of those things a long-time MV
>programmer mentioned the other day...
>
>Tom Firl
>Columbia Ultimate
>---
>u2-users mailing list
>[EMAIL PROTECTED]
>To unsubscribe please visit http://listserver.u2ug.org/
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.707 / Virus Database: 463 - Release Date: 15/06/2004
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.707 / Virus Database: 463 - Release Date: 15/06/2004
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Gyle Iverson
Ray Wurlod opined:
>Personally, I love this syntax.  When training others, I 
>usually explain it in this form; READNEXT has to generate a 
>true/untrue value of some kind to determine whether to go down 
>its THEN or ELSE path.  We take advantage of that "Boolean 
>context" to trigger the behaviour of WHERE or UNTIL in a 
>looping context.
>
>READNEXT is not the only statement that exhibits this 
>behaviour.  Almost any statement that has THEN/ELSE can use 
>it.  But READNEXT, READSEQ/READBLK are the most "sensible". 
[snip]
>It would be nice were there a section in the BASIC manual 
>about the Boolean context of certain statements, but that's 
>only a minor complaint.  Of course, each statement syntax that 
>appears to make at least one of THEN or ELSE mandatory would 
>need a note referring to this section.

Hello, Ray.

We can agree that the syntax has a certain appeal, yet finding a practical
use for such has always escaped me in real applications for anything but
READNEXT. Why? The syntax precludes handling of ON ERROR or LOCKED clauses. 

Never mind that the READNEXT, READSEQ and READBLK statements should [but do
not] have an ON ERROR clauses. After all, files may be damaged or networks
may be interrupted. I assume your "sensible" reference would not be so if
these statements should later support such a clause.

Writing robust, recoverable, error-tolerant code precludes taking the
approach that a file I/O statement may have only a THEN or ELSE condition.
Perhaps if there were a structured exception mechanism within BASIC one
could safely use such syntax, but I discourage its use for anything but
simple one-time utility programs.

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


RE: [U2] inserting European format dates using SQL

2004-06-18 Thread Rosenberg Ben
ICONV code "DDMY" (and variations such as "DDMAY" or "DDMY2-")
will always convert European-style dates correctly,
no matter what your local settings are.

Define an attribute alias with conversion code DDMY
and use that alias definition for your input data.
--


The information contained in this e-mail message may be privileged 
and confidential information and is intended only for the use of 
the individual and/or entity identified in the alias address of 
this message.  If the reader of this message is not the intended 
recipient, or an employee or agent responsible to deliver it to the 
intended recipient, you are hereby requested not to distribute or 
copy this communication. If you have received this communication in 
error, please notify us immediately by telephone or return e-mail and 
delete the original message from your system.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Senior Pick Programming Position - Centennial, CO

2004-06-18 Thread William Lockwood
Trust Company of America, a leading provider of financial services nationwide,
has an immediate opening for a Senior Multivalue Database Programmer /
Analyst.

The ideal candidate for this position will have broad knowledge of multi-value
database architecture and management.  You will work as a member of a team to
design, develop and implement an IBM UniVerse multi-value database system for
the data repository to provide responsive outsourcing solutions to independent
Investment Advisors.  You will be an integral member of a team to
re-architecture, development, and migration of legacy systems to J2EE
architecture utilizing Java and providing our customers the ability to manage
their accounts and trade efficiently.

Requirements for this position include:
-  Thorough understanding and knowledge of the software development life cycle
(SLDC), with the proven ability able to follow development and coding
standards.
-  Extensive software generation (actual coding) and troubleshooting analysis
experience.
-  Demonstrated ability to design, code, integrate, test, and document
software in a rapid prototype approach, incorporating new functionality as
required.
-  Proven problem solving and analytical abilities and experience
troubleshooting / debugging complex software.
-  Excellent English communication skills with both technical and
non-technical personnel.
-  Proven record of the tactical delivery of complex, mission-critical
software development projects.

Technical Expertise:  More than 5 years experience in multi-value database
programming.  Extensive knowledge of Pick Basic language and the IBM UniVerse
database (or equivalent experience with similar multi-value databases.
Experience with documentation of UniVerse flow diagrams, UniVerse paragraphs,
and high-level integrated documentation of system processes. Knowledge of Java
/ J2EE and open source programming environments is a plus.

BS in Computer Science or related degree and / or equivalent experience.
Experience in the finance / financial services industries a plus.

Trust Company of America is proud of our corporate culture built on the
principles of Integrity, Teamwork, Service, Innovation, and High Expectations.
We are dedicated to providing services to meet the needs of our customers in a
rapidly changing and highly regulated market.

We offer a minimum travel, a competitive compensation package, and a
comprehensive benefits package including health and dental care, 401(k),
flexible benefits, vacation and paid time off, and educational assistance.

Relocation will not be considered - we are seeking a local candidate.

Please send resume and qualifications to [EMAIL PROTECTED]
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] ODBC Error

2004-06-18 Thread Ray Wurlod
Also check the database privilege of the user ID that you used.
UniVerse SQL privileges do differentiate user, machine\user and domain\user unless 
these are matched in the UV.LOGINS file (which you can maintain from the Administrator 
client).\

- Original Message -
From: Bjvrn Behr <[EMAIL PROTECTED]>
Date: Tue, 15 Jun 2004 10:21:43 +0200
To: <[EMAIL PROTECTED]>
Subject: [U2] [UV] ODBC Error

> UV System: UniVerse 10.0.4
> O/S : Windows 2000
> 
> Yesterday our ODBC connection to UniVerse worked, when we tried again
> This morning, it did not. It keeps coming up with this error:
> 
> Error ID: 23 Severity: ERROR Facility: DBCAPERR - User does not have
> Permission to execute this SQL statement.
> 
> (I was connecting on as Administrator at the time)
> 
> When I looked into our system log, I got this:
> 
> Event Typt:   Information
> Event Source: SceCli
> Event Category:   None
> Event ID: 1704
> Date: 2004/06/14
> Time: 21:51:33
> User: N/A
> Computer: BART
> Description:
> Security policy in the Group policy objects are applied successfully. 
> 
> Nobody we know updated any poilcies.
> 
> Any help would be great.
> 
> Regards
> Bjorn Behr
> Programmer
> 
> HYFLO Southern Africa (Pty) Ltd
> Tel : +27 11 386 5800
> Fax : +27 11 444 5391
> Mail: [EMAIL PROTECTED]
> WWW : http://www.hyflo.co.za 
> 
> "In the beginning, the universe was created.
>  This made a lot of people very angry, and
>  has been widely regarded as a bad idea."
>  - Douglas Noel Adams (1952-2002), British author
> 
> ---
> 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/


Re: [U2] [UV] ODBC Error

2004-06-18 Thread Ray Wurlod
Check the table privileges on the table(s) referred to in the SQL statement.
LIST.SICA tablename
or generate a query on the CATALOG tables (UV_TABLES, UV_USERS particularly).

- Original Message -
From: Bjvrn Behr <[EMAIL PROTECTED]>
Date: Tue, 15 Jun 2004 10:21:43 +0200
To: <[EMAIL PROTECTED]>
Subject: [U2] [UV] ODBC Error

> UV System: UniVerse 10.0.4
> O/S : Windows 2000
> 
> Yesterday our ODBC connection to UniVerse worked, when we tried again
> This morning, it did not. It keeps coming up with this error:
> 
> Error ID: 23 Severity: ERROR Facility: DBCAPERR - User does not have
> Permission to execute this SQL statement.
> 
> (I was connecting on as Administrator at the time)
> 
> When I looked into our system log, I got this:
> 
> Event Typt:   Information
> Event Source: SceCli
> Event Category:   None
> Event ID: 1704
> Date: 2004/06/14
> Time: 21:51:33
> User: N/A
> Computer: BART
> Description:
> Security policy in the Group policy objects are applied successfully. 
> 
> Nobody we know updated any poilcies.
> 
> Any help would be great.
> 
> Regards
> Bjorn Behr
> Programmer
> 
> HYFLO Southern Africa (Pty) Ltd
> Tel : +27 11 386 5800
> Fax : +27 11 444 5391
> Mail: [EMAIL PROTECTED]
> WWW : http://www.hyflo.co.za 
> 
> "In the beginning, the universe was created.
>  This made a lot of people very angry, and
>  has been widely regarded as a bad idea."
>  - Douglas Noel Adams (1952-2002), British author
> 
> ---
> 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/


RE: [U2] maximum UniVerse file size

2004-06-18 Thread Ray Wurlod
32-bit or 64-bit is returned in the array generated by the STATUS statement in BASIC, 
as well as the other methods already mentioned.

If you attend the UniVerse Advanced Technologies class (formerly UniVerse Internals), 
the use of filepeek - together with some documentation - is given.  As far as I know 
there is no manual that describes filepeek; I guess it's regarded by VMARK and its 
successors as a support analyst's tool.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] inserting European format dates using SQL

2004-06-18 Thread Ray Wurlod
How are the Regional Settings configured on the PC where the VB app is running?
If English(US) try changing to English(Australia).  (This is managed through Windows 
Control Panel.)
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Ray Wurlod
Personally, I love this syntax.  When training others, I usually explain it in this 
form; READNEXT has to generate a true/untrue value of some kind to determine whether 
to go down its THEN or ELSE path.  We take advantage of that "Boolean context" to 
trigger the behaviour of WHERE or UNTIL in a looping context.

READNEXT is not the only statement that exhibits this behaviour.  Almost any statement 
that has THEN/ELSE can use it.  But READNEXT, READSEQ/READBLK are the most "sensible". 
For example, to process an entire input file:
LOOP
WHILE READSEQ line FROM f
   GOSUB processline
REPEAT

I don't find it difficult to read; FORMAT indents it correctly (which suggests that 
it's legal syntax).  

It would be nice were there a section in the BASIC manual about the Boolean context of 
certain statements, but that's only a minor complaint.  Of course, each statement 
syntax that appears to make at least one of THEN or ELSE mandatory would need a note 
referring to this section.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Allen E. Elwood \(CA\)
Hi Mark,

I'll have to fire up the machine in the back room and grab some source code
off of that...  I have to put it back together first - had to use it as a
test box when I built my last PC and never got it slapped back together.

But basically from memory it's something like:
GOSUB OPEN.AND.INIT
IF NOT(ERROR) THEN
  GOSUB DO.IT.ALREADY
END
GOSUB PRINT.GRAND.TOTALS
GOSUB FINISH.UP
STOP
DO.IT.ALREADY:*
PERFORM 'SELECT SOD BY CUSTOMER BY DIVISION'
SELECTED = @SYSTEM.RETURN.CODE
IF SELECTED < 1 THEN
  PRINT 'Do!'
  RETURN
END
FIRST = 1
LOOP
  READNEXT SOD.ID ELSE
GOSUB PRINT.CUSTOMER.TOTALS
GOSUB PRINT.DIVISION.TOTALS
EXIT
  END
  GOSUB READ.ORDER.LINE
  IF ERROR OR NOT.OPEN.LINE THEN CONTINUE
  IF FIRST THEN
FIRST = ''
SAVED.CUST = CUSTOMER
SAVED.DIVISION = DIVISION
  END
  GOSUB ADD.TO.GRAND.TOTALS
  IF SAVED.CUST = CUSTOMER THEN
GOSUB ADD.TO.CUSTOMER.TOTALS
  END ELSE
GOSUB PRINT.CUSTOMER.TOTALS
SAVED.CUST = CUSTOMER
GOSUB ADD.TO.CUSTOMER.TOTALS
  END
  IF SAVED.DIVISION = DIVISION THEN
GOSUB ADD.TO.DIVISION.TOTALS
  END ELSE
GOSUB PRINT.DIVISION.TOTALS
SAVED.DIVISION = DIVISION
GOSUB ADD.TO.DIVISION.TOTALS
  END
REPEAT
RETURN

EASY AS PIE! (3.14159)  ;-)

Important to note that the clearing of the total variables is at the end of
the printing during the controlled break.  Also important is that after
printing totals, and clearing the total vars, that the saved customer or
saved division is 'bumped up' to the current value, and then after that they
current record gets added to the totals so as to not loose any data.

The order of processing the lowest level sub-set is necessary as that is how
it is to appear on the report, i.e. lines of customer totals, followed by a
division total, and then more customers and divisions until the grand.  Note
that we also want to print the customer and division totals after the last
record or the last customer and division will never make it to the report.

Of course it's always nice to throw in a screen graph for big files so users
can see how long a coffee break to take

This style is directly from the book I mentioned and is referred to as
"Controlled Break" processing.

I'm shutting down early for the day, since I like to get a early start on
the weekends.  Gonna go marinate a nice usda choice sirloin, and get that
grill warmed up  :)

*=aee=*

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Friday, June 18, 2004 7:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UV] WHILE READNEXT id DO


Was the new release an OS or application level. The OS should have had no
problem.

My MVquery example is certainly do-able at TCL. I would like to see it in a
LOOPed environment, verbatim. Usually reports get so complex that they
exceed the query level and have to be done at the program level. We all know
when we turn that corner of exceeding the query level on a report's design.

thanks.

- Original Message -
From: "Allen E. Elwood (CA)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:57 PM
Subject: RE: [U2] [UV] WHILE READNEXT id DO


> Hi Mark,
>
> GOTO-phobia (love that term :-) Don't know about you, but I have seen
> programs that were 5000 lines long, filled with goto's that needed
upgrading
> to fit a new release and required hundreds of hours to upgrade instead of
> 20.  When done, they became very 'quirky' and impossible to debug.
Finally
> after user complaints, 400 hours were invested to completely rewrite.  And
> at $175 per hour, 400 hours is a big loss to a software house - "blood on
> the highway" as the owner used to say. So whereas goto's are not 'bad',
bad
> programming is VERY bad.
>
> Usually with sorts I just form the key that defines the break-points after
> every read.  The first time through you prime the key and kill the first
> flag, after that when the key changes you print the totals, set the key to
> the value that caused the break, clear the totals while adding to the
grand
> total(s) and then add the values for the current record to the just
cleared
> totals and voila.  Done deal !  Nest this logic and you can do
> multi-sort-breaks.  I learned this method very well as before I came to
the
> Pick community (as it *used* to be called) I was working on a system that
> had no query language.  And the CEO was a big believer in sales analysis
> reports of every imaginable sorts.  Plus, every once in a while you run
into
> someone that wants the a column for "This division sales percent of the
> territory total" and "This territory sales percent of the Grand Total",
etc.
> which are pretty much impossible without programming.
>
> That said, I still believe in using Uniquery for reports as much as
> possible.  Keep is simple whenever possible!
>
> But, really when you get down to it, it just doesn't really matter how you
> get something done.  It's the analytical mindset, business experi

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Jefferson, Jim
And ol' Arev has this feature as a query option:

LIST FILE BY THIS BY THAT BREAK-ON THIS TOTAL SOMETHING (X)

With the option "X", you are prompted for a file name and record id, and the source 
code is written there.  Sort of funky-looking, though...  Don't know if they carried 
it over into OpenInsight.

Jim


At 01:07 PM 6/18/2004, you wrote:
>I've always thought it would be cool if some Pick vendor would create a verb
>like MAKE.BASIC

Funny you say this.   Ever heard of the ancient utility called REPORT-GEN 
by Interactive Systems in Phoenix?  I'm not sure if that place is still in 
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Glenn Herbert
At 01:07 PM 6/18/2004, you wrote:
I've always thought it would be cool if some Pick vendor would create a verb
like MAKE.BASIC
And you could say
MAKE.BASIC SELECT CUSTOMER WITH LAST.NAME = "JOHNSON" BY STATE BREAK-ON STATE
TOTAL COUNTER
And it would take the statement and turn it into a BASIC program (not just
using EXECUTE you slackers).  That way for particularly thorny problems, you
could have a template that you then modified to do something unusual that you
couldn't figure out how to do in straight query language.
Funny you say this.   Ever heard of the ancient utility called REPORT-GEN 
by Interactive Systems in Phoenix?  I'm not sure if that place is still in 
business, but I actually have source code from this utility that does 
exactly as you stated; you start the utility, enter all the portions of 
your statement and when done, it generates nifty BASIC code, albeit circa 1984.

Some may not like this code, as its a fine example of how NOT to use 
GOTO's!  Here's a snippet from within the code (total of 674 lines of this!!):

PRINT CMSG:"DO YOU WANT TO HDR-SUPP? (Y OR N): ":
INPUT HDRSUPP
IF HDRSUPP = "?" THEN GOTO 100620
IF HDRSUPP = "^" THEN GOTO 610
IF HDRSUPP = "^^" THEN GOTO 10
IF HDRSUPP # "Y" AND HDRSUPP # "N" THEN GOTO 620
GOSUB 8000
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Donald Kibbey
No, show me the code first!  :-)

At any rate Mark, I have never seen a problem using GOTOs that I couldn't 
re-create without using GOTOs.  But I think what you're really after is someone 
to do this work FOR you.  So show me the purchase order first ...

Will Johnson
Fast Forward Technologies
---
u2-users mailing list
[EMAIL PROTECTED] 
To unsubscribe please visit http://listserver.u2ug.org/


Don Kibbey
Financial Systems Manager
Finnegan, Henderson, Farabow, Garrett & Dunner LLP
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread FFT2001
In a message dated 6/18/2004 7:24:43 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:


> And actually, I would like to see this break-on situation done without
> GOTO's. I've developed a routine that's nice and tidy for any number of
> break-on levels and I'd like to learn a different way.

I've done it Mark, it's possible.  In fact I once worked for a small shop 
that actually had a skeleton program that did this, and they just copy the 
skeleton, filled in the blanks as required, and compiled it as a new program.

I've always thought it would be cool if some Pick vendor would create a verb 
like MAKE.BASIC
And you could say
MAKE.BASIC SELECT CUSTOMER WITH LAST.NAME = "JOHNSON" BY STATE BREAK-ON STATE 
TOTAL COUNTER

And it would take the statement and turn it into a BASIC program (not just 
using EXECUTE you slackers).  That way for particularly thorny problems, you 
could have a template that you then modified to do something unusual that you 
couldn't figure out how to do in straight query language.

At any rate Mark, I have never seen a problem using GOTOs that I couldn't 
re-create without using GOTOs.  But I think what you're really after is someone 
to do this work FOR you.  So show me the purchase order first ...

Will Johnson
Fast Forward Technologies
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] modelling tool

2004-06-18 Thread Björn Eklund
Hi,
are there anyone out there using a modelling tool for their MV-databases. We
are looking for a tool with which we can document our database. I' ve only
seen tools for databases like Oracle and MS Sql server.

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


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Mark Johnson
Was the new release an OS or application level. The OS should have had no
problem.

My MVquery example is certainly do-able at TCL. I would like to see it in a
LOOPed environment, verbatim. Usually reports get so complex that they
exceed the query level and have to be done at the program level. We all know
when we turn that corner of exceeding the query level on a report's design.

thanks.

- Original Message -
From: "Allen E. Elwood (CA)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:57 PM
Subject: RE: [U2] [UV] WHILE READNEXT id DO


> Hi Mark,
>
> GOTO-phobia (love that term :-) Don't know about you, but I have seen
> programs that were 5000 lines long, filled with goto's that needed
upgrading
> to fit a new release and required hundreds of hours to upgrade instead of
> 20.  When done, they became very 'quirky' and impossible to debug.
Finally
> after user complaints, 400 hours were invested to completely rewrite.  And
> at $175 per hour, 400 hours is a big loss to a software house - "blood on
> the highway" as the owner used to say. So whereas goto's are not 'bad',
bad
> programming is VERY bad.
>
> Usually with sorts I just form the key that defines the break-points after
> every read.  The first time through you prime the key and kill the first
> flag, after that when the key changes you print the totals, set the key to
> the value that caused the break, clear the totals while adding to the
grand
> total(s) and then add the values for the current record to the just
cleared
> totals and voila.  Done deal !  Nest this logic and you can do
> multi-sort-breaks.  I learned this method very well as before I came to
the
> Pick community (as it *used* to be called) I was working on a system that
> had no query language.  And the CEO was a big believer in sales analysis
> reports of every imaginable sorts.  Plus, every once in a while you run
into
> someone that wants the a column for "This division sales percent of the
> territory total" and "This territory sales percent of the Grand Total",
etc.
> which are pretty much impossible without programming.
>
> That said, I still believe in using Uniquery for reports as much as
> possible.  Keep is simple whenever possible!
>
> But, really when you get down to it, it just doesn't really matter how you
> get something done.  It's the analytical mindset, business experience and
> attention to details that really make a good programmer.  IMHO!
>
> Allen
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
> Sent: Thursday, June 17, 2004 5:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [U2] [UV] WHILE READNEXT id DO
>
>
> Very good question. Is BASIC Structured. And who defines the structures.
>
> I was on a phone interview with a prospective employer a few years ago and
> during that conversation he brought up the concept of GOTO's. I completely
> understand GOTO's (most on this forum are GOTO-phobic) and use them
> sparingly.
>
> That turned the tide of the interview. Despite my 20+ years (at that time)
> of MV programming, he couldn't get off the GOTO-less soapbox. Since the
> interview got a little pissy towards the end, I asked him if he ever drank
a
> beer. His yes answer then allowed me to label him an alcoholic as clearly
> alcoholics drink beer.
>
> Do GOTO's make one a poor programmer or do poor programmers use GOTO's.
I've
> seen a lot of GOTO-less code that is very sloppy with its over-use of
FLAGS
> to skirt around code sections. I've also seen well written code with a few
> GOTO's placed in appropriate places.
>
> This appears to be the semi-annual GOTO holy war. I'm capable of learning
so
> I would like for someone to offer me some code segments to perform the
> following MVquery statement as a true data/basic program:
>
> SORT CUSTOMER BY STATE BY CITY NAME BREAK-ON CITY BREAK-ON STATE TOTAL
> YTD-SALES
>
> I really would like to see how the other side programs this.
>
> thanks in advance.
>
> - Original Message -
> From: "Glenn Herbert" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 17, 2004 3:00 PM
> Subject: RE: [U2] [UV] WHILE READNEXT id DO
>
>
> > Is BASIC structured? :-p
> >
> > If your answer is yes, then the GOTO should probably not be allowed
> (except
> > in rare cases).
> >
> > If your answer is no, then GOTO away!! (caveat: if not abused!)
> >
> > As Yoda says:  GOTO is the evil not; incorrect the usage is!
> >
> > At 02:46 PM 6/17/2004, you wrote:
> > >You realize this does not conform to the ANSI structured programming
> > >principles?  I have a version dated 1982 and goto's are not allowed...
> > >
> > >Or was this just a joke?  In which case you certainly got me!  :-)
> > >
> > >-Original Message-
> > >From: [EMAIL PROTECTED]
> > >[mailto:[EMAIL PROTECTED] Behalf Of Simon Lewington
> > >Sent: Thursday, June 17, 2004 11:02 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: [U2] [UV] WHILE READNEXT id DO
> > >
> >

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Mark Johnson
I respond with the GOTO perspective when it's cast in an absolutely negative
light as in "My teacher failed us" or "Our Company will fire you if you use
a GOTO" kind of limited thinking. I stand by my beer/alcoholic analogy.

And actually, I would like to see this break-on situation done without
GOTO's. I've developed a routine that's nice and tidy for any number of
break-on levels and I'd like to learn a different way.

One can learn programming from a variety of sources: Academic, other peoples
code and system-level examples (DM,BP,). I've not run into these GOTO-less
environments everyone talks about in 25 years of perhaps 40 different
application systems. And yes, I've certainly seen enought bad use of GOTO's
to recognize its potential danger. But not in an absolute sense.

Thanks.
- Original Message -
From: "Ken Wallis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 9:32 PM
Subject: RE: [U2] [UV] WHILE READNEXT id DO


> Mark Johnson wrote:
>
> > This appears to be the semi-annual GOTO holy war.
>
> But only one side is fighting.
>
> Leave it alone Mark.  Nothing good came of it last time, and nothing good
> will come of it this time.  Those who believe GOTOs have their uses will
not
> be convinced otherwise by a thread on a mailing list like this, and those
of
> us who avoid GOTOs completely will similarly not change their mindset for
> you.
>
> > I would like for someone to offer me some code segments to perform the
> > following MVquery statement as a true data/basic program:
> >
> > SORT CUSTOMER BY STATE BY CITY NAME BREAK-ON CITY BREAK-ON STATE TOTAL
> > YTD-SALES
> >
> > I really would like to see how the other side programs this.
>
> Not that I intend to take this further Mark, but are you seriously trying
to
> imply that sorting, breakpointing and totalling cannot be done well
without
> using GOTO?
>
> Although I have trouble envisioning it, I'm confident that there is a
coding
> solution to this specific problem that makes use of GOTO, and I'm sure
that
> you have such a solution in mind.  Great.  If that makes you productive
and
> you clients happy, then I'm all for it.  Just so long as I don't have to
> consult at one of your client sites once you've retired.  My mind simply
> doesn't work that way.  I tend to think about iteration before I look at
> branches.  That drives me towards nested LOOPs and all sorts of structures
> in which GOTOs are, to my mind, both superfluous and dangerous.
>
> I don't want to get into this Holy War.  Time was when I'd have taken up
the
> cudgel, but it doesn't achieve anything when you are more than an arm's
> length away!  I'd rather disagree without becoming disagreeable.  Please
> simply take it as read that any problem that can be solved in BASIC using
a
> GOTO, can also be solved without using it.  Similarly, I assume that
> anything I can code a solution to has at least one equivalent solution
that
> involves a GOTO statement.
>
> Cheers,
>
> Ken
> ---
> 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/


[U2] RE: U2 Users Digest V1 #94

2004-06-18 Thread Tsombakos, John
Thanks for the help, but it didn't seem to make a difference. (Yeah, OS X is
BSD based)

I did
LANG=C ; export LANG

Than ran the java app, but it still shows CHAR(184) for sub-value marks.

-Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Tsombakos, John
> Now, here's the rub.. My initial testing is using Mac OS X. 
> But, when the
> routine returns a multi-valued item, the value of the SubValue (@SM)
> character is wrong, so I can't pull sub-values out of a 
> result. The Value
> mark (@VM) is correct (CHAR(253)). The SubValue mark is being 
> return in the
> string as a CHAR(184).

I've never used a Mac.  When you use UniObjects for Java on Linux, you
have to make sure to set the LANG environment variable to 'C' or the
same sort of thing happens.  Hope that's somewhat helpful, isn't OS X
somehow related to Unix?

- -- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread alfkec
This is what I got on UD 5.1.27 Win2K Dell Poweredge 2500 933Mhz server:
Ran one after the other, only user on the system.
TIME.READNEXT  
46  8712  READNEXT ELSE EXIT   
32  8712  WHILE 1  
32  8712  LOOP WHILE READNEXT ID DO
30  8712  GOTO 
:.X
TIME.READNEXT  
32  8712  READNEXT ELSE EXIT   
46  8712  WHILE 1  
31  8712  LOOP WHILE READNEXT ID DO
32  8712  GOTO 
:.X
TIME.READNEXT  
31  8712  READNEXT ELSE EXIT   
32  8712  WHILE 1  
31  8712  LOOP WHILE READNEXT ID DO
46  8712  GOTO 
:.X
TIME.READNEXT  
47  8712  READNEXT ELSE EXIT   
32  8712  WHILE 1  
31  8712  LOOP WHILE READNEXT ID DO
31  8712  GOTO 

Here is the code I ran - pretty much a cut-n-paste from the e-mails, I just
added the counter to give it something to do. Although it took me a minute
to figure out where to put it amid the GOTO's :).

OPEN 'TEST.FILE' TO TEST.FILE ELSE STOP
SELECT TEST.FILE
CTR = 0
START.CPU = SYSTEM(9)
LOOP
READNEXT ID ELSE EXIT
CTR += 1
REPEAT
END.CPU = SYSTEM(9)
CRT END.CPU-START.CPU:"  ":CTR:"  READNEXT ELSE EXIT"
CTR = 0
SELECT TEST.FILE
START.CPU = SYSTEM(9)
LOOP
WHILE 1 DO
READNEXT ID ELSE EXIT
CTR += 1
REPEAT
END.CPU = SYSTEM(9)
CRT END.CPU-START.CPU:"  ":CTR:"  WHILE 1"
CTR = 0
SELECT TEST.FILE
START.CPU = SYSTEM(9)
LOOP WHILE READNEXT ID DO
CTR += 1
REPEAT
END.CPU = SYSTEM(9)
CRT END.CPU-START.CPU:"  ":CTR:"  LOOP WHILE READNEXT ID DO"
CTR = 0
SELECT TEST.FILE
START.CPU = SYSTEM(9)
10 READNEXT ID ELSE GOTO 15
CTR += 1
GOTO 10
15 END.CPU = SYSTEM(9)
CRT END.CPU-START.CPU:"  ":CTR:"  GOTO"


>-Original Message-
>From: Mark Johnson [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 17, 2004 6:03 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [U2] [UV] WHILE READNEXT id DO
>
>
>Don't forget that the second set has the benefit of the first 
>set leaving
>some of the data in virtual memory, hence the second set would 
>have been
>longer.
>
>my 1 cent
>
>How about this on your similar UD system. Correct typing implied.
>
>OPEN MASTER ELSE STOP
>SELECT MASTER
>START=SYS9
>10 READNEXT ID ELSE GOTO 15
>GOTO 10
>15 END=SYS9
>PRINT END-START
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] relative speed of Retrieve SELECT vs Basic SELECT, LOOP READNEXT,READ.

2004-06-18 Thread Dennis Bartlett
What an open ended question... :0)

Ok, it depends...

(1) If run a second time they will both appear to run faster
(When you
first run either (1) or (2) the proggie will have to be
loaded into
memory, the second time around it'll still be there, plus
it's highly
likely the data will be too)

(2) does the file in (1) have an index on it? If so, (1)
will be faster,

UNLESS
file (1) has very few items in it, and the straight-thru
process is
able to process the file incl reads, before the select in
(1) is
complete.

Of course, the fact that (2) has the IO penalty of a read,
immediately
means it will be slower. However, if (2) had the field being
tested as
part of its key, the read would be unnecessary, and the
whole program
would thrash (1)...

UNLESS
you run (2) on a 386 and (1) on a RS6000... ok, so that's
being Friday
afternoon-ish...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 17 June 2004 09:45
To: [EMAIL PROTECTED]
Subject: [U2] relative speed of Retrieve SELECT vs Basic
SELECT, LOOP
READNEXT,READ.


"Stevenson, Charles" <[EMAIL PROTECTED]>
wrote: 
Which would you suppose is much faster: ...
  FOR I = 1 TO 100
 EXECUTE 'SELECT VOC WITH TYPE = "V" COUNT.SUP'
 LOOP WHILE READNEXT ID
NULL ;* GOSUB DO.STUFF
 REPEAT
  NEXT I
...
or
...
  OPEN 'VOC' TO F ELSE STOP
  FOR I = 1 TO 100
  SELECT F
  LOOP WHILE READNEXT  ID
 READ REC FROM F, ID THEN
IF REC[1,1]='V' THEN
   NULL ;* GOSUB DO.STUFF
END
 END
  REPEAT
...
Notice how much less work #2 (seemingly) does:
...
Method 2 takes 2 or 3 times as longer to run than Method 1.
It's not
because VOC is a special file. I've tried it on other files,
big and
small. ... 

It is my understanding that UniData (at least...don't know
about
UniVerse) cache's the SELECT in Method 1.  You can see this
from ECL by
timing a huge select, then CLEARSELECT, then re-issue the
original
select.  The second run will come back much quicker.

Also, Method 2 reads the block from the file and reallocates
the value
of "REC" for each iteration, while Method 1 reads each block
once and
parses for ID's.  Assuming 10-20 records per block
(recommended file
sizing from my UniData Admin trainer), that's a 10- to
20-fold savings
on disk reads.

--Tom Pellitieri
---
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/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread BNeylon
My fault, I should have mentioned the times were from the second run.  And 
when I switched the order the corresponding times also were the same.
I'll try your code when I get a chance.
Thanks
Bruce

Bruce M Neylon
Health Care Management Group 





"Mark Johnson" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
06/17/2004 08:02 PM
Please respond to u2-users

 
To: <[EMAIL PROTECTED]>
cc: 
Subject:Re: [U2] [UV] WHILE READNEXT id DO

Don't forget that the second set has the benefit of the first set leaving
some of the data in virtual memory, hence the second set would have been
longer.

my 1 cent

How about this on your similar UD system. Correct typing implied.

OPEN MASTER ELSE STOP
SELECT MASTER
START=SYS9
10 READNEXT ID ELSE GOTO 15
GOTO 10
15 END=SYS9
PRINT END-START
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] .Net Provider for Unidata or Universe

2004-06-18 Thread Dawn M. Wolthuis
Not ALL marketing costs dollars.  For example, how many dollars are pumped
into Visage marketing on cdp and the u2-users lists?  Additionally, it
really is amazing the fact that U2UG has a domain name (u2ug.org) and a web
site and a host site for u2-users and a zero dollar budget.  There are
generous people within our midst.

So, we'll be calling you then, K?  smiles.  --dawn

Dawn M. Wolthuis
Tincat Group, Inc.
www.tincat-group.com

Take and give some delight today.


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of Ross Ferris
> Sent: Thursday, June 17, 2004 10:55 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [U2] .Net Provider for Unidata or Universe
> 
> Marketing costs $. Unless U2UG is going to start charging membership fees,
> I don't see where this will be possible
> 
> In terms of Cache size, IIRC they quote figures around 4,000,000 seats, so
> I would think they are on a par with U2
> 
> Ross Ferris
> Stamina Software
> Visage  an Evolution in Software Development
> 
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:owner-u2-
> >[EMAIL PROTECTED] On Behalf Of Dawn M. Wolthuis
> >Sent: Friday, 18 June 2004 12:07 PM
> >To: [EMAIL PROTECTED]
> >Subject: RE: [U2] .Net Provider for Unidata or Universe
> >
> >Cache' blankets the Java market with ads as well.  But I'd be very
> curious
> >how their market compares to the U2 market.  There are other MUMPs
> >implementations, but not as many as PICK.  I don't know if they are
> >"bigger"
> >than U2 -- any guesses?  I have no clue whether their marketing strategy
> is
> >working to grow them significantly beyond their initial MUMPs base, but
> I'm
> >definitely curious.
> >
> >In preparing the agenda for the Sept 19 meeting of the U2UG in Las Vegas
> >(to
> >which everyone is invited!) we are planning to have significant
> discussions
> >about the topic of marketing U2 and the underlying database.  Even if IBM
> >does not do that type of marketing, potentially the U2UG could do some
> >marketing in the future. Just a thought -- all ideas are welcome.
> Cheers!
> >--dawn
> >
> >Dawn M. Wolthuis
> >Tincat Group, Inc.
> >www.tincat-group.com
> >
> >Take and give some delight today.
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.707 / Virus Database: 463 - Release Date: 15/06/2004
> ---
> 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/


RE: [U2] [UV] 'Press any key...'

2004-06-18 Thread Dennis Bartlett
Hi Alexey

All the other replies have focussed on pressing "N" (or
setting NO.PAGE)

If you're in a program you could always do the select in
such a way that
no text appears on the screen, but that you have the results
in variable
that you can test, eg
   CMD = "SELECT FILE"
   EXECUTE CMD CAPTURING X RETURNING NO.ITEMS

The variable NO.ITEMS will contain the number of items
selected, while
the variable X will contain the text as it would have
appeared on the
screen.

Should you have wanted to just get the actual records in the
file, the
easiest would be to do 2 selects one after the other, or a
get.list
followed by a select eg
   EXECUTE "GET.LIST MY.LIST" CAPTURING X RETURNING
MYLIST.CNT
   CMD = "SELECT FILE"
   EXECUTE CMD CAPTURING X RETURNING MYSEL.CNT

This way, MYLIST.CNT will contain the count of keys in
MY.LIST, and
MYSEL.CNT will contain the no of keys actually selected from
the file.

There are other ways of doing this, but I find that this
makes sense and
is quite easy. I often use the "capturing" variable's
contents to
process what the user would have seen, for audit or
error-catching
purposes.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Aleksejs Luchko
Sent: 16 June 2004 03:56
To: [EMAIL PROTECTED]
Subject: [U2] [UV] 'Press any key...'


Hi,

Is there a way to suppress 'Press any key to continue...'
message in
SELECT statement? It appears when active select list exists,
but not all
@IDs from the active select list present in a file being
selected.

Best regards,
Alexey Luchko.
---
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/


RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Dennis Bartlett
My first job was in Fortran. I understand why GOTO's are
evil.

That said, I can see where someone in that frenzy of getting
an idea
down, and not having time to return and tidy one's code, can
end up
(only too soon) with an un-manageable system.

Long-time maintenance programmers have things they don't
like - like
GOTO - that they've sweated through. Newbies, or slow
learners, don't
realise the legacy one leaves when writing in a sloppy way.

Primary Concept
* Not using GOTO's forces me to think out the structure
before starting.

Rules of Coding
* Code remains in its state until completely re-written (ie
you start it
bad, its gonna stay bad).
* Not using GOTO's forces me to think out the structure
before starting.
* Just coz YOU program that way doesn't mean the guy after
you will be
able to (ie be considerate - you're bound to move on
sometime, and
someone else gets your garbage)
* think big. If you plan it to take just about anything,
within reason,
and then program it with a wide vision, efficient will it be
(and happy
management & users will follow)
* use comments - that way there's no misunderstanding of
intent
* take pride in what you do - after all, this is what you're
leaving the
next generation - is that what you want to be remembered
for?

dennis
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mats Carlid
Sent: 18 June 2004 09:43
To: [EMAIL PROTECTED]
Subject: Re: [U2] [UV] WHILE READNEXT id DO


 I presume you have never had to  maintain programs written
in a
language totally lacking  structured code elements like
assembler or to
a lesser degree fortranIV.

I have.

Believe me:
GOTO's   ( or conditional and unconditional branches, jumps
or transfers

)   ARE EVIL !

It's som much easier to follow a program with  FOR , IF ...
ELSE LOOP
and CASE .

To untangle assembler programs I  marked the loops  and
jumps  with long

arrows
on the printed programs  - so much work just to get the
overall picture
that's  emediatelly apparent in structured code!

IMNSHO  however  we shall not abandon the GOTO  before we
have
some  exception handling  mechanism -  like   try / catch
in java.
Just don't use them when the 'structured'  alternative
exists.


--  mats


PS.
The lack of indentation i assembler  and the short names
(6char) and
numeric labels in fortranIV contributed to the
unredability  too.


Mark Johnson wrote:

>I'd love to see this test. What's the hatred with the
GOTO's. If
>they're so bad, then let's vote to remove them from the
compiler. Let's

>remove RETURN TO and CLEAR while we're at it as well.
---
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/


[U2] test

2004-06-18 Thread Maksim Gavronskiy
test
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] relative speed of Retrieve SELECT vs Basic SELECT, LOOPREADNEXT,READ. was: [UV] WHILE READNEXT id DO

2004-06-18 Thread Hogan, James
"Which would you suppose is much faster:"

I think we need to consider that Unibasic in U2 is interpreted (not compiled
into an executable). The "compiled basic" is actually run by the u2 runtime
engine - eg "udt" (for unidata) The code in 1: (see below) does a SELECT
with a condition 'TYPE = "V"'. The U2 engine only has to interpret this line
once. To bring back the required records the U2 engine does not need to
evaluate any more basic code. Whereas in the 2: the "IF REC[1,1]='V' THEN"
has to be interpreted for every record returned, which is very costly in
CPU.

Additionally the number of records returned by the select in 1: will be less
than 2:, because we only return back records where TYPE = "V". Therefore the
LOOP code executes less times in 1: than in 2:. So in 1: we are actioning
less lines of basic code in the loop, again giving us a time saving. You
will generally get time saving where you action one line of basic code that
does many things than doing the same thing with many lines of basic code.

Of course 1 would run even faster if we put an index on "TYPE". Whereas in
"2" we would get no benefit from an index.

   1: T0=TIME()
  FOR I = 1 TO 100
 EXECUTE 'SELECT VOC WITH TYPE = "V" COUNT.SUP'
 LOOP WHILE READNEXT ID
NULL ;* GOSUB DO.STUFF
 REPEAT
  NEXT I
  T1 = TIME()
  CRT T1-T0
or

   2: T0 = TIME()
  OPEN 'VOC' TO F ELSE STOP
  FOR I = 1 TO 100
  SELECT F
  LOOP WHILE READNEXT  ID
 READ REC FROM F, ID THEN
IF REC[1,1]='V' THEN
   NULL ;* GOSUB DO.STUFF
END
 END
  REPEAT
  T1 = TIME()
  CRT T1-T0
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Mats Carlid
I presume you have never had to  maintain programs written in
a language totally lacking  structured code elements like assembler
or to a lesser degree fortranIV.
I have.
Believe me:
GOTO's   ( or conditional and unconditional branches, jumps or transfers 
)   ARE EVIL !

It's som much easier to follow a program with  FOR , IF ... ELSE
LOOP and CASE .
To untangle assembler programs I  marked the loops  and jumps  with long 
arrows
on the printed programs  - so much work just to get the  overall picture
that's  emediatelly apparent in structured code!

IMNSHO  however  we shall not abandon the GOTO  before we have
some  exception handling  mechanism -  like   try / catch  in java.
Just don't use them when the 'structured'  alternative exists.
--  mats
PS. 
   The lack of indentation i assembler  and the short names (6char) and
   numeric labels in fortranIV contributed to the unredability  too.

Mark Johnson wrote:
I'd love to see this test. What's the hatred with the GOTO's. If they're so
bad, then let's vote to remove them from the compiler. Let's remove RETURN
TO and CLEAR while we're at it as well.
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/