[U2] Reading/Writing MySQL Records into/out of Universe 10.x from Universe 10.x

2005-11-07 Thread Dave Taylor
I've reviewed the archives and haven't found any definitive strategies for
reliably reading/writing MySQL records into/out of Universe 10.x from Universe
10.x.

Does anyone have any directly applicable and successful how-you've-done-it
experience in this area?

tia,

Dave

Dave Taylor
President
Sysmark Information Systems, Inc.
49 Aspen Way
Rolling Hills Estates, CA 90274
800-SYSMARK (800-797-6275)
(O) 310-544-1974
(P) 800-339-1497
(F) 310-377-3550
Your Source for Integrated EDI Translation and DataSync Integration
www.sysmarkinfo.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Sort help needed

2005-11-07 Thread Mark Johnson
Sidebar:

Did (does) any system require the null expression for DICT in an OPEN
statement. Haven't used them since 1978 when I accidentally forgot it and
never looked back.

Just curious.
Mark Johnson
- Original Message -
From: "Allen E. Elwood" <[EMAIL PROTECTED]>
To: 
Sent: Monday, November 07, 2005 7:24 PM
Subject: RE: [U2] Sort help needed


> Here's a generic sort routine to use as an example.  It is capable of
> sorting any number of attributes in a file.  Basically, after using LOCATE
> you have to use INSERT.
>
> *TEST.SORT Sort unlimited associated fields off of one field
> OPEN "", "ORDER.BACK" TO ORDER.BACK ELSE PRINT "GAA";STOP
> ORD = ""
> ORD<11> = CHANGE('789,456,123',",",@VM)
> ORD<12> = CHANGE('1,2,3',",",@VM)
> ORD<13> = CHANGE('4,5,6',",",@VM)
> ORD<14> = CHANGE('SOMETHING, THAT, SHOULDNOTCHANGE',",",@VM)
> ORD<31> = CHANGE('7,8,9',",",@VM)
> ORD<32> = CHANGE('10,11,12',",",@VM)
>
> * Setup Parameters
> SORT.REC   = ORD
> ATTR.LIST  = "12,13,31,32"
> ATTR.LIST  = CHANGE(ATTR.LIST, ",", @AM)
> ATTR.COUNT = DCOUNT(ATTR.LIST,@AM)
> DATA.BASE  = ""
> SORT.ATTR  = 11
> SORT.BASE  = ""
> SORT.COUNT = DCOUNT(SORT.REC,@VM)
> * Sort the data based off of the sort attribute in the sort record
> FOR SORT.I = 1 TO SORT.COUNT
>   SORT.VALUE = SORT.REC
>   LOCATE SORT.VALUE IN SORT.BASE<1>,1 BY 'AR' SETTING SORT.INDEX ELSE NULL
>   SORT.BASE = INSERT(SORT.BASE, 1, SORT.INDEX, 0, SORT.VALUE)
>   FOR ATTR.I = 1 TO ATTR.COUNT
> ATTR = ATTR.LIST
> ATTR.VALUE = SORT.REC
> DATA.BASE = INSERT(DATA.BASE, 1, SORT.INDEX, 0,
> ATTR.VALUE)
>   NEXT ATTR.I
> NEXT SORT.I
> * Replace the sort record with the sorted values
> SORT.REC = SORT.BASE
> FOR ATTR.I = 1 TO ATTR.COUNT
>   ATTR = ATTR.LIST
>   SORT.REC = DATA.BASE
> NEXT ATTR.I
> ORD = SORT.REC
> WRITE ORD ON ORDER.BACK, 'TEST.SORT'
> STOP
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Al DeWitt
> Sent: Monday, November 07, 2005 15:27
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Sort help needed
>
>
> Environment: UniData - Pick Flavor
>
>
>
> I'm trying to build a multi-value field in part number order.
>
>
>
> I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
> = 0
>
>
>
> The first time through RECORD<14> is empty.  The second time RECORD<14>
> has one value.  If PART.NBR is of greater value than what is now in
> RECORD<14> then I want PART.NBR to be the second value, if it is of
> lesser value than I want PART.NBR to be inserted before the value in
> RECORD<14>.
>
>
>
> I will then do a second LOCATE to see where PART.NBR is stored
> (RECORD<14,x>) and use that position to insert data into associated
> attributes.
>
>
>
> My problem is that I haven't done this in a while and when I did it was
> in Universe.  So not only am I suffering a senior moment I'm dealing
> with a language barrier.
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Thanks.
>
>
>
> Al DeWitt
>
> Stylmark, Inc.
> ---
> 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] Sort help needed

