RE: [U2] Prime number file modulos

2005-09-02 Thread Larry Hiscock
You can speed it up a little bit thusly: PRINT 'Enter number: ': ; INPUT TARGET NUMBER = (2 * INT(TARGET / 2)) + 1 IF NUMBER NE TARGET THEN PRINT "Even numbers can't be prime." PRIME = 0 LOOP UNTIL PRIME DO PRINT NUMBER:' ': PRIME = 1 FOR

Re: [U2] Installed UD61PE ... where's UOJ?

2005-09-02 Thread Wendy Smoak
From: "Wendy Smoak" <[EMAIL PROTECTED]> I installed the Personal Edition of UniData 6.1, and (I think) all of the extra stuff (odbc, UniDK, UniTools...) Or did I miss installing something? Apparently! :) Having installed some subset of the extras, there was already a "UniDK" directory, so I

Re: [U2] Prime number file modulos

2005-09-02 Thread Mark Johnson
I never heard of populating blank frames with periods. I believe that it's the DUMP command displaying non-printable (control or char(0)) characters as periods. Since disc space is always full of something even if empty, then the periods could be just a visible thing. I've done beaucoups of restor

Re: [U2] RE: Named Common

2005-09-02 Thread Mark Johnson
Please don't make an assumption that I don't read any RTFM's. No-one knows everything about every element of MV. I choose to not utilize COMMONs. I'm sure there are other elements that others choose not to engage. I take a chance when I declare any position I may hold to get flamed. Please don't m

Re: [U2] Prime number file modulos

2005-09-02 Thread Mark Johnson
Here's one better if you don't want to EXECUTE "PRIME 123" CAPTURING REC INPUT ANS MAX=INT(SQRT(ANS))+1 PRIME=TRUE FOR I=2 TO MAX UNTIL NOT PRIME IF MOD(ANS,I)=0 THEN PRIME=FALSE NEXT I Add your own frosting on this very simple prime calculation. The max number of divisors to test is the SQ

Re: [U2] TCL beginner

2005-09-02 Thread Mark Johnson
I use a TCL command that I created called COUNTER. It requires the dict item in the file called COUNTER that represents the value 1. At tcl type COUNTER CUSTOMER STATE The proc goes like this: PQN HSORT A2 H BY A3 H BREAK-ON A3 H TOTAL COUNTER DET-SUPP P I use this quite extensively for this exac

[U2] Installed UD61PE ... where's UOJ?

2005-09-02 Thread Wendy Smoak
I installed the Personal Edition of UniData 6.1, and (I think) all of the extra stuff (odbc, UniDK, UniTools...) Then I went looking for UniObjects for Java. Wasn't it in /usr/unishared before? The notes on the Wiki say: "asjava.zip comes with any recent U2 distribution, and is usually found

Re: [U2] Prime number file modulos

2005-09-02 Thread Dan Fitzgerald
Oops. Went back & read; this was not a u2 system. Pick did some pretty horrific things at various times around file sizing; used to be you had to do a restore from tape to resize, after editing that field 13. There was even a brief period where it would write a period into each byte in every un

Re: [U2] Prime number file modulos

2005-09-02 Thread Dan Fitzgerald
If modulus is GT #items, you do have empty frames, yes, and increasing the mod past that point (unless anticipating growth) is pointless. I've seen a lot of this; folks resize a file with 20 items to have a modulus of 10007, and still have 20 items in 200% overflow. A general rule of thumb on

RE: [U2] Tortilla Flats....

