Re: [U2] [UV] I descriptor help

2007-10-03 Thread Richard Taylor
Jim,

You have two choices:

First you can pass in @RECORDxx where xx is the attribute number you want
to work on.

The other way is to not pass anything at all.  The Global UV variables
@RECORD and @MV are available in your program too.  You could reference
them directly. Of course this would make your routine less flexible if that
is a consideration here.

In either case remember that in UV you are dealing with the entire
Multivalued field not just one value mark position.  If your intent is to
create data that is a correlated multivalue also then you must pass back a
multi-valued field not a single value.

Rich Taylor | Senior Programmer/Analyst| VERTIS
250 W. Pratt Street | Baltimore, MD 21201
P 410.361.8688 | F 410.454.8392
[EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.

The more they complicate the plumbing
  the easier it is to stop up the drain

- Montgomery Scott NCC-1701



   
 Jim Koca
 [EMAIL PROTECTED] 
 t To 
 Sent by:  u2-users@listserver.u2ug.org  
 [EMAIL PROTECTED]  cc 
 stserver.u2ug.org 
   Subject 
   [U2] [UV] I descriptor help 
 10/02/2007 03:11  
 PM
   
   
 Please respond to 
 [EMAIL PROTECTED] 
er.u2ug.org
   
   




I need to call a basic subroutine to process a field. The field in the
record is a multivalued field. How do I pass that field to the called
subroutine ?

The field is PARTNO which is defined as a MV field. I want to call a
subroutine such as SUBR('ZGET.PCODE',@RECORD,@MV). I have them associated
in
the same PH record.

Jim Koca
---
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] [UV] I descriptor help

2007-10-02 Thread Karen Bessel
Jim,

If that's the only attribute you're sending, you can define it like
this: SUBR('ZGET.PCODE,@RECORD25) where attribute 25 is the PartNo
field. You don't need to include the @MV in the subroutine argument list
because the subroutine will understand @MV. 

There is no parsing necessary for an i-descriptor to process the
multi-valued field. Just make sure that attribute 6 of the dictionary
item is 'M'.

I hope this helps.

Karen


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Koca
Sent: Tuesday, October 02, 2007 2:04 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] [UV] I descriptor help

I need to call a basic subroutine to process a field. The field in the
record is a multivalued field. How do I pass that field to the called
subroutine ?

The field is PARTNO which is defined as a MV field. I want to call a
subroutine such as SUBR('ZGET.PCODE',@RECORD,@MV). I have them
associated in
the same PH record.

Jim Koca
---
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] UV I-descriptor

2006-02-06 Thread Dave Walker
Fifty don't hurt. My brother-in-law did it just yesterday!

I had to buy a new shredder for all the AARP mailings, though.

