Re: [U2] XPath queries

2010-05-21 Thread Robert Houben
Yuck! That sounds like a bug to me. Anywhere else, the quotes would be 
mandatory.

Always glad to help!

Default namespaces have always felt like a bad compromise to me...

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Boydell, Stuart
Sent: Thursday, May 20, 2010 10:48 PM
To: U2 Users List
Subject: Re: [U2] XPath queries

Thanks Robert and Brian,
As you pointed out, having a default namespace was the issue. However it took 
me awhile to work out that the nsMap parameter of the Locate statement can't 
have quotes around the uri. Once I had (accidently) discovered that, the 
xdomlocate function worked.


include UNIVERSE.INCLUDE XML.H
xml  = '?xml version=1.0 ?'
xml := 'ABRPayloadSearchResults xmlns=http://tempuri; '
xml := 'response'
xml := 'exceptionException Message/exception'
xml := '/response'
xml := '/ABRPayloadSearchResults'

* !! nsmap = 'xmlns:a=http://tempuri;' Does Not Work with quoted uri !!
nsmap = 'xmlns:a=http://tempuri'

xpathStr = '/a:ABRPayloadSearchResults/a:response/a:exception'

if xdomopen(xml,XML.FROM.STRING,hd) # XML.ERROR then
   if xdomlocate(hd,xpathStr,nsmap,hn) # XML.ERROR then
 if not(xdomgetnodename(hn,name)) and name[9] = 'exception' then
crt 'Located ':name
 end
   end
end


Many thanks,
Stuart Boydell


-Original Message-

Beware of default namespaces. If you have one defined, then XPath needs to have 
a namespace mapped to a dummy prefix, and you have to qualify the prefix.  The 
following can be referenced using /x/y.

xysomething...

But this has a problem:
x xmlns=fooysomething...

Internally, XML tracks this like /{foo}:x/{foo}:y.  What you have to do is 
tell the XPath processor to map some prefix, say 'a' to the namespace 'foo', 
then use /a:x/a:y.

___
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] Creating an index

2010-05-21 Thread Shawn Hayes
Thanks David for anticipating my question and for all for the help everyone:)
 'We act as though comfort and luxury were the chief requirements of life, when 
all that we need to make us happy is something to be enthusiastic about.' 



- Original Message 
From: Womack, Adrian adrian.wom...@rac.com.au
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, May 20, 2010 8:56:36 PM
Subject: Re: [U2] Creating an index


Now that's weird - I just noticed David A Greens similar reply - but it was 
further down in my mail box, it has a time 39 minutes earlier than Shawn's 
original question!

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Womack, Adrian
Sent: Friday, 21 May 2010 9:53 AM
To: 'U2 Users List'
Subject: Re: [U2] Creating an index


This should do the trick - Create a multi-valued i-descriptor with this code: 
CATS(REUSE(DATE:*),CATS(CATS(PART,REUSE(*)),QTY)




DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
___
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] re ceiving error message XX record corrupt on logto

2010-05-21 Thread inquieti

Hi Susan
This is caused by either a missing or corrupt DMSECURITY item(s).  We had a
customer that couldn't add anything to their menus because when they did,
upon saving half the menus would disappear completely.  It was all due to
the fact that they had removed an account at Unix but everything was still
in the DMSECURITY file.  When the menus were re-built the 'missing' account
caused corruption.  It could even be the fact that the Allow Disallow on
accounts with restrictions has modules missing.  Make sure the DMSECURITY is
totally up to date and in line with the actual accounts.
Regards
David

