RE: [U2] [UV] Named commons

2008-02-13 Thread Boydell, Stuart
You can create a VOC entry to run from an execute within a transaction.
Put an 'H' code in att4  to allow it to be called during a
transaction...

SBTESTCT VOC UUIDGEN

 UUIDGEN
0001 Verb to call aix uuid generator
0002 /etc/ncs/uuid_gen
0003 U
0004 CGHIM

-Original Message-
I need to generate UUID's Universe doesn't have a function that does
this but Unix has
a : uuidgen program I can execute to capture UUID's.

The problem is that some of our programs run within a TRANSACTION block
and
cannot execute Unix shell commands within a TRANSACTION block.

 
**
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 communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Named commons

2008-02-13 Thread Hona, David S
Ah, that's a good idea...but I guess by-passing this restriction (which
must be in place for a good reason), should not be taken lightly
(especially in an mission critical environment). 

I guess you could also write some UV BASIC code based on RFC4122 if you
want to be fully compliant. See the C source code supplied in
http://www.ietf.org/rfc/rfc4122.txt. Not exactly a trivia task.





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boydell, Stuart
Sent: Thursday, February 14, 2008 3:50 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Named commons

You can create a VOC entry to run from an execute within a transaction.
Put an 'H' code in att4  to allow it to be called during a
transaction...

SBTESTCT VOC UUIDGEN

 UUIDGEN
0001 Verb to call aix uuid generator
0002 /etc/ncs/uuid_gen
0003 U
0004 CGHIM

-Original Message-
I need to generate UUID's Universe doesn't have a function that does
this but Unix has
a : uuidgen program I can execute to capture UUID's.

The problem is that some of our programs run within a TRANSACTION block
and
cannot execute Unix shell commands within a TRANSACTION block.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Named commons

2008-02-12 Thread Rex Gozar

Jacques,

How unique do your UUID's need to be?  Do you need them to conform to 
the 32 hex digit format?  If not, you could generate unique identifiers 
based on the port number (@userno) and current date/time.


Alternatively, you could use GCI to integrate the uuidgen function into 
the Universe shell.


rex

Jacques G. wrote:

I need to generate UUID's Universe doesn't have a function that does this...

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


Re: [U2] [UV] Named commons

2008-02-12 Thread Jacques G.
These are 2 other possibilities we are looking at.  The GCI has the drawback 
that it requires C code and we may encounter a customer that doesn't have the C 
compiler on their server.

We may end up doing something like this:
UUID = DTX(CHECKSUM(@LOGNAME)):-:DTX(ABS(@USERNO)):-:DTX(CHECKSUM(SYSTEM 
(1302))):-:DTX(DATE()):-:DTX(INT(1*TIME())):-:DTX(RND(1000))

Someone at IBM suggested having Universe call an external Webservice to 
generate a UUID but that would be even slower than having a shell call the 
uuidgen program.