:-)
--
Dave Walker
The only reason some people get lost in thought is because it's unfamiliar
territory.
Paul Fix

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 8:07 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] UV I-descriptor
 
 
 OK... so in a few months I'll be 50+ so I will be the OLD 
 'FNG', with still
 a lot to learn.
 
 I did keep Ron P's solution and I will try it out on some of 
 our files where
 we have a G/L# in Field 2 and the dollar amount in Field 3.
 
 That's why I love this users group postings.  Always some 
 great solutions.
 
  
  -Original Message-
  From:   phil walker [SMTP:[EMAIL PROTECTED]
  Sent:   Friday, February 03, 2006 3:03 PM
  To: u2-users@listserver.u2ug.org
  Subject:RE: [U2] UV I-descriptor
  
  Garry,
  
  Sorry to burst your bubble ;-). But I don't think he was 
 looking for a
  hardcoded answer. Your solution would work for the example 
 he gave but I
  am sure he wants a more generic solution which would 
 'locate' the value
  of the 4th '*' delimited field in the FILE 1 @ID in field 5 
 of the FILE
  2 record and then return the value from the corresponding 
 position in
  field 9.
  
  Cheers,
  
  Phil
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  [EMAIL PROTECTED]
  Sent: Saturday, 4 February 2006 11:31 a.m.
  To: u2-users@listserver.u2ug.org
  Subject: RE: [U2] UV I-descriptor
  
  Finally a question I can answer. Oh boy I am not a newbie anymore.
  
  File1 dictionary item:
  
  Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)
  
  so you TRANSLATE to FILE2 using the 2nd value in @ID to 
 return the 9th
  element and then the 3rd position value.
  
  
  *
  Learning Universe for me as a newbie was challenging but the most
  difficult part of my job is trying to decipher the 
 application design,
  since we are not provided with any technical documentation. Or our
  software vendor just does not have any good documentation 
 and relies on
  a few core old timers to make changes and provide an oral 
 history of
  the design. Questions like how is an AP Check disbursement
  tracked/indexed back to the Vendor Invoice go un-answered.  
 So we have a
  TEST account where we reverse engineer the code. 
  
   -Original Message-
   From: Bob Woodward [SMTP:[EMAIL PROTECTED]
   Sent: Friday, February 03, 2006 12:19 PM
   To:   u2-users@listserver.u2ug.org
   Subject:  [U2] UV I-descriptor
   
   Hi Peoples,
   
   I've got a question on coding an I-descriptor in a 
 UV-Pick account.
   
   From file1 with a key of CO*PRODNO*WHS*UOM, I need to 
 pull from file2 
   a conversion value.  File2's key is PRODNO with a 
 multi-valued field 
   of UOM and an associated field of CONV.VAL.  My problem 
 comes in that 
   LOCATE is not valid in an I-DESC formula.
   
   I know I can make a basic program and call it but I 
 prefer to have 
   this totally self contained within the DICT entry.  
 Example data is:
   
   FILE1 @ID = 01*11223344*W1*EA
   
   FILE2 @ID = 11223344
 5 = CS^SP^EA
 9 = 1^2^12
   
   I'm needing to get 12 back to the I-DESC in FILE1, 
 again, hopefully 
   without having to resort to a called basic program.
   
   TIA
   
   BobW
   ---
   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/
 ---
 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] UV I-descriptor

2006-02-06 Thread Pingilley, Ron
Chuck,

Thanks for extending the usefulness of that i-descr.  I tend to
favor i-descr's without @n references so that they can be used as a
reference in another i-descr.  The @n references and semicolons sure
make it more readable, but you are then limited to replicating the logic
in another i-descr rather than just referencing the original one.

But that may be what Bob's actually looking for, trying to limit
reuse of the logic...?

--Ron P.

snip

Now let's generalize it a bit.  Suppose the final answer is a string
instead of numeric.
You can replace the outer
  02: SUM(MULS(...))
with
  o2: CONVERT(@VM,'',IFS(...,'')
as follows:
snip

Of course, we're still left with the problem of maintainability.

Chuck Stevenson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] UV I-descriptor

2006-02-03 Thread Bob Woodward
Hi Peoples,

I've got a question on coding an I-descriptor in a UV-Pick account.

From file1 with a key of CO*PRODNO*WHS*UOM, I need to pull from file2 a
conversion value.  File2's key is PRODNO with a multi-valued field of
UOM and an associated field of CONV.VAL.  My problem comes in that
LOCATE is not valid in an I-DESC formula.

I know I can make a basic program and call it but I prefer to have this
totally self contained within the DICT entry.  Example data is:

FILE1 @ID = 01*11223344*W1*EA

FILE2 @ID = 11223344
  5 = CS^SP^EA
  9 = 1^2^12

I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully
without having to resort to a called basic program.

TIA

BobW
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread Stevenson, Charles
If you need the functionality of LOCATE,  you need to call a subroutine,
period.
My own solution years ago was to write a generic LOCATESUB subroutine to
be called from I-descriptors.
In retrospect, I am not so sure that was a good idea because it is
complicated enough that I never remember it exactly and end up looking
it up.  I have done several i-desc utility subroutines like that, but
LOCATESUB is the one I am unhappy about.

Using my subroutine, I'd end up with some variation on this theme:
01: I
02: RAISE( TRANS(FILE2,@ID['*',1,1], -1, 'X' )); 
SUBR( '*LOCATESUB',@ID['*',4,1],@1,4,1,0,'');
IF @  0 THEN @19,@ ELSE '?'

Of course, that's all on line 2.


TRANS arg3 = -1 means return the entire argument.
TRANS lowers all delimiters, so RAISE bumps them back up again.
Instead of RAISE, I could have just located on subval level.
LOCATESUB has arguments for att, val, subval,  locate-by;
LOCATESUB returns a negative number if, internally, its locate takes the
else clause.  Hence, the IF @0 test.
( Everyone knows that
@ID['*',4,1] == FIELD( @ID, '*', 4, 1 ) == FIELD(@ID,'*',4)
  , right? )

