Nueva publicación

Encontrar

Resumen
· 20 ene, 2025

InterSystems Developers Publications, Week January 13 - 19, 2025, Digest

Articles
Announcements
#InterSystems IRIS
#Global Summit
#Open Exchange
Open Exchange Annual 2024 Recap
By Anastasia Dyubaylo
#InterSystems Ideas Portal
#Developer Community Official
#Job Opportunity
Role for IRIS Engineer
By Parwez Wahid
#Other
#InterSystems IRIS for Health
Questions
#InterSystems IRIS
#Ensemble
#InterSystems IRIS for Health
#TrakCare
#HealthShare
#Caché
January 13 - 19, 2025Week at a GlanceInterSystems Developer Community
Resumen
· 20 ene, 2025

InterSystems 开发者出版物,一月 13 - 19, 2025,摘要

一月 13 - 19, 2025Week at a GlanceInterSystems Developer Community
Pregunta
· 19 ene, 2025

Where did my variables go? Without Exclusive NEW, now I get <UNDEFINED>

I inherited some legacy MUMPS / ObjectScript code. A code review identified an exclusive NEW and that is not allowed per our coding standards.

 

The original code contains:

RUN(CALL,DRVNAME)
 S $EC=""
 S ^TMP($J,"RMPV","DRVNAME")=DRVNAME
 N TMPFILE,OLDIO
 S OLDIO=$IO
 I $G(^TMP("RMPV","SILENT"),1) S IOP="NULL",%ZIS=0 D ^%ZIS I '$G(POP,1) U IO
 D INIT^@DRVNAME
 D  ; scope variables
 .N (DUZ,CALL) ; Protect %response
 .S IOF="""""",IOM=80,U="^"
 .D @CALL
 U OLDIO
 Q

 

I attempted to replace Exclusive NEW with a ClassMethod in a procedure block as follows:

RUN(CALL,DRVNAME) ;primary entry point
 Set ^OLIVER(0-$I(^OLIVER)) = $ZDateTime($NOW(),8,1,3)_" : "_$JOB_"/"_$STACK_" : RUN1^RMPVDRV"
 Set ^OLIVER(0-$G(^OLIVER),"CALL")=CALL
 Set ^OLIVER(0-$G(^OLIVER),"DRVNAME")=DRVNAME
 Merge ^OLIVER(0-$G(^OLIVER),"DUZ")=DUZ
 If '$Data(DUZ) Set DUZ=$Get(^OLIVER)
 If '$D(^OLIVER) $EC=""
 ^TMP($J,"RMPV","DRVNAME")=DRVNAME
 TMPFILE,OLDIO
 OLDIO543=$IO
 $G(^TMP("RMPV","SILENT"),1) IOP="NULL",%ZIS=0 ^%ZIS '$G(POP,1) IO
 Set ^OLIVER(0-$G(^OLIVER),"SILENT")=$G(^TMP("RMPV","SILENT"),1)
 INIT^@DRVNAME
 Set ^OLIVER(0-$I(^OLIVER),"OLDIO1")=OLDIO543
 //D ; scope variables
 //.;N (DUZ,CALL) ; Protect %response
 //.S IOF="""""",IOM=80,U="^"
 //.Do @CALL
 Do ##class(VALIP.REST.Implementation.Generic).doCall(CALL,DUZ)
 Set ^OLIVER(0-$I(^OLIVER)) = $ZDateTime($NOW(),8,1,3)_" : "_$JOB_"/"_$STACK_" : RUN2^RMPVDRV"
 Set ^OLIVER(0-$I(^OLIVER),"OLDIO2 in RMPVDRV")=$Get(OLDIO543)
 OLDIO543
 Q

I see <UNDEFINED> error when I try to OLDIO543. All my variables have gone. What happened? Or how can I replace Exclusive NEW?

 

Here is the class with my new ClassMethod:

Class VALIP.REST.Implementation.Generic [ ProcedureBlock ]
{

/// Protect %response
ClassMethod doCall(CALL, DUZ) [ PublicList = (CALL, DUZ) ]
{
Try {
Set IOF="""""",IOM=80,U="^"
Do @CALL
Quit
Catch exp {
Set ^OLIVER(0-$I(^OLIVER)) = $ZDateTime($NOW(),8,1,3)_" : "_$JOB_" : Catch in VALIP.REST.Implementation.Generic"
Set ^OLIVER(0-$G(^OLIVER),"$ZERROR") = $ZERROR
Set ^OLIVER(0-$G(^OLIVER),"exp") = exp
}
Quit
}

}
 

3 comentarios
Comentarios (3)1
Inicie sesión o regístrese para continuar
Pregunta
· 19 ene, 2025

cconsole alarm: ROLLFAIL: <STORE>rbbulk+27^ROLLBACK

Hi experts, please, do you know cause this errors in cconsole?
I'd like know what can I investigate.

01/16/25-18:25:40:081 (11368) 0 Job failed in StartDeepSeeAgents^%SYS.DeepSee:  tPriority=H, n=117, pAgentCount=128, pCount=116, $zu(56,3)=<UNKNOWN ERROR>, $zu(56,5)=JOB^%ZSTART, $zu(56,6)=
01/16/25-18:26:45:922 (10800) 2 ROLLFAIL: <STORE>rbbulk+27^ROLLBACK
01/16/25-18:26:45:922 (10800) 2 Process halts and system might hang when CLNDMN retries the rollback
01/16/25-18:26:45:922 (10800) 2 JOBEND_LOCKCLR: not all locks released in TRANSCB job#125, tid=125, h,t=0xbf0d4318,0xbf01b618
01/16/25-18:26:45:922 (14752) 2 Process terminated abnormally (pid 10800, jobid 0xada9007d) (Halted with an open transaction)
01/16/25-18:26:45:922 (14752) 0 Clean daemon has rolled back open transaction for job 125
01/16/25-18:26:45:922 (14752) 2 Process terminated abnormally (pid 10800, jobid 0xada9007d) (Halted with an open transaction)
01/16/25-18:26:45:922 (14752) 0 cleaned dead job, pid: 10800, jobid 0xada9007d

Thank you.

1 Comentario
Comentarios (1)1
Inicie sesión o regístrese para continuar