Susan Lynch wrote:
 
 I am hoping that someone has a good memory - the company I am working with 
 is running SBPlus 5.3.3, which is past the End of Service date.  I have 
 checked the U2 Knowledge Base for this problem, and have checked
 everything 
 that they listed, and none of those possible causes are the reason for
 this 
 account.
 
 My user says that he changed SB security for this account, and now HE
 can't 
 log to the account without getting this message, and neither can I - and I 
 am in the ROOT group, and the account is in the ROOT group's list of 
 accounts without restrictions.
 
 If all else fails, I can try copying over all the XX files from an account 
 where we are not getting this message, but I am not convinced that it will 
 solve the problem, since it arose immediately after he changed something
 in 
 the security settings for the account.
 
 Any ideas?
 
 Thanks!
 
 Susan Lynch
 F. W. Davison  Company, Inc. 
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 

-- 
View this message in context: 
http://old.nabble.com/Question-about-umask-tp28624993p28633985.html
Sent from the U2 - Users mailing list archive at Nabble.com.

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


Re: [U2] re ceiving error message XX record corrupt on logto

2010-05-21 Thread Susan Lynch

Thanks!  I will go check that now!

Susan Lynch
F. W. Davison  Company, Inc.
- Original Message - 
From: inquieti dinqui...@zafire.com

To: u2-users@listserver.u2ug.org
Sent: 05/21/2010 9:47 AM
Subject: Re: [U2] re ceiving error message XX record corrupt on logto




Hi Susan
This is caused by either a missing or corrupt DMSECURITY item(s).  We had 
a

customer that couldn't add anything to their menus because when they did,
upon saving half the menus would disappear completely.  It was all due to
the fact that they had removed an account at Unix but everything was still
in the DMSECURITY file.  When the menus were re-built the 'missing' 
account

caused corruption.  It could even be the fact that the Allow Disallow on
accounts with restrictions has modules missing.  Make sure the DMSECURITY 
is

totally up to date and in line with the actual accounts.
Regards
David

Susan Lynch wrote:


I am hoping that someone has a good memory - the company I am working 
with

is running SBPlus 5.3.3, which is past the End of Service date.  I have
checked the U2 Knowledge Base for this problem, and have checked
everything
that they listed, and none of those possible causes are the reason for
this
account.

My user says that he changed SB security for this account, and now HE
can't
log to the account without getting this message, and neither can I - and 
I

am in the ROOT group, and the account is in the ROOT group's list of
accounts without restrictions.

If all else fails, I can try copying over all the XX files from an 
account
where we are not getting this message, but I am not convinced that it 
will

solve the problem, since it arose immediately after he changed something
in
the security settings for the account.

Any ideas?

Thanks!

Susan Lynch
F. W. Davison  Company, Inc.

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




--
View this message in context: 
http://old.nabble.com/Question-about-umask-tp28624993p28633985.html

Sent from the U2 - Users mailing list archive at Nabble.com.

___
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] receiving error message XX record corrupt on logto

2010-05-21 Thread Colin Alfke
It's not that old Susan - most of our clients are still running 5.2.4 with
some still on 4.5.4 :)

- make sure the DMACCOUNTS record key is all uppercase
- try saving the top of the tree in group security when logged in as root.

What was changed and how? You can't change most things manually without
causing this type of error because of the checksum it keeps. You may be able
to change it back though

Hth
Colin Alfke
Calgary, Canada

-Original Message-
From: Susan Lynch

I am hoping that someone has a good memory - the company I am working with 
is running SBPlus 5.3.3, which is past the End of Service date.  I have 
checked the U2 Knowledge Base for this problem, and have checked everything 
that they listed, and none of those possible causes are the reason for this 
account.

My user says that he changed SB security for this account, and now HE can't 
log to the account without getting this message, and neither can I - and I 
am in the ROOT group, and the account is in the ROOT group's list of 
accounts without restrictions.

If all else fails, I can try copying over all the XX files from an account 
where we are not getting this message, but I am not convinced that it will 
solve the problem, since it arose immediately after he changed something in 
the security settings for the account.

Any ideas?

Thanks!

Susan Lynch


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


Re: [U2] receiving error message XX record corrupt on logto

2010-05-21 Thread Susan Lynch

Colin,

