RE: Help on uv syntax, please
The problem (or not problem) with RAISE, is that it will also change all other marks at the same time. If you have a|b|c}d|e|f, and want a}b}c}d}e}f, you have to use CONVERT. RAISE will give you a}b}c^d}e}f *note ^ = fm, } = vm, | = svm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Glorfield Sent: Tuesday, April 27, 2004 12:18 PM To: 'U2 Users Discussion List' Subject: RE: Help on uv syntax, please To do what you are saying I would use the RAISE function. NEWARRAY = RAISE(OLDARRAY) This would change all @SVM to @VM. Of course you would have to be kind of careful with it as it would also change all @VM to @AM. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn > Sent: Tuesday, April 27, 2004 12:48 PM > To: [EMAIL PROTECTED] > Subject: Help on uv syntax, please > > > Hi. > Anybody got the syntax for universe for changing one string > to another in an array? Mostly I use it for changing a > subvalued field into a multivalued one. > > In Unidata, for example, its > NEWARRAY = CHANGE(OLDARRAY,SVM,VM) > > I'm looking for a similar function in universe. > > (p.s. if you could e.mail me directly -- I am on "digest > mode" and won't get the answer all day - thanks!) > > > -- > u2-users mailing list > [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users > This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
> From: John Cassidy [mailto:[EMAIL PROTECTED] > > hanks, charlys. Pady py day. 0001 X = 'How much wood would a woodchuck chuck, if a woodchuck could chuck wood?' 0002 CRT X 0003 CRT CONVERT( 'woodchuck', 'groundhog', X ) 0004 CRT CHANGE( CHANGE( X, 'wood', 'ground' ), 'chuck', 'hog' ) >RUN CDS.BP C How much wood would a woodchuck chuck, if a woodchuck could chuck wood? Hrg mhnd grru grhlu a grrundhng ndhng, if a grrundhng nrhlu ndhng grru? How much ground would a groundhog hog, if a groundhog could hog ground? That's what you get for encouraging me. Now I've got to get some work done. Chuck "do not feed the hogs" Stevenson -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
> >-Original Message- > >From: Stevenson, Charles [mailto:[EMAIL PROTECTED] > [snip] > > > >Don't use CONVERT! Example: > > > [snip] > > But it's great for things like: > > LINE = PRINT.ARRAY > CONVERT @VM:"0.-" TO "" IN LINE > IF LINE # "" THEN > GOSUB PRINT.LINE > END I stand corrected. I don't mean there are no legitimate uses for CONVERT. In the spirit of Abraham Lincoln who once said, "For people who like this sort of thing, this is exactly the sort of thing they'd like", I'll say, Do not use CONVERT except for exactly the sort of thing CONVERT should be used for. Ok, Abe's was better. I use convert a lot. Examples: 1. When I'm trying to debug a complicated multivalue-handling i-descriptor that isn't acting like I expect, I tack a convert on the end & LIST to see what I've got: 01 I 02 [complicated buggy mv expression] ; CONVERT( @IM:@AM:@VM:@SM:@TM, 'iavst', @ ) 05 80L<--- wide enough to see string 06 S <--- it's not M anymore. 2. To yield a dyn array of question marks or blanks depending on whether corresponding values are equal: 01 I 02 CONVERT( '01', '?', EQS( MV.THING1, MV.THING2 ) ) -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
>-Original Message- >From: Stevenson, Charles [mailto:[EMAIL PROTECTED] [snip] > >Don't use CONVERT! Example: > [snip] But it's great for things like: LINE = PRINT.ARRAY CONVERT @VM:"0.-" TO "" IN LINE IF LINE # "" THEN GOSUB PRINT.LINE END But yes, you do need to remember it is a CHARACTER conversion and not a string replace. -- Colin Alfke Calgary, Alberta Canada "Just because something isn't broken doesn't mean that you can't fix it" Stu Pickles -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
hanks, charlys. Pady py day. >>> [EMAIL PROTECTED] 4/27/04 12:55:39 PM >>> > I use CONVERT expression1 TO expression2 IN variable > Don't use CONVERT! Example: CRT CONVERT( 'Muffet', 'Piggy', 'Little Miss Muffet sat on a tuffet eating her curds and whey.' ) yields the string: Lily Piss Piggy sa on a iggy yaing hyr cirds and whyy. which is offensive enough even for those of us who don't speak Welsh. cds P.S. Last week I said "REPLACE()" instead of "CHANGE()" in the following post. I've corrected it ( i.e., CHANGE( 'REPLACE()', 'CHANGE()', MSGBODY ) ) here: -Original Message- From: Stevenson, Charles Sent: Thursday, April 22, 2004 2:41 PM To: 'U2 Users Discussion List' Subject: RE: How do we convert lowercase letters to uppercase in Pick basic and just cuz no one mentioned it ( not cuz it's better than UPCASE() & DOWNCASE() ), CONVERT does character for character swapping: CONVERT 'abcdefghijklmnopqrstuvwxyz' TO 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' in ANYSTR and CONVERT 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' TO 'abcdefghijklmnopqrstuvwxyz' in ANYSTR or UPSTR = CONVERT( 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ANYSTR ) and DNSTR = CONVERT( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz', ANYSTR ) depending on your mood. Note the difference between CHANGE() & CONVERT(). Use CHANGE() to replace an entire substring with another substring. CONVERT does char by char. A common misconception. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
> I use CONVERT expression1 TO expression2 IN variable > Don't use CONVERT! Example: CRT CONVERT( 'Muffet', 'Piggy', 'Little Miss Muffet sat on a tuffet eating her curds and whey.' ) yields the string: Lily Piss Piggy sa on a iggy yaing hyr cirds and whyy. which is offensive enough even for those of us who don't speak Welsh. cds P.S. Last week I said "REPLACE()" instead of "CHANGE()" in the following post. I've corrected it ( i.e., CHANGE( 'REPLACE()', 'CHANGE()', MSGBODY ) ) here: -Original Message- From: Stevenson, Charles Sent: Thursday, April 22, 2004 2:41 PM To: 'U2 Users Discussion List' Subject: RE: How do we convert lowercase letters to uppercase in Pick basic and just cuz no one mentioned it ( not cuz it's better than UPCASE() & DOWNCASE() ), CONVERT does character for character swapping: CONVERT 'abcdefghijklmnopqrstuvwxyz' TO 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' in ANYSTR and CONVERT 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' TO 'abcdefghijklmnopqrstuvwxyz' in ANYSTR or UPSTR = CONVERT( 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', ANYSTR ) and DNSTR = CONVERT( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz', ANYSTR ) depending on your mood. Note the difference between CHANGE() & CONVERT(). Use CHANGE() to replace an entire substring with another substring. CONVERT does char by char. A common misconception. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
http://publibfi.boulder.ibm.com/epubs/pdf/25119090.pdf 10.1 Basic Ref, pg 162 CHANGE (expression, substring, replacement [ ,occurrence [ ,begin] ] ) -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
To do what you are saying I would use the RAISE function. NEWARRAY = RAISE(OLDARRAY) This would change all @SVM to @VM. Of course you would have to be kind of careful with it as it would also change all @VM to @AM. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn > Sent: Tuesday, April 27, 2004 12:48 PM > To: [EMAIL PROTECTED] > Subject: Help on uv syntax, please > > > Hi. > Anybody got the syntax for universe for changing one string > to another in an array? Mostly I use it for changing a > subvalued field into a multivalued one. > > In Unidata, for example, its > NEWARRAY = CHANGE(OLDARRAY,SVM,VM) > > I'm looking for a similar function in universe. > > (p.s. if you could e.mail me directly -- I am on "digest > mode" and won't get the answer all day - thanks!) > > > -- > u2-users mailing list > [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users > This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
UniVerse format: NEWARRAY = CONVERT(VM,SVM,OLDARRAY) Assuming VM = @VM or char(253) and SVM = @SM or char(252), This will use the data in OLDARRAY, convert all Value Marks to Sub-Value Marks, and assign the new data to NEWARRAY. Thanks, --Glenn. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: Tuesday, April 27, 2004 11:48 AM To: [EMAIL PROTECTED] Subject: Help on uv syntax, please Hi. Anybody got the syntax for universe for changing one string to another in an array? Mostly I use it for changing a subvalued field into a multivalued one. In Unidata, for example, its NEWARRAY = CHANGE(OLDARRAY,SVM,VM) I'm looking for a similar function in universe. (p.s. if you could e.mail me directly -- I am on "digest mode" and won't get the answer all day - thanks!) -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please[Scanned]
So I could use the exact same 'CHANGE' syntax on Universe, then? That would be ideal -- even though I'm only converting the one character -- so could use CONVERT -- but if the same syntax will work as on UD then that's even better! Does this work with the exact same syntax? Where NEWARRAY = CHANGE(OLDARRAY,SVM,VM) Would change the char(252) to char(253) in the string 'OLDARRAY' Thanks a mil, Susan -Original Message- From: Georgia L. Pritchett [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 12:59 PM To: U2 Users Discussion List Cc: [EMAIL PROTECTED] Subject: RE: Help on uv syntax, please[Scanned] Actually CONVERT will only work to replace 1 character with 1 other character (well, it's more complicated than that because you provide a list of character to replace and another list of character to use for replacement but it's positionally dependant). It's what I use for converting 1 single character to another single character myself. But the CHANGE function, which is available in Universe, is more powerful since it can take a substring and convert it to a different length substring. So you convert all the OUT's in your string to IN's. Georgia Pritchett > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Kishor Parmar > > > I use CONVERT expression1 TO expression2 IN variable > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Susan Joslyn > Sent: 27 April 2004 17:48 > To: [EMAIL PROTECTED] > Subject: Help on uv syntax, please > > Hi. > Anybody got the syntax for universe for changing one string to another > in an > array? Mostly I use it for changing a subvalued field into a > multivalued > one. > > In Unidata, for example, its > NEWARRAY = CHANGE(OLDARRAY,SVM,VM) > > I'm looking for a similar function in universe. > -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please[Scanned]
Actually CONVERT will only work to replace 1 character with 1 other character (well, it's more complicated than that because you provide a list of character to replace and another list of character to use for replacement but it's positionally dependant). It's what I use for converting 1 single character to another single character myself. But the CHANGE function, which is available in Universe, is more powerful since it can take a substring and convert it to a different length substring. So you convert all the OUT's in your string to IN's. Georgia Pritchett > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Kishor Parmar > > > I use CONVERT expression1 TO expression2 IN variable > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Susan Joslyn > Sent: 27 April 2004 17:48 > To: [EMAIL PROTECTED] > Subject: Help on uv syntax, please > > Hi. > Anybody got the syntax for universe for changing one string to another > in an > array? Mostly I use it for changing a subvalued field into a > multivalued > one. > > In Unidata, for example, its > NEWARRAY = CHANGE(OLDARRAY,SVM,VM) > > I'm looking for a similar function in universe. > -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Help on uv syntax, please
By "array" I assume you mean dynamic array and, as such, would use: NEWARRAY = CHANGE(OLDARRAY,@SVM, @VM) At 12:47 PM 4/27/2004, you wrote: Hi. Anybody got the syntax for universe for changing one string to another in an array? Mostly I use it for changing a subvalued field into a multivalued one. In Unidata, for example, its NEWARRAY = CHANGE(OLDARRAY,SVM,VM) I'm looking for a similar function in universe. (p.s. if you could e.mail me directly -- I am on "digest mode" and won't get the answer all day - thanks!) -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Help on uv syntax, please
I use CONVERT expression1 TO expression2 IN variable -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn Sent: 27 April 2004 17:48 To: [EMAIL PROTECTED] Subject: Help on uv syntax, please Hi. Anybody got the syntax for universe for changing one string to another in an array? Mostly I use it for changing a subvalued field into a multivalued one. In Unidata, for example, its NEWARRAY = CHANGE(OLDARRAY,SVM,VM) I'm looking for a similar function in universe. (p.s. if you could e.mail me directly -- I am on "digest mode" and won't get the answer all day - thanks!) -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users Internet Email Confidentiality: Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. Should you wish to communicate with us by e-mail, we cannot guarantee the security of any data outside our own computer systems. Please note that voice calls to Call Stream may be recorded or monitored. 27/4/2004 Kishor Parmar [EMAIL PROTECTED] -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users