- Original Message 
From: Rex Gozar [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, February 12, 2008 1:22:57 PM
Subject: Re: [U2] [UV] Named commons

Jacques,

How unique do your UUID's need to be?  Do you need them to conform to 
the 32 hex digit format?  If not, you could generate unique identifiers 
based on the port number (@userno) and current date/time.

Alternatively, you could use GCI to integrate the uuidgen function into 
the Universe shell.

rex

Jacques G. wrote:
 I need to generate UUID's Universe doesn't have a function that does this...
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Named commons

2008-02-12 Thread Rex Gozar
DIGEST creates an MD5 checksum, but it's binary and you need to convert 
it to hex.  See http://www-306.ibm.com/software/data/u2/pubs/library/ to 
get the latest documentation.


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


Re: [U2] [UV] Named commons

2008-02-12 Thread Jacques G.
Hi, thanks for the example.  What does DIGEST do ?  I did 

HELP BASIC DIGEST at the TCL and it isn't in the online docs.  Is it a Hash or 
encryption function that returns a 128 bit number ? 


- Original Message 
From: Rex Gozar [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, February 12, 2008 1:48:40 PM
Subject: Re: [U2] [UV] Named commons

Jacques,

Here's an example of generating a uuid using the userno and time.  Note 
the line wrap on the RESULT = line:

EQU TD$UTCSECS LIT '(SYSTEM(99))'  ; * seconds since 1970-01-01
EQU TD$MILLIS LIT '((SYSTEM(12) * 1000) R%3)'
ERRCODE = DIGEST(MD5, @USERNO:TD$UTCSECS:TD$MILLIS, 1, RESULT)
RESULT = DOWNCASE(OCONV(RESULT, MX))----
DISPLAY RESULT
END


Jacques G. wrote:
 Hello,
 
 I wanted to know if a Named common is visible from every session on the 
 server ?  
 
 I need to generate UUID's Universe doesn't have a function that does this but 
 Unix has a : uuidgen program I can execute to capture UUID's.
 
 The problem is that some of our programs run within a TRANSACTION block and 
 cannot execute Unix shell commands within a TRANSACTION block.
 
 I though that I would have a phantom process that could run in background 
 reserving UUID's for the different users and store this in a named common.
 
 I need to avoid using a file for this as to avoid an I/O bottleneck for the 
 same record key.
 
 It has been years since I've used named commons.  I though that the 
 definition was something like this:
 
 COM /UUID/ UUID
 
 The compiler accepts this definition and I can feed the UUID variable within 
 my phantom process but the other process on a different port  user that 
 attempts to read it is unable to do so.  It has the value zero.
 
 If named commons don't do this, is there some kind of global variable I can 
 set to do this ?
 
 Any ideas ?
 
 
  
 
 Looking for last minute shopping deals?  
 Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
 ---
 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/


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Named commons

2008-02-12 Thread Rex Gozar

Jacques,

Here's an example of generating a uuid using the userno and time.  Note 
the line wrap on the RESULT = line:


EQU TD$UTCSECS LIT '(SYSTEM(99))'  ; * seconds since 1970-01-01
EQU TD$MILLIS LIT '((SYSTEM(12) * 1000) R%3)'
ERRCODE = DIGEST(MD5, @USERNO:TD$UTCSECS:TD$MILLIS, 1, RESULT)
RESULT = DOWNCASE(OCONV(RESULT, MX))----
DISPLAY RESULT
END


Jacques G. wrote:

Hello,

I wanted to know if a Named common is visible from every session on the server ?  


I need to generate UUID's Universe doesn't have a function that does this but 
Unix has a : uuidgen program I can execute to capture UUID's.

The problem is that some of our programs run within a TRANSACTION block and 
cannot execute Unix shell commands within a TRANSACTION block.

I though that I would have a phantom process that could run in background 
reserving UUID's for the different users and store this in a named common.

I need to avoid using a file for this as to avoid an I/O bottleneck for the 
same record key.

It has been years since I've used named commons.  I though that the definition 
was something like this:

COM /UUID/ UUID

The compiler accepts this definition and I can feed the UUID variable within my 
phantom process but the other process on a different port  user that attempts 
to read it is unable to do so.  It has the value zero.

If named commons don't do this, is there some kind of global variable I can set 
to do this ?

Any ideas ?


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---
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] Named commons

2008-02-12 Thread Kevin King
A named common is visible from a session.  If Bob is logged in on session 1
and Jane on session 2, Jane has no visibility to Bob's named common or vice
versa.  Certainly when someone logs in you could put your GUID in a named
common and it'll be there until that person logs off.  You'll still have to
have some way of generating the GUID and that could lead to a record lock
(unless you calculate a hash based on date/time/port/@logname, that sort of
thing).

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


RE: [U2] [UV] Named commons

2008-02-12 Thread gerry-u2ug
Also, if Bob is logged in on session 1 and Bob is also logged in again
on session 2 , Bob2 has no visibility to Bob1's named common and vice
versa.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin King
Sent: February 12, 2008 11:39 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Named commons

A named common is visible from a session.  If Bob is logged in on
session 1
and Jane on session 2, Jane has no visibility to Bob's named common or
vice
versa.  Certainly when someone logs in you could put your GUID in a
named
common and it'll be there until that person logs off.  You'll still have
to
have some way of generating the GUID and that could lead to a record
lock
(unless you calculate a hash based on date/time/port/@logname, that sort
of
thing).

-K2
---
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/