Is there such a function?
Or sequence that is available on UOW versions of DB2?
Have not found anything like that in docs and do need one for more than
100 operations per second.
Thanks in advance!
Pgm &uuid_io
/* Parm( &UUID /* Out -- Return value +
&UUID_Ind /* Out -- Return value indicator +
&SqlState /* Out -- SQLSTATE +
&FuncName /* In -- Fully qualified function name +
&SpecName /* In -- Function specific name +
&MsgText ) /* Out -- Message text */
Dcl &UUID_io *Char ( 16 )
Dcl &UUID *Char ( 16 )
Dcl &UUID_Ind *Char ( 2 ) /* SmallInt */
Dcl &SqlState *Char ( 5 )
Dcl &FuncName *Char ( 519 ) /* VarChar (517) */
Dcl &SpecName *Char ( 130 ) /* VarChar (128) */
Dcl &MsgText *Char ( 72 ) /* VarChar ( 70) */
Dcl &Template *Char ( 32 )
Dcl &NullInd *Char ( 2 ) Value( X'FFFF' ) /* -1 SmallInt */
Dcl &NotNullInd *Char ( 2 ) Value( X'0000' ) /* 0 SmallInt */
Dcl &SqlStateOK *Char ( 5 ) Value( '00000' )
Dcl &SqlStateEr *Char ( 5 ) Value( '38U99' )
Dcl &MsgStr *Char ( 62 ) Value( +
'Failed call to _GENUUID system procedure in GENUUID CL program' )
Dcl &MsgStrLen *Dec ( 3 0 ) Value( 62 )
ChgVar &Template +
X'0000002000000000000000000000000000000000000000000000000000000000'
CallPrc '_GENUUID' Parm( &Template )
MonMsg ( MCH0000 CPF0000 ) Exec( Do )
ChgVar &UUID_Ind &NullInd
ChgVar &SqlState &SqlStateEr
ChgVar %Bin( &MsgText 1 2 ) &MsgStrLen
ChgVar %SST( &MsgText 3 &MsgStrLen ) &MsgStr
Return
EndDo
ChgVar &UUID ( %SST( &Template 16 16 ) )
ChgVar &UUID_Ind &NotNullInd
ChgVar &SqlState &SqlStateOK
SNDPGMMSG MSG(&UUID)
chgvar &uuid_io &uuid
monmsg mch0000
Return
EndPgm
On Thu, 17 Oct 2002 22:40:42 +0300, Sergey Stepanenko <s...@viaduk.net>
wrote:
--
Dr.Ugo Gagliardelli,Modena,Italy-Certified uindoscrasher-AlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker
You can find a Generate_Unique UDF in the DB2 to DB2 porting guide at:
www.iseries.ibm.com/developer/db2/porting.html
--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries
km...@us.removethis.ibm.com GO HAWKEYES!!
>>> www.iseries.ibm.com/db2
(opinions stated are not necessarily those of my employer)