Skip to main content
Manu Fernandes
Inspiring
Sep 10, 2025 11:50 AM UTC
Question

universe - LIST.READU when Transaction Processing is ON

hi everybody,

I search a solution to read the locks info when I'm in a transaction ! 
I need it to act correctly on LOCKED clause.. 

     OPEN 'MD' TO F ELSE STOP 
     TRANSACTION START THEN CRT 'TR OK' 
     READU R FROM F,'EFV' ELSE R = '' 
     EXECUTE 'LIST.READU' 
     EXECUTE 'PHANTOM LIST.READU' 
     EXECUTE 'SH /C smat -r'
     EXECUTE 'ANALYZE.SHM -r' 
     TRANSACTION ABORT
     RELEASE F,'EFV'

the runtime says : 

12 RUN EFVPROGS TESTTRANS                                
TR OK                                                    
Verb "LIST.READU" illegal when a transaction is active.  
Verb "PHANTOM" illegal when a transaction is active.     
Verb "SH" illegal when a transaction is active.          
Verb "ANALYZE.SHM" illegal when a transaction is active. 

Is there a hidden SYSTEM(?) to retrieve the LIIT.READU / list_readu / smat -r output ? 

(I can perform all READU before TRANSACTION START and if LOCKED perform what I need but I'm into a generic subr and the TRANSACTION is started by upper caller. )

Any idea, by advance, I thank you ?

 

    3 replies

    Mike Rajkowski
    Rocketeer
    Sep 11, 2025 7:22 AM UTC

    hi everybody,

    I search a solution to read the locks info when I'm in a transaction ! 
    I need it to act correctly on LOCKED clause.. 

         OPEN 'MD' TO F ELSE STOP 
         TRANSACTION START THEN CRT 'TR OK' 
         READU R FROM F,'EFV' ELSE R = '' 
         EXECUTE 'LIST.READU' 
         EXECUTE 'PHANTOM LIST.READU' 
         EXECUTE 'SH /C smat -r'
         EXECUTE 'ANALYZE.SHM -r' 
         TRANSACTION ABORT
         RELEASE F,'EFV'
    

    the runtime says : 

    12 RUN EFVPROGS TESTTRANS                                
    TR OK                                                    
    Verb "LIST.READU" illegal when a transaction is active.  
    Verb "PHANTOM" illegal when a transaction is active.     
    Verb "SH" illegal when a transaction is active.          
    Verb "ANALYZE.SHM" illegal when a transaction is active. 
    

    Is there a hidden SYSTEM(?) to retrieve the LIIT.READU / list_readu / smat -r output ? 

    (I can perform all READU before TRANSACTION START and if LOCKED perform what I need but I'm into a generic subr and the TRANSACTION is started by upper caller. )

    Any idea, by advance, I thank you ?

     

    Manu,

    Are you wondering if the lock was set because you are in a transaction?

    If so, is there a reason you are not using the LOCKED clause on the readu?

    I am not sure if there is a function to get the locks, in UniVerse like there is in UniData.

    Note that in UniData the following works:

         OPEN 'BP' TO F ELSE STOP 
         TRANSACTION START THEN CRT 'TR OK' 
         READU R FROM F,'TTEST' ELSE R = '' 
         LLIST = GETREADU() 
         CRT LLIST
         TRANSACTION ABORT
         RELEASE F,'EFV'

    :RUN BP TTEST
    TR OK
    2²27568²371263²mrajkowski²Console²BP²0 3096224744714679²450621563²TTEST²X²07:18:17²Sep 11 2025

    Manu Fernandes
    Inspiring
    Sep 11, 2025 8:12 AM UTC

    hi everybody,

    I search a solution to read the locks info when I'm in a transaction ! 
    I need it to act correctly on LOCKED clause.. 

         OPEN 'MD' TO F ELSE STOP 
         TRANSACTION START THEN CRT 'TR OK' 
         READU R FROM F,'EFV' ELSE R = '' 
         EXECUTE 'LIST.READU' 
         EXECUTE 'PHANTOM LIST.READU' 
         EXECUTE 'SH /C smat -r'
         EXECUTE 'ANALYZE.SHM -r' 
         TRANSACTION ABORT
         RELEASE F,'EFV'
    

    the runtime says : 

    12 RUN EFVPROGS TESTTRANS                                
    TR OK                                                    
    Verb "LIST.READU" illegal when a transaction is active.  
    Verb "PHANTOM" illegal when a transaction is active.     
    Verb "SH" illegal when a transaction is active.          
    Verb "ANALYZE.SHM" illegal when a transaction is active. 
    

    Is there a hidden SYSTEM(?) to retrieve the LIIT.READU / list_readu / smat -r output ? 

    (I can perform all READU before TRANSACTION START and if LOCKED perform what I need but I'm into a generic subr and the TRANSACTION is started by upper caller. )

    Any idea, by advance, I thank you ?

     

    Hi Mike

    Yes, I performs the LOCKED clause, Yes I get the port number who maintain the requested lock (locker) via STATUS() in LOCKED clause but by extension my functions try to define if the locker is himself a lock waiter and if Yes I try to define if we are in a  deadlock situation.

    All work fine if Transaction is off... It's why I'll analyse the LIST.READU 

    Thanks. 

    Manu

    Mike Rajkowski
    Rocketeer
    Sep 15, 2025 6:57 AM UTC

    hi everybody,

    I search a solution to read the locks info when I'm in a transaction ! 
    I need it to act correctly on LOCKED clause.. 

         OPEN 'MD' TO F ELSE STOP 
         TRANSACTION START THEN CRT 'TR OK' 
         READU R FROM F,'EFV' ELSE R = '' 
         EXECUTE 'LIST.READU' 
         EXECUTE 'PHANTOM LIST.READU' 
         EXECUTE 'SH /C smat -r'
         EXECUTE 'ANALYZE.SHM -r' 
         TRANSACTION ABORT
         RELEASE F,'EFV'
    

    the runtime says : 

    12 RUN EFVPROGS TESTTRANS                                
    TR OK                                                    
    Verb "LIST.READU" illegal when a transaction is active.  
    Verb "PHANTOM" illegal when a transaction is active.     
    Verb "SH" illegal when a transaction is active.          
    Verb "ANALYZE.SHM" illegal when a transaction is active. 
    

    Is there a hidden SYSTEM(?) to retrieve the LIIT.READU / list_readu / smat -r output ? 

    (I can perform all READU before TRANSACTION START and if LOCKED perform what I need but I'm into a generic subr and the TRANSACTION is started by upper caller. )

    Any idea, by advance, I thank you ?

     

    Manu,

    Have you tried a different Isolation Level?

    I am thinking that level 0 may help in this specific case.