As far as I know, the user did not edit the record, he went through the 
screens, so the checksum should be ok.


I did verify that the account names are all upper-case - that was one of the 
tech tips on the U2 Knowledge Base, although it said that that was 
introduced in 5.3.4 when correcting a different issue in 5.3.3 (which was 
why I was asking for memories of what was wrong on 5.3.3 - the release notes 
don't specify!)


Thanks for the encouragement on old releases - I do my best to keep our 
customers on current releases, but sometimes institutional inertia prevents 
them from making changes.


Susan Lynch
F. W. Davison  Company, Inc.
- Original Message - 
From: Colin Alfke alfke...@hotmail.com

To: 'U2 Users List' u2-users@listserver.u2ug.org
Sent: 05/21/2010 11:42 AM
Subject: Re: [U2] receiving error message XX record corrupt on logto



It's not that old Susan - most of our clients are still running 5.2.4 with
some still on 4.5.4 :)

- make sure the DMACCOUNTS record key is all uppercase
- try saving the top of the tree in group security when logged in as root.

What was changed and how? You can't change most things manually without
causing this type of error because of the checksum it keeps. You may be 
able

to change it back though

Hth
Colin Alfke
Calgary, Canada

-Original Message-
From: Susan Lynch

I am hoping that someone has a good memory - the company I am working with
is running SBPlus 5.3.3, which is past the End of Service date.  I have
checked the U2 Knowledge Base for this problem, and have checked 
everything
that they listed, and none of those possible causes are the reason for 
this

account.

My user says that he changed SB security for this account, and now HE 
can't

log to the account without getting this message, and neither can I - and I
am in the ROOT group, and the account is in the ROOT group's list of
accounts without restrictions.

If all else fails, I can try copying over all the XX files from an account
where we are not getting this message, but I am not convinced that it will
solve the problem, since it arose immediately after he changed something 
in

the security settings for the account.

Any ideas?

Thanks!

Susan Lynch


___
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] TRANSLATING LAST VALUE FROM A SINGLE VALUE

2010-05-21 Thread James Patrick Volkman
I'm attempting to do a translate and was wondering if anyone might have a 
suggestion.

Attribute (or Field) 1 of File1 is a multi-valued foreign key to the Primary 
Key in File2. File2 contains a Date in Attribute 12. I want the latest date in 
Attribute 12 of File2 of all the values of Attribute 1 in File1. 


This is pulling 1 record from Attribute 1 of File1. How can I display the Date 
(Attribute 12 of File2)?

LIST FILE1 1 EVAL @RECORD1,DCOUNT(TRANS(FILE2,@RECORD1,'12','X'),@VM)


 Jim Volkman
http://www.linkedin.com/in/jamesvolkman



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


[U2] SB Dict with User Subroutine and TCL

2010-05-21 Thread Israel, John R.
I need help building a SB Dict that calls a User Subroutine with several 
arguments.  This needs to work from both within SB screens and from TCL.

Originally, I have a derived field defined as:
  (B(SYSS9075.1,'VIA',SHIP_VIA))
where SYSS9075.1 had three arguments,  'VIA' was hard coded and SHIP_VIA was 
whatever value was in that field (in this case, field 10).  This worked fine 
from TCL, but SB was blowing up with an error about incorrect number of 
arguments (and would likely not have a clue what SHIP_VIA meant).

I then tried:
 (B(SYSS9075.1,'VIA','10'))
where SYSS9075.1 had no arguments, and extract the info from PARAMS.  This 
works from SB screens, but I am clueless how to pass the arguments in the DICT 
used at TCL.

Any Gurus out there have a suggestion or two?



 
John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Miamisburg, OH  45342
937-866-0711 x44380
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] Different Number of Arguments Error

2010-05-21 Thread Al DeWitt
I have downloaded one of the barcode programs ( PLS.BAR128) to test
barcode printing.  I needed to make two changes.  One was the name
change to fit within our naming convention and the other was the name of
a the variable VALUE because it's a reserved word in System Builder.
 