2005-09-02 Thread GarryS
Que bien! Has leido el libro "Cup of Gold" tambien es muy bueno. Pero mas adelante para nuestro tiempo tienes que leer "Snow Crash" por Neal Stephenson. > -Original Message- > From: Allen E. Elwood [SMTP:[EMAIL PROTECTED] > Sent: Friday, September 02, 2005 3:58 PM > To: u2-users@listser

RE: [U2] TCL beginner

2005-09-02 Thread Kevin King
If F40 is mv'd change the BY to BY.EXP; everything else should be fine. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/

RE: [U2] TCL beginner

2005-09-02 Thread Allen E. Elwood
Oh yeah, MV attributes take a different approach. You have to 'explode' the values. Try: LIST RMA BY.EXP F40 BREAK-ON F40 TOTAL Z_RMA_CNT ID-SUPP DET-SUPP If that doesn't work, you may need to use the 'real' dict name instead of the F40 due to association, but in this case I think it should wor

RE: [U2] TCL beginner

2005-09-02 Thread Bruce Ordway
Hmmm... I looked a little closer & noticed that all the bogus values were for old files which may or may not have had correct values entered. I modified the TCL to this: LIST RMA WITH F41 = "Y" AND WITH F40 = "1028" "1029" "1030" "1031" "1032" "1033" "1034" "1035" BY F40 BREAK-ON F40 TOTAL Z_RMA_C

RE: [U2] TCL beginner

2005-09-02 Thread Bruce Ordway
>Assume you called it One< I called it Z_RMA_CNT. I also had to change the words a little because of my flavor I think. LIST RMA BY F40 BREAK-ON F40 TOTAL Z_RMA_CNT ID-SUPP DET-SUPP Anyway, I'm getting wierd results. Could it be because F40 is a MV field? COMMENT Z_RMA_CNT

RE: [U2] Tortilla Flats....

2005-09-02 Thread Allen E. Elwood
!Si senor! Adoro Steinbeck, especialmente Uvas de la Ira y la Tortilla Planas www.freetranslation.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Friday, September 02, 2005 15:44 To: u2-users@listserver.u2ug.org Subject: RE: [U2]

RE: [U2] Tortilla Flats....

2005-09-02 Thread GarryS
Ese vato El' wood readin Steinbeck? > -Original Message- > From: Allen E. Elwood [SMTP:[EMAIL PROTECTED] > Sent: Friday, September 02, 2005 3:04 PM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] Prime number file modulos > > Here, try this old code I just dusted off (real

Re: [U2] TCL beginner

2005-09-02 Thread Jim Bullock
Hi Bruce - SORT RMA BY F40 BREAK.ON F40 TOTAL EVAL"1" DET.DUP Jim --- Bruce Ordway <[EMAIL PROTECTED]> wrote: > Hi, > > I've got Dataflo running on Unidata 5.2. > I know just enough TCL to be dangerous. > > Anyway I've been struggling this afternoon withg something I thought would > be simpl

[U2] Problems with DigiPortServer on Win2003 server, UV 10.1.3

2005-09-02 Thread Joe Walter
Having a new, unexpected problem with telnet sessions hanging on dumb terminals attached via DigiPortServer to a server running UV 10.1.3 on Win2003 OS. I'm not certain, but it seems that this problem began shortly after recent download/installation of 'Automatic Updates' from Microsoft for Win2003

RE: [U2] Great examples of bad code, was Date ICONV In English

2005-09-02 Thread Kevin King
How about... READU REC FROM FILE,Z ELSE PRINT 'DUSTIN IS AN A**HOLE' STOP END Real code with the exception of the asterisks. -K --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/

RE: [U2] TCL beginner

2005-09-02 Thread Kevin King
SORT RMA BY F40 BREAK.ON F40 TOTAL CNT (ID This assumes you have a CNT field in your VOC, defined as: 001 V 002 1 003 004 005 10R 006 R --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/

RE: [U2] RE: Named Common

2005-09-02 Thread gerry-u2ug
and in all that time you never bothered to even browse through a current mv basic manual ? I have to reiterate Charles' WOW ! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson Sent: Friday, September 02, 2005 02:57 PM To: u2-users@listserver.

RE: [U2] TCL beginner

2005-09-02 Thread Allen E. Elwood
Hi Bruce, First, create a dictionary that is an I descriptor and just give it a value of 1. Assume you called it One Then: LIST RMA BY F40 BREAK.ON F40 TOTAL One ID.SUP DET.SUP Should do it! btw, are you a Manage-2000 client? I noticed the F40 convention which is standard for files on M2K.

RE: [U2] Prime number file modulos

2005-09-02 Thread Allen E. Elwood
Here, try this old code I just dusted off (really old, had a LOTTA dust) : Amazingly fast for a brute force algorithm... *FIND.PRIME written by aee 080888 PRINT 'Enter Number ':;INPUT TARGET ORIGINAL.TARGET = TARGET PRIME = 1 LOOP FOR I = 2 TO TARGET-1 ABC = INT(TARGET / I)

[U2] TCL beginner

2005-09-02 Thread Bruce Ordway
Hi, I've got Dataflo running on Unidata 5.2. I know just enough TCL to be dangerous. Anyway I've been struggling this afternoon withg something I thought would be simple. Maybe you can help? I have a file called RMA with a field called Comment (F40). If I do this LIST RMA BY F40 F40 I get som

RE: [U2] Great examples of bad code, was Date ICONV In English

2005-09-02 Thread Allen E. Elwood
I agree. Bad code examples are a great thing to keep hanging around: * CREATE INVENTORY DETAIL RECORD * 2200 * DUP.FLAG = TRUE READ JOHN FROM INVDETFILE, (PROD CAT RELNO) ELSE IF INVOICING THEN WRITE DET ON INVDETFILE, PROD : RELNO END DUP.FLAG = FALSE RELNO = FIELD(

Re: [U2] Prime number file modulos

2005-09-02 Thread Mark Johnson
One final Old-school question on MODs. (example mods aren't primed for simplicity) If you have a data file of 460 average byte size, and you have 10,000 records on a 2K system, that would want a prime number near 4600. If you have a BP file with 37 records averaging 15,000 bytes, this math would i

Re: [U2] Prime number file modulos

2005-09-02 Thread Mark Johnson
I found the resize program and all it did was place the new mod in 013 of the DL/ID. Its only proof was that it was numeric and not 'even'. Pretty pathetic. Thanks Mark Johnson - Original Message - From: "Allen E. Elwood" <[EMAIL PROTECTED]> To: Sent: Friday, September 02, 2005 4:20 PM Su

Re: [U2] Date ICONV In English

2005-09-02 Thread Mark Johnson
This one app in specific broke some pretty standard MV rules, the dates being one of them. It was started in Oct 1974, going on-line in the summer of 1975 and these guys were still working on it through 1978. Since then, there have been a parade of around 3-4 other programmers as well as the owner

Re: [U2] Prime number file modulos

2005-09-02 Thread Dan Fitzgerald
Yeah... the problem with non-prime is that lumpy hashing thing. The wrong prime or file type will do this, too; it's why we call tuning "iterative"; sometimes it takes a few guesses to get lucky. File corruption doesn't occur just because you picked a bad modulus, type, or sep, but it does inc

[U2] RE: Named Common

2005-09-02 Thread Shaun.Ferguson
I'm on digest, but here's an example of named common which we use extensively supporting many many concurrent users (makes the systems fly without all that open file overhead, imho). Hpux / UniData, btw. 001: *INCLUDE EX.NAMED.COMMON 002: * EX named common and file open routine 003: * 004: *=

RE: [U2] Prime number file modulos

2005-09-02 Thread Allen E. Elwood
>P.S. Could "SLOW" stand for System Loves Overflow Workspace? Since someone lacked the ability to calculate a prime number, maybe its Serious Lack Of Writhmatic which fails the English test as well ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mark Jo

RE: [U2] Date ICONV In English

2005-09-02 Thread CA Software
Yes this will also work in D3. I don't know why I complicated matters. Looking at one of Mark's latest emails, it seems that the date he wants to convert to internal format is actually "embedded" in a string of text, so he will have to use an F or A correlative. For example: F;1;(G5 1);(DI) As

RE: [U2] Date ICONV In English

2005-09-02 Thread Stevenson, Charles
I did not know that! Works like a charm on UV. Mark, how about D3? I just did "DI" not wrapped in an F- or A-correlative: >CT VOC CDS CDS 0001 X 0002 12/15/05 > >LIST VOC "CDS" F2 CDS.DATE CONV "" CDS.DATE LIST VOC "CDS" F2 CDS.DATE CONV "" CDS.DATE 02:53:48pm 02 Sep 2005 PAGE1 VOC.

Re: [U2] RE: Named Common

2005-09-02 Thread Mark Johnson
I started in MV when Jimmy and Billy were in the White House. I actually worked for Microdata. My app exposure during these last 5 presidents has been many, many, many, many home grown systems, Results, Primac, Infoquest, Screen-Gen, Data/Master, IDS, SHIMS, SAS, ABM, TPH and probably one or more

RE: [U2] Date ICONV In English

2005-09-02 Thread Allen E. Elwood
>It isn't that ROFLOL I'm still snickering about it...in 31 years of programming I've never seen anyone store a date in external format. I get all giggly just thinking about it. I had a hard time stopping just to type this message.. :) -Original Message- From: [EMAIL PROTECTED] [mailto:

Re: [U2] Date ICONV In English

2005-09-02 Thread Mark Johnson
It isn't that ROFLOL, rather there are situations where human dates are stored in text fields and can be dissected out. I did have one client's app (circa 1974) that I still support today that I converted the 991231 (YYMMDD) date fields to ICONV's. They had run from 1974 through 1997 when I got on

RE: [U2] UniSubroutine: ErrorCode: 30106: Wrong number of arguments supplied to the subroutine

2005-09-02 Thread Tony Gravagno
Mats Carlid wrote: > We started in Prine information in the early 80's and > used named common from day 1. > > Unnamed common was deemed to be too dangerous if/when > coexisting with another > application or general subroutines in the same > environment and thus _never_ used it - I tend to >

Re: [U2] RE: Named Common

2005-09-02 Thread Mark Johnson
I started in MV when Jimmy and Billy were in the White House. I actually worked for Microdata. My app exposure during these last 5 presidents has been many, many, many, many home grown systems, Results, Primac, Infoquest, Screen-Gen, Data/Master, IDS, SHIMS, SAS, ABM, TPH and probably one or more

RE: [U2] Date ICONV In English

2005-09-02 Thread Allen E. Elwood
I started to post this: As far as I know the human readable is only used during output. In other words, there is no conversion during sorting. The system is already sorting by the internal representation of the date. But now I realize that someone actually STORED the OCONV version of a date in a

RE: [U2] Invalid lock sequence error.

2005-09-02 Thread colin.alfke
I haven't seen that specific error; however, the first thing I check is the file integrity. !guide MELG-VENDOR -o If there are any errors in the file then they will have to be fixed. This is for UniData; the UniVerse tool is a little different. Colin Alfke Calgary, AB >-Original Message-

RE: [U2] RE: Named Common

2005-09-02 Thread Stevenson, Charles
> On another note, I've yet to come across any apps that use > the NAMED COMMON concept. Is that a recent addition to the MV > world or just not that popular. > > Thanks in advance. > Mark Johnson wow. [Pause. It slowly sinks in.] WOW!!! Named (aka labelled) common has been common on aps w

[U2] Invalid lock sequence error.

2005-09-02 Thread Noah Hart
When deleting records from a file, I get the following errors: upl lock error error in U_dyn_hash error in U_delete_tuple Invalid lock sequence In LIA/_TEST at line 8 upl lock error(102). In LIA/_TEST at line 8 1: error in U_dyn_hash for file 'M

Re: [U2] Date ICONV In English

2005-09-02 Thread BRosenberg
007 d2/ 008 di Line 8, the so-called "correlative" attribute, may contain any legal conversion code, such as the "di" code, and isn't restricted to only the "A" and "F" codes. Line 8 is processed *before* data is selected or sorted. Line 7 is processed *after" data is selected or sorted. See the

Re: [U2] Date ICONV In English

2005-09-02 Thread Mark Johnson
I forgot to mention D3. I straddle many MV platforms and this one happens to be D3. AFAIK, it uses only the 10 line dict items and doesn't support the magic of line 002. Thus I'm left with A types, F types or data/basic 008 CALL dict items. I didn't want to bother with a separate subroutine just f

RE: [U2] Date ICONV In English

2005-09-02 Thread CA Software
Mark, For D3: Let's assume that the data is in attribute 1 of the record. Create a new dictionary item with the following attributes: 001 A 002 0 003 Internal Date for Sorting 004 005 006 007 008 F;1;(DI) 009 R 010 6 This will allow you to sort by this field and it will sort by the internal (i

RE: [U2] Programs slowing down after many iterations

2005-09-02 Thread David Wolverton
COMMON behaves similarly to passing variables in a SUBROUTINE command - with the benefit of not being copied back and forth... For Example: PROGRAM PROGA ZZ = 123 BB = "Hello" CALL PROGB(ZZ,BB) END SUBROUTINE PROGB(VAR1,VAR2) PRINT VAR1 PRINT VAR2 END When that runs, the CALL to PROGB copies th

Re: [U2] Date ICONV In English

2005-09-02 Thread Mats Carlid
I'd make an alternative D type dict entry without conversion... -- mats Mark Johnson wrote: To All: Is there any simple method short of an Itype or called routine to convert the human date of 12/15/05 into its ICONV version to then sort by. I've run into another data file on a customer's sys

Re: [U2] UniSubroutine: ErrorCode: 30106: Wrong number of arguments supplied to the subroutine

2005-09-02 Thread Mats Carlid
Mark Johnson wrote: On another note, I've yet to come across any apps that use the NAMED COMMON concept. Is that a recent addition to the MV world or just not that popular. We started in Prine information in the early 80's and used named common from day 1. Unnamed common was deemed to b

Re: [U2] Date ICONV In English

2005-09-02 Thread Gordon J Glorfield
Mark, What is your objection to creating an I descriptor dictionary item? That would be the simplest method. I am assuming the date is stored in human form. Here's the one I used to test it with. 0001 I 0002 ICONV(@RECORD<1>,'D') 0003 0004 I.DATE 0005 10R 0006 S Gordon J. Glorfield Sr

[U2] RE: Named Common

2005-09-02 Thread Piers Angliss
"MV world" covers a multitude of sins I've been using Named Common since the early 1980's, but I started on Prime Information So far as I know Named Common has been around as long as Unidata and Universe - generally known as U2, which is what this list is all about Piers -Original Message--

Re: [U2] Date ICONV In English

2005-09-02 Thread Mark Johnson
I'm open for any suggestions. The system in particular is D3 with its 007 & 008 dict items. But I've looked through my U2 systems as well and didn't see anything. For my education, the exact correlative (sic) for any platform would be helpful. Thanks Again. - Original Message - From: "Ke

Re: [U2] Programs slowing down after many iterations

2005-09-02 Thread Mark Johnson
I second that request. I've only inherited regular COMMONs with the occasional COMMONs buried in an INCLUDE. I've never come across NAMED COMMONS. Thanks Mark Johnson - Original Message - From: "Chauhan, Savita" <[EMAIL PROTECTED]> To: Sent: Friday, September 02, 2005 9:07 AM Subject: RE:

RE: [U2] Date ICONV In English

2005-09-02 Thread CA Software
Try using an F or A correlative and the "DI" conversion code e.g. F;1;(DI) where 1 is the attribute number of the recorded date in Human Read Format. Putting the DI in the conversion of a dictionary won't sort properly. The DI is the Date Iconv correlative. IHTH. Neil Charrington -Origina

RE: [U2] Date ICONV In English

2005-09-02 Thread Kevin King
What kind of system? If UV/UD, do a V/I with an ICONV(...) in the expression. I fear, however, missing details. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson Sent: Friday, September 02, 2005 7:00 AM To: u2-users@listserver.u2ug.org Subjec

RE: [U2] Programs slowing down after many iterations

2005-09-02 Thread Chauhan, Savita
Hi, I read all these emails related to COMMON. I am not too old into the U2 world. It seems like an interesting thing that I should be doing in my programs too. Can someone give me a COMMON-101 or direct me to some manual/document which has basic information about 'common'? Thanks, Savita Chauhan

Re: [U2] Prime number file modulos

2005-09-02 Thread Mark Johnson
I just got a copy of the stat report and found over 100 files who's mods are either obviously not prime, ie 1000 or someone's stupid assumption that 1001 is prime. Plus many of these files are 200%-500% under mod'd (is that a word?). Plus it's the second slowest client of mine (my microdatas are cu

[U2] Date ICONV In English

2005-09-02 Thread Mark Johnson
To All: Is there any simple method short of an Itype or called routine to convert the human date of 12/15/05 into its ICONV version to then sort by. I've run into another data file on a customer's system that has this in a specific place, albeit non-sortable. I could write a [] conversion to put

Re: [U2] UniSubroutine: ErrorCode: 30106: Wrong number of arguments supplied to the subroutine

2005-09-02 Thread Mark Johnson
My 1 cent on parameter lists. As I support many legacy environments, I see parameter lists every hour of every day. They look visibly cluttered with the variable names containing periods and being separated by commas. Some have a few parameters and one app in particular has around 30. Perhaps they