RE: [U2] Question about a dictionary item (2nd question)
Off the top, modify the I-Descriptor to be : TRANS("OTHERFILE",NOTES,-1);@1[INDEX(@1,"COMBO YS ",1)+9,6] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: June 29, 2006 09:54 To: u2-users@listserver.u2ug.org Subject: Re: [U2] Question about a dictionary item (2nd question) If I want to reference this with a dictionary item in a second file, can I do that? I tried setting up an S type "NOTES" entry in the DICT item for the second file with the conversion set up as "T1,6}TFILENAME;X;44;44" and then tried using the code below for an I descriptor, but it couldn't handle it. The display was blank. Am I trying to do too much using the dictionary? gerry-u2ug wrote: >A 15 second I-Descriptor : > NOTES[INDEX(NOTES,"COMBO YS ",1)+9,6] > >If the length of the data you are after is variable to the end of the >field > NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1> > >Or extends to the next space or end of field > NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1>[' ',1,1] > > > > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Pamela J >Robbins >Sent: June 28, 2006 15:01 >To: u2-users@listserver.u2ug.org >Subject: [U2] Question about a dictionary item > >Hi, > >I have a multi-value attribute that's made up of free text remarks. >However, we put a couple of system messages there as well. I need to >extract the 6 digit number that follows the "COMBO YS " in the line >below, but I'm having trouble setting up the conversion code in the >dictionary. > >Misc Text}Misc Text}COMBO YS 073102}Misc Text > >Could someone give me some suggestions? > > > -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Question about a dictionary item (2nd question)
If I want to reference this with a dictionary item in a second file, can I do that? I tried setting up an S type "NOTES" entry in the DICT item for the second file with the conversion set up as "T1,6}TFILENAME;X;44;44" and then tried using the code below for an I descriptor, but it couldn't handle it. The display was blank. Am I trying to do too much using the dictionary? gerry-u2ug wrote: A 15 second I-Descriptor : NOTES[INDEX(NOTES,"COMBO YS ",1)+9,6] If the length of the data you are after is variable to the end of the field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1> Or extends to the next space or end of field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1>[' ',1,1] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: June 28, 2006 15:01 To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Question about a dictionary item
Thanks, the 15 second I-Descriptor worked perfectly for me in Universe. Pam gerry-u2ug wrote: A 15 second I-Descriptor : NOTES[INDEX(NOTES,"COMBO YS ",1)+9,6] If the length of the data you are after is variable to the end of the field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1> Or extends to the next space or end of field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1>[' ',1,1] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: June 28, 2006 15:01 To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Question about a dictionary item
There could be other numbers within the attribute. I should have said earlier, but we're running Universe. Kevin King wrote: Is there any other number in there? If not, why not simply use the MCN conversion? -Kevin [EMAIL PROTECTED] http://www.PrecisOnline.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 1:01 PM To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
Hi Pam, I am guessing you are on Unidata and probably a Datatel client, and if so, many of the suggested methods won't work as they are designed for Universe. The i-desc below should work for you. It returns your number 073102. More over, it returns any number of numbers depending on how many "COMBO YS" codes you have on the line. If you are using Datatel there are subroutines that make this job easier (such as S.IFS) but the i-desc below works on an off the shelf Unidata box. This does assume that the "COMBO YS" fields are at the start of each field - no leading spaces or anything. Anyway, just paste this into field 2 of a new i-desc. SUBR("-FIELDS",CONVERT('~',@VM,CONVERT(@VM,' ',SUBR("-CATS",SUBR("-CHARS",SUBR("-INDEXS",NOTES,"COMBO YS",1)*REUSE(94)+REUSE(32)),NOTES))['~',2,9]),' ',3,1) I tested this on a record with NOTES like this: COMBO YS 112Misc Text2Misc Text2COMBO YS 0731022Misc Text2COMBO YS 12342BLAH2BLAH2COMBO YS 23452XXX2COMBO YS 8882COMBO YS 3692ME TOO2HELLO2COMBO YS 9 Which reads better as: 001: COMBO YS 11 002: Misc Text 003: Misc Text 004: COMBO YS 073102 005: Misc Text 006: COMBO YS 1234 007: BLAH 008: BLAH 009: COMBO YS 2345 010: XXX 011: COMBO YS 888 012: COMBO YS 369 013: ME TO 014: HELLO 015: COMBO YS 9 And when I run it I get: LIST BP "DATA" EXT 00:41:45 Jun 29 2006 1 BP . DATA 11 073102 1234 2345 888 369 9 1 record listed Hope that helps, Jeff Flynt ~ ~ Jeff Flynt~ ~ Applications Systems Analyst, Sr. ~ ~ Information Resources Management ~ ~ Arizona State University ~ ~ [EMAIL PROTECTED]~ ~ (480) 965-6870~ ~ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 12:01 PM To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.6/378 - Release Date: 6/28/2006 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.6/378 - Release Date: 6/28/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.6/378 - Release Date: 6/28/2006 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
>Under very specific scenarios, something like this should work. But if >the string 'COMBO YS' exists more then once, it will only retrieve the >first value. And the syntax must be very consistent. >1> I >2> INDEX(@RECORD< 999>,"COMBO YS","1");IF @1 > "0" THEN >@RECORD< 999>[EMAIL PROTECTED]"9","6"] ELSE "" Use the vector functions IFS() and INDEXS() instead, then you don't have to worry about how often it occurs. 001 I 002 ifs(indexs(NOTES,'COMBO YS',1),fields(NOTES,' ',3),'') ** This email message and any files transmitted with it are confidential and intended solely for the use of addressed recipient(s). If you have received this email in error please notify the Spotless IS Support Centre (+61 3 9269 7555) immediately, who will advise further action. This footnote also confirms that this email message has been scanned for the presence of computer related viruses. ** --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
>From the docs : "if delimiter evaluates to more than one character, the first character is used." 1 reuse is not required. 2 fields works on FM delimited data so should be lower(FIELDS(raise(ATTNAME),"YS ",2)) 3 this won't work either way as the delimiter will be "Y" not "COMBO YS " -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Gallen Sent: June 28, 2006 15:18 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Question about a dictionary item FIELDS(ATTNAME,REUSE("YS "),2) or is it FIELDS(REUSE("YS"),2,ATTNAME) I forget which format is used in the DICT I desc. I haven't tested this. I believe the REUSE needs to be there... George > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Pamela J Robbins > Sent: Wednesday, June 28, 2006 3:01 PM > To: u2-users@listserver.u2ug.org > Subject: [U2] Question about a dictionary item > > > Hi, > > I have a multi-value attribute that's made up of free text remarks. > However, we put a couple of system messages there as well. > I need to > extract the 6 digit number that follows the "COMBO YS " in the line > below, but I'm having trouble setting up the conversion code in the > dictionary. > > Misc Text}Misc Text}COMBO YS 073102}Misc Text > > Could someone give me some suggestions? > > -- > Pamela J Robbins New Bolton Center > Senior Programmer AnalystSchool of Veterinary Medicine > [EMAIL PROTECTED] University of Pennsylvania > 610-925-6438 > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
Under very specific scenarios, something like this should work. But if the string 'COMBO YS' exists more then once, it will only retrieve the first value. And the syntax must be very consistent. 1> I 2> INDEX(@RECORD<999>,"COMBO YS","1");IF @1 > "0" THEN @RECORD<999>[EMAIL PROTECTED]"9","6"] ELSE "" Good luck, Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 12:01 PM To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
A 15 second I-Descriptor : NOTES[INDEX(NOTES,"COMBO YS ",1)+9,6] If the length of the data you are after is variable to the end of the field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1> Or extends to the next space or end of field NOTES[INDEX(NOTES,"COMBO YS ",1)+9,99]<1,1>[' ',1,1] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: June 28, 2006 15:01 To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
I would do it in a subroutine called from an I Type. 1: I 2: SUBR('GET.NUMBER',fieldname) ... The subroutine could walk the values of the field and find the "COMBO YS" and pick off the number. SUBROUTINE GET.NUMBER(ANS,FIELDNAME) ANS = '' VM.CNT = DCOUNT(FIELDNAME,@VM) FOR I = 1 TO VM.CNT X = INDEX(FIELDNAME<1,I>,'COMBO YS',1) IF X THEN ANS = FIELD(FIELDNAME<1,I>,' ',3) RETURN END NEXT I RETURN This is just my way of doing it. HTH Tom Dodds [EMAIL PROTECTED] 513-563-2800 Cincinnati Office 708-234-9608 Chicago Office 630-235-2975 Anywhere Cell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 3:01 PM To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
Is there any other number in there? If not, why not simply use the MCN conversion? -Kevin [EMAIL PROTECTED] http://www.PrecisOnline.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 1:01 PM To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
FIELDS(ATTNAME,REUSE("YS "),2) or is it FIELDS(REUSE("YS"),2,ATTNAME) I forget which format is used in the DICT I desc. I haven't tested this. I believe the REUSE needs to be there... George > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Pamela J Robbins > Sent: Wednesday, June 28, 2006 3:01 PM > To: u2-users@listserver.u2ug.org > Subject: [U2] Question about a dictionary item > > > Hi, > > I have a multi-value attribute that's made up of free text remarks. > However, we put a couple of system messages there as well. > I need to > extract the 6 digit number that follows the "COMBO YS " in the line > below, but I'm having trouble setting up the conversion code in the > dictionary. > > Misc Text}Misc Text}COMBO YS 073102}Misc Text > > Could someone give me some suggestions? > > -- > Pamela J Robbins New Bolton Center > Senior Programmer AnalystSchool of Veterinary Medicine > [EMAIL PROTECTED] University of Pennsylvania > 610-925-6438 > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Question about a dictionary item
Hi Pamela, Personally, I would setup a SUBR type dict and then just do a loop: SUBROUTINE SUB.GET.NBR(RETURN.VALUE, DATA.ITEM) C = DCOUNT(DATA.ITEM,@VM) RETURN.VALUE = "" FOR I = 1 TO C IF DATA.ITEM<1,I>[1,8] = "COMBO YS" THEN RETURN.VALUE = FIELD(DATA.ITEM<1,I>,' ',3) RETURN END NEXT I RETURN I'm sure there's probably a way to do it with the REUSE stuff but due to development time I avoid those, as the above took me about 90 seconds.clients like that. hth, Allen E. Elwood www.tortillafc.com Quality Code Since 1978 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Pamela J Robbins Sent: Wednesday, June 28, 2006 12:01 To: u2-users@listserver.u2ug.org Subject: [U2] Question about a dictionary item Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Question about a dictionary item
Hi, I have a multi-value attribute that's made up of free text remarks. However, we put a couple of system messages there as well. I need to extract the 6 digit number that follows the "COMBO YS " in the line below, but I'm having trouble setting up the conversion code in the dictionary. Misc Text}Misc Text}COMBO YS 073102}Misc Text Could someone give me some suggestions? -- Pamela J Robbins New Bolton Center Senior Programmer AnalystSchool of Veterinary Medicine [EMAIL PROTECTED] University of Pennsylvania 610-925-6438 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/