So I have this statement:CALL SB.PROCESS('SYS9008,0\1\0\110022')
 
It's calling a basic subroutine whose first line is this:
SUBROUTINE SYSS9008.1 (WIDTH, HEIGHT, ORIEN, MYDATA) 
 
I'm getting this error: In
..\..\..\FLOPROGS\DEV\DEV.IIBASE8\BP8.0\_SYSS9008.1 at line 141 Error,
SUBROUTINE 'SYSS9008.1' has different number of arguments than its CALL
statement.
It never gets to 141.  I put display statments early on in the program
to display WIDTH, HEIGHT, ORIEN AND MYDATA.  It doesn't even get to that
point.
 
I count the number of variables the subroutine wants and I count the
number I'm passing and, to me, they appear to be the same.  What am I
missing?
 
Thanks.
 
Albert DeWitt
Sr. Programmer Analyst
Stylmark, Inc.
763.574.8705 (V)
763-574-1052 (F)
adew...@stylmark.com mailto:adew...@stylmark.com 
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] TRANSLATING LAST VALUE FROM A SINGLE VALUE

2010-05-21 Thread Colin Jennings

Hi James.

To do it in a dictionary item you just need a correlative (derived field, 
I-descriptor) defined within FILE1 whish contains the following:


F;1;(TFILE2;X;;12)

This will list whatever is in attribute 12 of FILE2 using the value in 
attribute 1 of FILE1 as the key - whether that is multi-valued or not.


Best regards
Colin.

- Original Message - 
From: James Patrick Volkman jamesvolk...@yahoo.com

To: u2-users@listserver.u2ug.org
Sent: Friday, May 21, 2010 5:15 PM
Subject: [U2] TRANSLATING LAST VALUE FROM A SINGLE VALUE


I'm attempting to do a translate and was wondering if anyone might have a 
suggestion.


Attribute (or Field) 1 of File1 is a multi-valued foreign key to the 
Primary Key in File2. File2 contains a Date in Attribute 12. I want the 
latest date in Attribute 12 of File2 of all the values of Attribute 1 in 
File1.



This is pulling 1 record from Attribute 1 of File1. How can I display the 
Date (Attribute 12 of File2)?


LIST FILE1 1 EVAL 
@RECORD1,DCOUNT(TRANS(FILE2,@RECORD1,'12','X'),@VM)



Jim Volkman
http://www.linkedin.com/in/jamesvolkman




___
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] TRANSLATING LAST VALUE FROM A SINGLE VALUE

2010-05-21 Thread David A. Green
Try:

TRANS(FILE2, FILE1.FIELD1, FILE2.FIELD12, X);
MAXIMUM(@)

David A. Green
(480) 813-1725
DAG Consulting

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of James Patrick
Volkman
Sent: Friday, May 21, 2010 9:15 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] TRANSLATING LAST VALUE FROM A SINGLE VALUE

I'm attempting to do a translate and was wondering if anyone might have a
suggestion.

Attribute (or Field) 1 of File1 is a multi-valued foreign key to the Primary
Key in File2. File2 contains a Date in Attribute 12. I want the latest date
in Attribute 12 of File2 of all the values of Attribute 1 in File1. 


This is pulling 1 record from Attribute 1 of File1. How can I display the
Date (Attribute 12 of File2)?

LIST FILE1 1 EVAL @RECORD1,DCOUNT(TRANS(FILE2,@RECORD1,'12','X'),@VM)


 Jim Volkman
http://www.linkedin.com/in/jamesvolkman



  
___
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] OPENSEQ and Abnormal termination of UV

2010-05-21 Thread Jacques G.
If your file is opened, then comparing it to an empty string is what will 
cause an invalid data type error.


WHY!!!

If the datatypes don't match, then the result of the comparison is 
FALSE, not INVALID.

