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,99999]),' ',3,1)
I tested this on a record with NOTES like this:
COMBO YS 11111111112Misc Text2Misc Text2COMBO YS 0731022Misc Text2COMBO YS
12342BLAH2BLAH2COMBO YS 23452XXX2COMBO YS 8882COMBO YS 3692ME
TOO2HELLO2COMBO YS 999999999
Which reads better as:
001: COMBO YS 1111111111
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 999999999
And when I run it I get:
LIST BP "DATA" EXT 00:41:45 Jun 29 2006 1
BP........ .................................................
DATA 1111111111
073102
1234
2345
888
369
999999999
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: [email protected]
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 Analyst School of Veterinary Medicine
[EMAIL PROTECTED] University of Pennsylvania
610-925-6438
-------
u2-users mailing list
[email protected]
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
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/