2005-11-07 Thread Womack, Adrian
LOCATE PART.NBR IN RECORD<14,1> BY "AL" SETTING POS 
   ELSE NULL

INS PART.NBR BEFORE RECORD<14,POS>
INS related.data BEFORE related.field<14,POS>

No need to do the second locate.

Note: I've used the PI/Open syntax for the LOCATE statement (that's the
only one I relate to), you may have to alter the syntax slightly.

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Al DeWitt
Sent: Tuesday, 8 November 2005 7:27 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Sort help needed

Environment: UniData - Pick Flavor



I'm trying to build a multi-value field in part number order.



I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
= 0



The first time through RECORD<14> is empty.  The second time RECORD<14>
has one value.  If PART.NBR is of greater value than what is now in
RECORD<14> then I want PART.NBR to be the second value, if it is of
lesser value than I want PART.NBR to be inserted before the value in
RECORD<14>.



I will then do a second LOCATE to see where PART.NBR is stored
(RECORD<14,x>) and use that position to insert data into associated
attributes.



My problem is that I haven't done this in a while and when I did it was
in Universe.  So not only am I suffering a senior moment I'm dealing
with a language barrier.



Any help would be greatly appreciated.



Thanks.



Al DeWitt

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


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Sort help needed

2005-11-07 Thread Kate Stanton

Hi Al,
Is LOCATE different in UniData & UniVerse?

I think your ELSE is the problem - it is taken if the item is not found.

Try:
LOCATE(PART.NBR,RECORD,14;'AL',POS) ELSE
   INS PART.NBR BEFORE RECORD<14,POS>
END

Good luck!  Kate
- Original Message - 
From: "Al DeWitt" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, November 08, 2005 12:26 PM
Subject: [U2] Sort help needed



Environment: UniData - Pick Flavor



I'm trying to build a multi-value field in part number order.



I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
= 0



The first time through RECORD<14> is empty.  The second time RECORD<14>
has one value.  If PART.NBR is of greater value than what is now in
RECORD<14> then I want PART.NBR to be the second value, if it is of
lesser value than I want PART.NBR to be inserted before the value in
RECORD<14>.



I will then do a second LOCATE to see where PART.NBR is stored
(RECORD<14,x>) and use that position to insert data into associated
attributes.



My problem is that I haven't done this in a while and when I did it was
in Universe.  So not only am I suffering a senior moment I'm dealing
with a language barrier.



Any help would be greatly appreciated.



Thanks.



Al DeWitt

Stylmark, Inc.
---
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] Sort help needed

2005-11-07 Thread Allen E. Elwood
Here's a generic sort routine to use as an example.  It is capable of
sorting any number of attributes in a file.  Basically, after using LOCATE
you have to use INSERT.

*TEST.SORT Sort unlimited associated fields off of one field
OPEN "", "ORDER.BACK" TO ORDER.BACK ELSE PRINT "GAA";STOP
ORD = ""
ORD<11> = CHANGE('789,456,123',",",@VM)
ORD<12> = CHANGE('1,2,3',",",@VM)
ORD<13> = CHANGE('4,5,6',",",@VM)
ORD<14> = CHANGE('SOMETHING, THAT, SHOULDNOTCHANGE',",",@VM)
ORD<31> = CHANGE('7,8,9',",",@VM)
ORD<32> = CHANGE('10,11,12',",",@VM)

* Setup Parameters
SORT.REC   = ORD
ATTR.LIST  = "12,13,31,32"
ATTR.LIST  = CHANGE(ATTR.LIST, ",", @AM)
ATTR.COUNT = DCOUNT(ATTR.LIST,@AM)
DATA.BASE  = ""
SORT.ATTR  = 11
SORT.BASE  = ""
SORT.COUNT = DCOUNT(SORT.REC,@VM)
* Sort the data based off of the sort attribute in the sort record
FOR SORT.I = 1 TO SORT.COUNT
  SORT.VALUE = SORT.REC
  LOCATE SORT.VALUE IN SORT.BASE<1>,1 BY 'AR' SETTING SORT.INDEX ELSE NULL
  SORT.BASE = INSERT(SORT.BASE, 1, SORT.INDEX, 0, SORT.VALUE)
  FOR ATTR.I = 1 TO ATTR.COUNT