It is logically correct to do such a comparison. The result I am looking 
for is the logically correct response. It SHOULD NOT crash the program!

And it worked fine on INFORMATION, why not UV?

It is a bad idea to allow it, it encourages bad programming practices and it 
can hide a bug in your program for example if you do:

READ CAR FROM CARS ELSE CAR = ''
IF CARS #  ''  THEN

Here what was intended was to compare CAR to ''  not CARS but having the S 
there is a typo.
If we don't allow datatypes of different types being compared this bug has a 
greater chance of getting caught during development because the program will 
fail on comparing the file to a null string.

If you use FILEINFO it shows that you know that the variable you are testing is 
a file.

I've seen a similar case where a subroutine was expecting:

SUBROUTINE  ABC (MAT A, MAT B, MAT C)

A programmer only needed the contents of the matrix B and C to call it and did:

CALL ABC(,MAT B, MAT C)

Only thing Matrix ABC puts something in MAT A and since the programmer passed 
an empty string what happens is that the content of Matrix B is over-written 
causing data corruption.

It would probably have been a good idea to detect that since a Matrix was 
expected, it shouldn't be legal to pass a dynamic array to the subroutine.  

Most modern OOP programming languages don't allow for types of different kinds 
to be compared to one another without some way of casting them.  


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


Re: [U2] SB Dict with User Subroutine and TCL

2010-05-21 Thread Colin Alfke
John;

One way to deal with this is to call a process from the derived slot of the
dict that parses out the @PARAM variable and calls the subroutine, then to
get the dict to work at TCL in the F6 Addit, F6 OE Dict derived field
put what you need to call the subr from the dictionary. Unfortunately, this
will hard-code it for the database - if you need to run it on multiple
databases.

Eg:

Derived field: (P(P.CALLSYSS9075.1,VIA,:SHIP_VIA:))
F6,F6:  EXTRACT(@RECORD,10,0,0);SUBR(SYSS9075.1,'VIA',@1)

And P.CALLSYSS9075.1 looks something like:

LOCAL DATAVAL, SHIP.TYPE, SHIP.VIA
DATAVAL = 
SHIP.TYPE = FIELD(@PARAM,',',1)
SHIP.VIA  = FIELD(@PARAM,',',2)
CALL SYSS9075.1(DATAVAL,SHIP.TYPE,SHIP.VIA)
@VALUE = DATAVAL
@RTN.FLAG = 0

I thought I had figured out another way to do this but I can't quite recall
what it was

Hth
Colin Alfke
Calgary, Canada

-Original Message-
From: Israel, John R.

I need help building a SB Dict that calls a User Subroutine with several
arguments.  This needs to work from both within SB screens and from TCL.

Originally, I have a derived field defined as:
  (B(SYSS9075.1,'VIA',SHIP_VIA))
where SYSS9075.1 had three arguments,  'VIA' was hard coded and SHIP_VIA was
whatever value was in that field (in this case, field 10).  This worked fine
from TCL, but SB was blowing up with an error about incorrect number of
arguments (and would likely not have a clue what SHIP_VIA meant).

I then tried:
 (B(SYSS9075.1,'VIA','10'))
where SYSS9075.1 had no arguments, and extract the info from PARAMS.  This
works from SB screens, but I am clueless how to pass the arguments in the
DICT used at TCL.

Any Gurus out there have a suggestion or two?

John Israel

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


[U2] 64 Bit

2010-05-21 Thread Bill Haskett
I know we've discussed 64 bit issues before, but Windows 2008 is the O/S 
of choice for those of us using Windows.  Presently, 2008 R2 is a 64bit 
/*only*/ O/S and is being pushed by both MS and Dell.


I have no problems going to this but would like to know what exactly 
/*doesn't*/ work with U2 (specifically UD) on Windows 2008 R2 (or other 
64bit O/S)?  What kind of problems can I expect?  This is going to be a 
dbms server running the mv.NET license manager, PrintWizard, and a 
couple of other utilities.


