Thanks guys. Ray, I've checked our 10-part DEFINE.DF statement - you are correct; it actually assigns each part from part 1, not from 0 (so I can only assume the +1 in the algorithm does this, ie @ID...+1):
DEFINE.DF MYDATA ADDING DATA_0 1 DATA_1 2 ...etc... INTERNAL "@ID[LEN(@ID),1]+1" Are you able to tell me a little more about MOD and SEQ, or describe what the algorithm does? (Just briefly.) 1+MOD(SEQ(@ID[1]),5) Ross - yes, in my case (so far), the @IDs are pseudo random. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ross Ferris Sent: Tuesday, 7 September 2004 21:34 To: [EMAIL PROTECTED] Subject: RE: [U2] Part file algorithms - am I correct? Importance: Low This is assuming that the @ID's are pseudo-random. I would think that if there IS a unique identifier part (eg: a branch number, state designator etc) you may be better off using this ESPECIALLY if this were used as part of a SELECT sequence (I think, and will happily be corrected) However, if you are simply trying to get around the 2Gb barrier .... anything will do Ross Ferris Stamina Software Visage an Evolution in Software Development >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:owner-u2- >[EMAIL PROTECTED] On Behalf Of Ray Wurlod >Sent: Tuesday, 7 September 2004 4:41 PM >To: [EMAIL PROTECTED] >Subject: Re: [U2] Part file algorithms - am I correct? > >Part file numbers must be strictly positive; part number 0 is illegal. >You may find the MOD function better, for example for five parts >1+MOD(@ID[1],5) >If the final key character is non-numeric (or even if it's numeric), add a >SEQ function, for example for five parts 1+MOD(SEQ(@ID[1]),5) > >----- Original Message ----- >From: "LeRoi Keiller" <[EMAIL PROTECTED]> >Date: Tue, 7 Sep 2004 11:38:59 +1000 >To: "U2-Users (E-mail)" <[EMAIL PROTECTED]> >Subject: [U2] Part file algorithms - am I correct? > >> Hi >> >> I've been trying to make sense of part file algorithms for some >distributed >> file work I'm doing. In so doing, I've come up with the following >> "micro-explanations" and examples. >> >> Can anyone in the know please say whether the following is correct? ... >> >> >> If a file has [EMAIL PROTECTED] records consisting mainly of numbers (or more >> specifically, ending with a number), algorithms like the following can be >used >> to spread incoming data across the parts: >> >> For a... >> >> 2-part file: "INDEX('01234',@ID[LEN(@ID),1],1); IF @1 THEN 1 ELSE 2" >> (Records ending 0-4 go into one file, all else (eg 5-9) go into the >other) >> >> 4-part file: "@ID[1]; IF NUM(@1) THEN >CONVERT("0123456789","1122333444",@1) >> ELSE 2" >> (A compromise, as the 10 digits (0-9) don't go evenly into 4 groups or >> parts.) >> (The ELSE 2 just puts anything non-conforming into part 2) >> >> 5-part file: "@ID[1]; IF NUM(@1) THEN >CONVERT("0123456789","1122334455",@1) >> ELSE 1" >> (Puts records ending 0-1 into part 1, records ending 2-3 into part 2, >etc.) >> (All else, ie non-numeric, go into part 1.) >> >> 10-part file: "INTERNAL "@ID[LEN(@ID),1]+1"" >> (Looks to me like this simply puts records ending 0-9 into the same- >numbered >> part file, ie records ending with 0 go into part 0. CAUTION: Obviously >this >> means the part files must start their numbering from 0.) >> >> Thanks, >> LeRoi >> >> LeRoi Keiller >> Technical Support >> >> Ultradata - Vision to Reality >> +61 3 9291 1700 >> www.ultradata.com.au >> ------- >> 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/ > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.752 / Virus Database: 503 - Release Date: 3/09/2004 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.752 / Virus Database: 503 - Release Date: 3/09/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/