So is LOCATESUB general utility worth it?
If so, you can have it.
If not, a specific subroutine for this I-descriptor is in order.  It
might be more maintainable.

Chas. Stevenson

 From: Bob Woodward
[snip]
 FILE1 @ID = 01*11223344*W1*EA
 
 FILE2 @ID = 11223344
   5 = CS^SP^EA
   9 = 1^2^12
 
 I'm needing to get 12 back to the I-DESC in FILE1, again, 
 hopefully without having to resort to a called basic program.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread GarryS
Finally a question I can answer. Oh boy I am not a newbie anymore.

File1 dictionary item:

Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)

so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
element and then the 3rd position value.


*
Learning Universe for me as a newbie was challenging but the most difficult
part of my job is trying to decipher the application design, since we are
not provided with any technical documentation. Or our software vendor just
does not have any good documentation and relies on a few core old timers
to make changes and provide an oral history of the design. Questions like
how is an AP Check disbursement tracked/indexed back to the Vendor Invoice
go un-answered.  So we have a TEST account where we reverse engineer the
code. 

 -Original Message-
 From: Bob Woodward [SMTP:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 12:19 PM
 To:   u2-users@listserver.u2ug.org
 Subject:  [U2] UV I-descriptor
 
 Hi Peoples,
 
 I've got a question on coding an I-descriptor in a UV-Pick account.
 
 From file1 with a key of CO*PRODNO*WHS*UOM, I need to pull from file2 a
 conversion value.  File2's key is PRODNO with a multi-valued field of
 UOM and an associated field of CONV.VAL.  My problem comes in that
 LOCATE is not valid in an I-DESC formula.
 
 I know I can make a basic program and call it but I prefer to have this
 totally self contained within the DICT entry.  Example data is:
 
 FILE1 @ID = 01*11223344*W1*EA
 
 FILE2 @ID = 11223344
   5 = CS^SP^EA
   9 = 1^2^12
 
 I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully
 without having to resort to a called basic program.
 
 TIA
 
 BobW
 ---
 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] UV I-descriptor

2006-02-03 Thread Pingilley, Ron
 Bob,

Hey, that was fun!  I got this one to work:

 U2UG.TEST