Any thoughts?

Thanks,

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


Re: [U2] receiving error message XX record corrupt on logto

2010-05-21 Thread Kevin King
Susan, you said As far as I know, the user did not edit the record, he went
through the screens, so the checksum should be ok.  Ah, if only it were
that simple.  In some earlier releases of SB+ (and possibly as late as 5.3,
though I thought it was corrected in 5.2) if someone editing something in a
security record and wasn't specifically the SB user or in the ROOT group,
SB+ could corrupt the checksum.  If you can login as SB and refile the
suspected records, that might help.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] receiving error message XX record corrupt on logto

2010-05-21 Thread Susan Lynch
Kevin, when I was checking to make sure that there were no 'no longer on the 
machine' accounts in the lists of accounts, I refiled each group record.  I 
have not re-filed most of the user records, although I have re-filed mine 
and am still having the problem with my login.  Do I need to re-file all the 
user records as well?  DMSECURITY has so many different record types that it 
is hard to know what to include in a project like this and what is safe to 
omit.


Susan Lynch
F. W. Davison  Company, Inc.
- Original Message - 
From: Kevin King precisonl...@gmail.com

To: U2 Users List u2-users@listserver.u2ug.org
Sent: 05/21/2010 4:51 PM
Subject: Re: [U2] receiving error message XX record corrupt on logto


Susan, you said As far as I know, the user did not edit the record, he 
went

through the screens, so the checksum should be ok.  Ah, if only it were
that simple.  In some earlier releases of SB+ (and possibly as late as 
5.3,
though I thought it was corrected in 5.2) if someone editing something in 
a

security record and wasn't specifically the SB user or in the ROOT group,
SB+ could corrupt the checksum.  If you can login as SB and refile the
suspected records, that might help.
___
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] OPENSEQ and Abnormal termination of UV

2010-05-21 Thread Anthony W. Youngman
In message 321088.49154...@web36901.mail.mud.yahoo.com, Jacques G. 
jacque...@yahoo.com writes
If your file is opened, then comparing it to an empty string is what 
will cause an invalid data type error.




WHY!!!



If the datatypes don't match, then the result of the comparison is
FALSE, not INVALID.



It is logically correct to do such a comparison. The result I am looking
for is the logically correct response. It SHOULD NOT crash the program!



And it worked fine on INFORMATION, why not UV?


It is a bad idea to allow it, it encourages bad programming practices 
and it can hide a bug in your program for example if you do:


READ CAR FROM CARS ELSE CAR = ''
IF CARS #  ''  THEN

Here what was intended was to compare CAR to ''  not CARS but having 
the S there is a typo.
If we don't allow datatypes of different types being compared this bug 
has a greater chance of getting caught during development because the 
program will fail on comparing the file to a null string.


If you use FILEINFO it shows that you know that the variable you are 
testing is a file.


The big problem with your attitude is that you are assuming a typed 
language - and even then it's invalid.


In BASIC, *EVERYTHING* is a string (apart from file variables). 
Therefore any comparison should be valid.


And, using your own words against you - it shows that you know that the 
variable you are testing is a file. What if I DON'T know (which is why 
I was doing the test!).


At the end of the day, an IF test for equality should return FALSE on a 
type mismatch, not CRASH. Because FALSE is the *correct* answer. That's 
what I absolutely HATE about artificial stupidity. It thinks it knows 
better than me, and gives me what it thinks I should have, not what I 
asked for.


Cheers,
Wol
--
Anthony W. Youngman pi...@thewolery.demon.co.uk
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - http://www.maverick-dbms.org Open Source Pick
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and Abnormal termination of UV

2010-05-21 Thread fft2001

 I know what you're saying, but just to make sure we're precise I'll add a 