ATTR = ATTR.LIST
ATTR.VALUE = SORT.REC
DATA.BASE = INSERT(DATA.BASE, 1, SORT.INDEX, 0,
ATTR.VALUE)
  NEXT ATTR.I
NEXT SORT.I
* Replace the sort record with the sorted values
SORT.REC = SORT.BASE
FOR ATTR.I = 1 TO ATTR.COUNT
  ATTR = ATTR.LIST
  SORT.REC = DATA.BASE
NEXT ATTR.I
ORD = SORT.REC
WRITE ORD ON ORDER.BACK, 'TEST.SORT'
STOP

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Al DeWitt
Sent: Monday, November 07, 2005 15:27
To: u2-users@listserver.u2ug.org
Subject: [U2] Sort help needed


Environment: UniData - Pick Flavor



I'm trying to build a multi-value field in part number order.



I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
= 0



The first time through RECORD<14> is empty.  The second time RECORD<14>
has one value.  If PART.NBR is of greater value than what is now in
RECORD<14> then I want PART.NBR to be the second value, if it is of
lesser value than I want PART.NBR to be inserted before the value in
RECORD<14>.



I will then do a second LOCATE to see where PART.NBR is stored
(RECORD<14,x>) and use that position to insert data into associated
attributes.



My problem is that I haven't done this in a while and when I did it was
in Universe.  So not only am I suffering a senior moment I'm dealing
with a language barrier.



Any help would be greatly appreciated.



Thanks.



Al DeWitt

Stylmark, Inc.
---
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] Sort help needed

2005-11-07 Thread Bob Woodward
The problem is your "ELSE POS=0" statement.  You need something like
this:
LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE
   INSERT...
END

In a "THEN" condition, the value is already in RECORD<14>.  You only
need to do an INSERT when it's not found.  When it's not found, POS will
contain the position that the new value should be in so just use it.
Don't override the value by setting it to zero.

BobW

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of Al DeWitt
> Sent: Monday, November 07, 2005 3:27 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Sort help needed
> 
> Environment: UniData - Pick Flavor
> 
> 
> 
> I'm trying to build a multi-value field in part number order.
> 
> 
> 
> I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE
POS
> = 0
> 
> 
> 
> The first time through RECORD<14> is empty.  The second time
RECORD<14>
> has one value.  If PART.NBR is of greater value than what is now in
> RECORD<14> then I want PART.NBR to be the second value, if it is of
> lesser value than I want PART.NBR to be inserted before the value in
> RECORD<14>.
> 
> 
> 
> I will then do a second LOCATE to see where PART.NBR is stored
> (RECORD<14,x>) and use that position to insert data into associated
> attributes.
> 
> 
> 
> My problem is that I haven't done this in a while and when I did it
was
> in Universe.  So not only am I suffering a senior moment I'm dealing
> with a language barrier.
> 
> 
> 
> Any help would be greatly appreciated.
> 
> 
> 
> Thanks.
> 
> 
> 
> Al DeWitt
> 
> Stylmark, Inc.
> ---
> 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] Sort help needed

2005-11-07 Thread Al DeWitt
Environment: UniData - Pick Flavor



I'm trying to build a multi-value field in part number order.



I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
= 0



The first time through RECORD<14> is empty.  The second time RECORD<14>
has one value.  If PART.NBR is of greater value than what is now in
RECORD<14> then I want PART.NBR to be the second value, if it is of
lesser value than I want PART.NBR to be inserted before the value in
RECORD<14>.



I will then do a second LOCATE to see where PART.NBR is stored
(RECORD<14,x>) and use that position to insert data into associated
attributes.



My problem is that I haven't done this in a while and when I did it was
in Universe.  So not only am I suffering a senior moment I'm dealing
with a language barrier.



Any help would be greatly appreciated.



Thanks.



Al DeWitt

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


RE: [U2] Universe Version {Unclassified}

2005-11-07 Thread HENDERSON MIKE, MR
Glenn

> -Original Message-
> From: [EMAIL PROTECTED] On Behalf Of Glenn Herbert
> Sent: Tuesday, 8 November 2005 07:05
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Universe Version
> 
>I  don't  think  UV  supports SYSTEM(3670) which I added 
>to (Ascential DSEngine  to)  return  the  version number - 
>maybe there is some other number...

Not at UV 10.0.15 (Windows), anyway.
There doesn't seem to be support for any number past SYSTEM(3005)


Mike
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or 
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe Version