0001 I
0002
SUM(MULS(EQS(RAISE(TRANS(FILE2,OCONV(@ID,G1*1),1,X)),REUSE(OCONV(@
ID,G3*1))),RAISE(TRANS(FILE2,OCONV(@ID,G1*1),2,X
0003 
0004 
0005 10L
0006 M

It gets 1 from file2, using G1*1 of the key from file 1,
compares the multivalues to G3*1 of the file1 key, which results in a
MV'd list of 0 and 1, with the only 1 corresponding to the MV in
file21 that matches.  Then gets 2 from file2, and MULS them
together, and sums the results.  What you get is 1 * the matching
qty-per-uom value from file2.

Give it a whirl, and see if it works for you.  It's pretty nasty
to modify, so a program may be a better solution in the end

--Ron Pingilley

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Woodward
Sent: Friday, February 03, 2006 2:19 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] UV I-descriptor

Hi Peoples,

snip

FILE1 @ID = 01*11223344*W1*EA

FILE2 @ID = 11223344
  5 = CS^SP^EA
  9 = 1^2^12

I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully
without having to resort to a called basic program.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor - slight correction

2006-02-03 Thread Pingilley, Ron
Bob,

Went brain dead on the 5 and 9 in your FILE2.  The corrected
I-descr should read:

0001 I
0002
SUM(MULS(EQS(RAISE(TRANS(FILE2,OCONV(@ID,G1*1),5,X)),REUSE(OCONV(@
ID,G3*1))),RAISE(TRANS(FILE2,OCONV(@ID,G1*1),9,X
0003
0004
0005 10L
0006 M

--Ron P. 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread Gordon J Glorfield
There's just one problem with your attempt.  You must remember that a 
TRANS in UV will lower the delimiters.  So if the field in the remote file 
is value mark delimited, it will be sub-value mark delimited once TRANSed.

You're still an FNG it looks to me. (tic)


Gordon J. Glorfield
Sr. Applications Developer
MAMSI (A UnitedHealth Company)
301-360-8839

[EMAIL PROTECTED] wrote on 02/03/2006 04:54:51 PM:

 Finally a question I can answer. Oh boy I am not a newbie anymore.

 File1 dictionary item:

 Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)

 so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
 element and then the 3rd position value.

[snip]


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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread Bob Woodward
You're so close, Gary, but the catch is setting the value 3 in the
tail end of your FIELD function.  The UOM will change from record to
record in FILE1.  That's what I need the LOCATE function for.

I do grant your elevation from newbie status, though.  smile

BobW
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, February 03, 2006 1:55 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] UV I-descriptor

Finally a question I can answer. Oh boy I am not a newbie anymore.

File1 dictionary item:

Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)

so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
element and then the 3rd position value.


*
Learning Universe for me as a newbie was challenging but the most
difficult
part of my job is trying to decipher the application design, since we
are
not provided with any technical documentation. Or our software vendor
just
does not have any good documentation and relies on a few core old
timers
to make changes and provide an oral history of the design. Questions
like
how is an AP Check disbursement tracked/indexed back to the Vendor
Invoice
go un-answered.  So we have a TEST account where we reverse engineer the
code. 

 -Original Message-
 From: Bob Woodward [SMTP:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 12:19 PM
 To:   u2-users@listserver.u2ug.org
 Subject:  [U2] UV I-descriptor
 
 Hi Peoples,
 
 I've got a question on coding an I-descriptor in a UV-Pick account.
 
 From file1 with a key of CO*PRODNO*WHS*UOM, I need to pull from file2
a
 conversion value.  File2's key is PRODNO with a multi-valued field of
 UOM and an associated field of CONV.VAL.  My problem comes in that
 LOCATE is not valid in an I-DESC formula.
 
 I know I can make a basic program and call it but I prefer to have
this
 totally self contained within the DICT entry.  Example data is:
 
 FILE1 @ID = 01*11223344*W1*EA
 
 FILE2 @ID = 11223344
   5 = CS^SP^EA
   9 = 1^2^12
 
 I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully
 without having to resort to a called basic program.
 
 TIA
 
 BobW
 ---
 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] UV I-descriptor - slight correction

2006-02-03 Thread Bob Woodward
Thanks Ron,

This looks to be close to what I need.  I'll have to see if I can fit
this into my needs.  You're right about maintainability but the trade
off is I don't have to worry about a detached subroutine getting changed
to generalize it for reuse.  There's something to be said for specific
use programming in a non-OOP environment. smile

Charles' comments are good, too, and I've told myself much of what he
said.  I really want to avoid the subroutine method, though,
specifically to force a single use of the function.  The choice of a
bunch of very small, specific use, subroutines verses a general purpose
subroutine is always a dilemma. In this case, I'm wanting to avoid the
general purpose option.  While waiting for replies, I went ahead and did
the subroutine but that's only if we're not able to come up with an
I-DESC only solution.
 

BobW
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pingilley, Ron
Sent: Friday, February 03, 2006 2:27 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] UV I-descriptor - slight correction

Bob,

Went brain dead on the 5 and 9 in your FILE2.  The corrected
I-descr should read:

0001 I
0002
SUM(MULS(EQS(RAISE(TRANS(FILE2,OCONV(@ID,G1*1),5,X)),REUSE(OCONV(@
ID,G3*1))),RAISE(TRANS(FILE2,OCONV(@ID,G1*1),9,X
0003
0004
0005 10L
0006 M

--Ron P. 
---
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] UV I-descriptor

2006-02-03 Thread Louie Bergsagel
Ron Pingilley's solution works, with his posted correction to plug in fields
5 and 9.

On 2/3/06, phil walker [EMAIL PROTECTED] wrote:

 Garry,

 Sorry to burst your bubble ;-). But I don't think he was looking for a
 hardcoded answer. Your solution would work for the example he gave but I
 am sure he wants a more generic solution which would 'locate' the value
 of the 4th '*' delimited field in the FILE 1 @ID in field 5 of the FILE
 2 record and then return the value from the corresponding position in
 field 9.

 Cheers,

 Phil

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Saturday, 4 February 2006 11:31 a.m.
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] UV I-descriptor

 Finally a question I can answer. Oh boy I am not a newbie anymore.

 File1 dictionary item:

 Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)

 so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
 element and then the 3rd position value.


 *
 Learning Universe for me as a newbie was challenging but the most
 difficult part of my job is trying to decipher the application design,
 since we are not provided with any technical documentation. Or our
 software vendor just does not have any good documentation and relies on
 a few core old timers to make changes and provide an oral history of
 the design. Questions like how is an AP Check disbursement
 tracked/indexed back to the Vendor Invoice go un-answered.  So we have a
 TEST account where we reverse engineer the code.

  -Original Message-
  From: Bob Woodward [SMTP:[EMAIL PROTECTED]
  Sent: Friday, February 03, 2006 12:19 PM
  To:   u2-users@listserver.u2ug.org
  Subject:  [U2] UV I-descriptor
 
  Hi Peoples,
 
  I've got a question on coding an I-descriptor in a UV-Pick account.
 
  From file1 with a key of CO*PRODNO*WHS*UOM, I need to pull from file2
  a conversion value.  File2's key is PRODNO with a multi-valued field
  of UOM and an associated field of CONV.VAL.  My problem comes in that
  LOCATE is not valid in an I-DESC formula.
 
  I know I can make a basic program and call it but I prefer to have
  this totally self contained within the DICT entry.  Example data is:
 
  FILE1 @ID = 01*11223344*W1*EA
 
  FILE2 @ID = 11223344
5 = CS^SP^EA
9 = 1^2^12
 
  I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully
  without having to resort to a called basic program.
 
  TIA
 
  BobW
  ---
  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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread GarryS
Well maybe that explains why the designers of our application have made
pervasive use of the TILDE (~) to delimit many of their data elements. (toc)

 -Original Message-
 From: Gordon J Glorfield [SMTP:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 2:43 PM
 To:   u2-users@listserver.u2ug.org
 Subject:  RE: [U2] UV I-descriptor
 
 There's just one problem with your attempt.  You must remember that a 
 TRANS in UV will lower the delimiters.  So if the field in the remote file
 
 is value mark delimited, it will be sub-value mark delimited once TRANSed.
 
 You're still an FNG it looks to me. (tic)
 
 
 Gordon J. Glorfield
 Sr. Applications Developer
 MAMSI (A UnitedHealth Company)
 301-360-8839
 
 [EMAIL PROTECTED] wrote on 02/03/2006 04:54:51 PM:
 
  Finally a question I can answer. Oh boy I am not a newbie anymore.
 
  File1 dictionary item:
 
  Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)
 
  so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
  element and then the 3rd position value.
 
 [snip]
 
 
 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
 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] UV I-descriptor

2006-02-03 Thread GarryS
Thanks for the promotion BOB...  

Gordon still  thinks I just an FNG ...  woww... MAMSI must have cut-back on
the NICE pills.(sha-zam).


 -Original Message-
 From: Bob Woodward [SMTP:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 2:49 PM
 To:   u2-users@listserver.u2ug.org
 Subject:  RE: [U2] UV I-descriptor
 
 You're so close, Gary, but the catch is setting the value 3 in the
 tail end of your FIELD function.  The UOM will change from record to
 record in FILE1.  That's what I need the LOCATE function for.
 
 I do grant your elevation from newbie status, though.  smile
 
 BobW
  
 
  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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread GarryS
OK... so in a few months I'll be 50+ so I will be the OLD 'FNG', with still
a lot to learn.

I did keep Ron P's solution and I will try it out on some of our files where
we have a G/L# in Field 2 and the dollar amount in Field 3.

That's why I love this users group postings.  Always some great solutions.

 
 -Original Message-
 From: phil walker [SMTP:[EMAIL PROTECTED]
 Sent: Friday, February 03, 2006 3:03 PM
 To:   u2-users@listserver.u2ug.org
 Subject:  RE: [U2] UV I-descriptor
 
 Garry,
 
 Sorry to burst your bubble ;-). But I don't think he was looking for a
 hardcoded answer. Your solution would work for the example he gave but I
 am sure he wants a more generic solution which would 'locate' the value
 of the 4th '*' delimited field in the FILE 1 @ID in field 5 of the FILE
 2 record and then return the value from the corresponding position in
 field 9.
 
 Cheers,
 
 Phil
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Saturday, 4 February 2006 11:31 a.m.
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] UV I-descriptor
 
 Finally a question I can answer. Oh boy I am not a newbie anymore.
 
 File1 dictionary item:
 
 Field(TRANS(FILE2,FIELD(@ID,'*',2),9,'X'),VM,3)
 
 so you TRANSLATE to FILE2 using the 2nd value in @ID to return the 9th
 element and then the 3rd position value.
 
 
 *
 Learning Universe for me as a newbie was challenging but the most
 difficult part of my job is trying to decipher the application design,
 since we are not provided with any technical documentation. Or our
 software vendor just does not have any good documentation and relies on
 a few core old timers to make changes and provide an oral history of
 the design. Questions like how is an AP Check disbursement
 tracked/indexed back to the Vendor Invoice go un-answered.  So we have a
 TEST account where we reverse engineer the code. 
 
  -Original Message-
  From:   Bob Woodward [SMTP:[EMAIL PROTECTED]
  Sent:   Friday, February 03, 2006 12:19 PM
  To: u2-users@listserver.u2ug.org
  Subject:[U2] UV I-descriptor
  
  Hi Peoples,
  
  I've got a question on coding an I-descriptor in a UV-Pick account.
  
  From file1 with a key of CO*PRODNO*WHS*UOM, I need to pull from file2 
  a conversion value.  File2's key is PRODNO with a multi-valued field 
  of UOM and an associated field of CONV.VAL.  My problem comes in that 
  LOCATE is not valid in an I-DESC formula.
  
  I know I can make a basic program and call it but I prefer to have 
  this totally self contained within the DICT entry.  Example data is:
  
  FILE1 @ID = 01*11223344*W1*EA
  
  FILE2 @ID = 11223344
5 = CS^SP^EA
9 = 1^2^12
  
  I'm needing to get 12 back to the I-DESC in FILE1, again, hopefully 
  without having to resort to a called basic program.
  
  TIA
  
  BobW
  ---
  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/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread Stevenson, Charles
 From: Louie Bergsagel
 Ron Pingilley's solution works, with his posted correction to 
 plug in fields 5 and 9.

Ron's method does indeed work.  Nice work, Ron!

Now let's generalize it a bit.  Suppose the final answer is a string
instead of numeric.
You can replace the outer 
  02: SUM(MULS(...)) 
with 
  o2: CONVERT(@VM,'',IFS(...,'')
as follows:

 
02:CONVERT(@VM,'',IFS(EQS(RAISE(TRANS(FILE2,OCONV(@ID,G1*1),5,X)),
REUSE(OCONV(@ID,G3*1))),RAISE(TRANS(FILE2,OCONV(@ID,
G1*1),9,X)),''))

or equivalently:

  02:
@ID['*',4,1];TRANS(FILE2,@ID['*',2,1],-1,'X');EQS(@21,5,REUSE(@1));IFS
(@,@21,9,'');CONVERT(@SM,'',@)

depending on taste/standards manual.

Of course, we're still left with the problem of maintainability.

Chuck Stevenson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] UV I-descriptor

2006-02-03 Thread Bob Woodward
Thanks for all the help, folks!  It solves my problem quite well and
lets me document it in one place.

These things almost fly themselves.

As always, you all super!

BobW
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stevenson,
Charles
Sent: Friday, February 03, 2006 5:26 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] UV I-descriptor

 From: Louie Bergsagel
 Ron Pingilley's solution works, with his posted correction to 
 plug in fields 5 and 9.

Ron's method does indeed work.  Nice work, Ron!

Now let's generalize it a bit.  Suppose the final answer is a string
instead of numeric.
You can replace the outer 
  02: SUM(MULS(...)) 
with 
  o2: CONVERT(@VM,'',IFS(...,'')
as follows:

 
02:CONVERT(@VM,'',IFS(EQS(RAISE(TRANS(FILE2,OCONV(@ID,G1*1),5,X)),
REUSE(OCONV(@ID,G3*1))),RAISE(TRANS(FILE2,OCONV(@ID,
G1*1),9,X)),''))

or equivalently:

  02:
@ID['*',4,1];TRANS(FILE2,@ID['*',2,1],-1,'X');EQS(@21,5,REUSE(@1));IFS
(@,@21,9,'');CONVERT(@SM,'',@)

depending on taste/standards manual.

Of course, we're still left with the problem of maintainability.

Chuck Stevenson
---
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/