footnote.
The run-time machine doesn't have to find additional memory *each* time you add 
to a dynamic array (as you said perhaps just imprecisely).  Rather, your 
workspace arrays have certain fixed sizes and it's only when you go over this 
size that it will allocate you a new larger area and move the array there.  So 
for example, you get slots that are 50 bytes, 250 bytes, and so on, probably 
implementation dependent.  The run-time machine will allocate you a smaller 
area at first, until it knows you need a bigger one.

Alternatively, garbage collection will return to the available pool, the no 
longer used space for arrays that have shrunk.

I never did any testing to see if the garbage collector actually works *while* 
your program is running or only after the signal that the program is now 
finished.

 

 I do agree however with the observation that reading a large amount of data 
into a dynamic array is *most likely* causing the run-time machine to allocate 
you the entire size of that data in your own *workspace*.  Danger Will 
Robinson!  Warning! Warning!

When it runs out of memory/disk will it wait forever? Or will it halt the 
system?
Try again later, answer fuzzy.

Will Johnson




 

 

-Original Message-
From: John Hester jhes...@momtex.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Tue, May 18, 2010 12:31 pm
Subject: Re: [U2] OPENSEQ and Abnormal termination of UV


Reading my own response just made me realize what's going on.  I think
Jerry's response was right.  I remember many years ago (I won't say how
many) when we were on much slower hardware, explaining to a coworker
that it was better to use dimensioned arrays when possible because they
were faster to populate than dynamic arrays.  The reason they're faster
is because the necessary space for them is already reserved in memory.
A dynamic array has to go out and find add'l memory each time you add to
it.  Looks like putting a sequential file in a dimensioned array makes
it go out and reserve a block of memory the size of the entire file.  If
that's the case then making FILEVARS a dynamic array *should* work.

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester
Sent: Tuesday, May 18, 2010 11:42 AM
To: U2 Users List
Subject: Re: [U2] OPENSEQ and Abnormal termination of UV

Yes, I see your point.  I wonder if the integer gets treated like a
string in the first instance.  I wonder what the result with FILEVARS1
would be.

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Anthony W.
Youngman
Sent: Tuesday, May 18, 2010 7:45 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] OPENSEQ and Abnormal termination of UV

In message 
e6179e13392ec14aabcd5272c3aedd61124ec...@exchangesvr.momtex.com, John 
Hester jhes...@momtex.com writes
I think it's something along those lines, but I don't think it's trying
to stick the entire contents of the file into a variable.  What I think
OPENSEQ is doing is keeping track of the position where the EOF mark is
so it will know when the end of the file is reached.  For a file
greater
than 2GB in size, this position is an integer that takes more than 32
bits to store.  UV, being a 32-bit application, is not going to be able
to handle it.  The maximum positive integer value a 32-bit application
can reference is 2147483647.

The problem is, FV.FILE and FILEVARS(1) are *allegedly* *functionally* 
*identical*. An element of a dimensioned array, is supposed to be a 
normal variable in every way shape or form.

The problem is that, in this instance, it clearly isn't because the 
variable works while the element (allegedly identical) causes a crash.

I'd agree with Perry. It's a bug.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

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


Re: [U2] OPENSEQ and Abnormal termination of UV

2010-05-21 Thread Bill Haskett
...That's what I absolutely HATE about artificial stupidity. It 
thinks it knows better than me, and gives me what it thinks I should 
have, not what I asked for.


Then again, I can't imagine it thinks it should CRASH!  :-o

Bill


Anthony W. Youngman said the following on 5/21/2010 5:15 PM:
In message 321088.49154...@web36901.mail.mud.yahoo.com, Jacques G. 
jacque...@yahoo.com writes

[snipped]


[snipped]

At the end of the day, an IF test for equality should return FALSE on 
a type mismatch, not CRASH. Because FALSE is the *correct* answer. 
That's what I absolutely HATE about artificial stupidity. It thinks 
it knows better than me, and gives me what it thinks I should have, 
not what I asked for.


Cheers,
Wol

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