2005-11-07 Thread Keith W. Roberts
Actually, RELLEVEL in most accounts has nothing to do with the version of UV
currently running; it tells you what version of UV that account is at (hence
the question about updating the acct if the versions don't match).  RELLEVEL
in the UV account reflects what's actually running.

The STATUS command used to give the version of UV, but for UV10 on NT it
doesn't.

Best thing is to do something like:
EXECUTE 'SET-FILE UV VOC UV.VOC' CAPTURING JUNK
OPEN 'UV.VOC'
READV RELLEVEL FROM 'RELLEVEL',2 ELSE RELLEVEL = ''

-Keith

Original Message
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jacques G.
Sent: Monday, November 07, 2005 9:22 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Universe Version

> Is there a way to determine which Universe version is
> running (besides the RELLEVEL entry in the VOC ?)
> Perhaps a @ variable or with an undocumented SYSTEM
> command ?
> 
> The length of the spooler entry files has recently
> changed in Universe and currently we are using the
> version number to detect this.  (Unless there is
> another way to detect this ?)
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com ---
> 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] Universe Version

2005-11-07 Thread john reid
That'd be
.L RELLEVEL
read "DOT ELLE SPACE RELLEVEL"


On 11/7/05, Jacques G. <[EMAIL PROTECTED]> wrote:
> Is there a way to determine which Universe version is
> running (besides the RELLEVEL entry in the VOC ?)
> Perhaps a @ variable or with an undocumented SYSTEM
> command ?
>
> The length of the spooler entry files has recently
> changed in Universe and currently we are using the
> version number to detect this.  (Unless there is
> another way to detect this ?)
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
>


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


Re: [U2] Universe Version

2005-11-07 Thread brian
Jaques,

If you are going to use RELLEVEL, you should use the RELLEVEL in the uv
account VOC, not the local VOC in case you have not done an
UPDATE.ACCOUNT in that account. 

Otherwise here is a suitably obscure method :

The UniVerse shared memory segment is keyed acec followed by the release
level in hex e.g. aceca100 for 10.1.0.0

You can use $UVHOME\bin\shrdump on Windows or ipcs -m on UNIX to list
the shared memory segments and search for the acec starting string
(reported as 0xacec on UNIX).

Probably not the quickest route though.

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


RE: [U2] Universe Version

2005-11-07 Thread Glenn Herbert
   From the OS level you can use "uv -version" (it was added in 1999).

   Programmatically,  I'm not sure what universe now supports Look in
   the  uvhome  directory and see if a buildinfo.txt file still exists...
   I  don't  think  uv  supports SYSTEM(3670) which I added to (Ascential
   DSEngine  to)  return  the  version number - maybe there is some other
   number...

   __

   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]  On Behalf Of "Jacques G."
   <[EMAIL PROTECTED]>
   Sent: Monday, November 07, 2005 12:22 PM
   To: u2-users@listserver.u2ug.org
   Subject: [U2] Universe Version

   Is there a way to determine which Universe version is
   running (besides the RELLEVEL entry in the VOC ?)
   Perhaps a @ variable or with an undocumented SYSTEM
   command ?
   The length of the spooler entry files has recently
   changed in Universe and currently we are using the
   version number to detect this. (Unless there is
   another way to detect this ?)
   __
   Do You Yahoo!?
   Tired of spam? Yahoo! Mail has the best spam protection around
   http://mail.yahoo.com
   ---
   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] Universe Version

2005-11-07 Thread Jacques G.
Is there a way to determine which Universe version is
running (besides the RELLEVEL entry in the VOC ?) 
Perhaps a @ variable or with an undocumented SYSTEM
command ?

The length of the spooler entry files has recently
changed in Universe and currently we are using the
version number to detect this.  (Unless there is
another way to detect this ?)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] RE: Status of an Automatic Write Action to the &HOLD& (a Type1) File - Solution Found {Unclassified}

2005-11-07 Thread Stevenson, Charles
2 processes can write to the same COMO, too (and ED it simultaneously
from a 3rd).
Looks like sometimes the 2nd overwrites what the 1st writes, sometimes
they interweave.
I dunno, I just avoid it rather than "keep[ing] them dogies rollin'" and
"sort[ing] 'em at the end of the ride. (Rawhide)".

And you can simultaneously ED the same from one of them or a 3rd
session. 
> From: HENDERSON MIKE, MR
> ...I am, like you, amazed that UniVerse will let two UV programs 
> simultaneously access the same incompletely-written record.  
> Actually, 'appalled' would be closer than 'amazed'!
> Whilst your problem is with &HOLD&...
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/