go to post Martin Fukátko · Nov 7, 2022 This solution will work because global variable is visible on all stack levels (local variable is not). But you'd use process private global varialble ^||pasp("unitcode") instead of ^pasp("unitCode") which is visible from all processes and you can have collisons in multi user environment.
go to post Martin Fukátko · Feb 18, 2022 What about this one: ClassMethod Indirection() [ ProcedureBlock = 0 ] { N (evenTotal) set TABLES(0)="EVEN" set TABLES(1)="ODD" for i=1:1:100 { set table = TABLES((i#2)) set @(table_"("_i_")")=i // Xecute alternative, same issue ; set cmd = "set "_table_"("_i_")="_i ; x cmd } set evenTotal=0 set i="" for { set i=$ORDER(EVEN(i)) QUIT:i="" set evenTotal = evenTotal+EVEN(i) } zwrite evenTotal }
go to post Martin Fukátko · Nov 29, 2021 Thank you @Yuji Ohata You seem to be right. In the meantime, I managed to start Language Server as follows:VScode runs smoothly on my second computer, so I looked for differences. I have Caché installed on the second computer, Iris on the troubled one. The problem disappeared when I installed Caché on the troubled one.
go to post Martin Fukátko · Jan 21, 2021 When I have no "yellow box" during debugging MAC or CLS code in Cache studio I switch studio to INT code by CTRL + Shift + V Or by mouse click View / View Other Code Then press F11 and "yellow box" is here.
go to post Martin Fukátko · Jan 20, 2021 I'll work around it by switching the studio to INT code tracing. Keyboard shortcut CTRL + Shift + v
go to post Martin Fukátko · Oct 19, 2020 You can use ReplaceAll method if we have RegEx. set a="<Name>ABC</Name><RollNo>45</RollNo><Name>XYZ</Name><RollNo>66</RollNo><Name>xyz</Name><RollNo>89</RollNo>" set matcher = ##class(%Regex.Matcher).%New("(?i)(<rollno>)([^<]+)",a) write matcher.ReplaceAll("$1***") <Name>ABC</Name><RollNo>***</RollNo><Name>XYZ</Name><RollNo>***</RollNo><Name>xyz</Name><RollNo>***</RollNo>
go to post Martin Fukátko · Aug 25, 2020 Nice done Dmitriy! I hardened your inc routine a bit so as not to change the variables in the mac routine: ROUTINE menu [Type=INC] #Execute set menuLineNum=0 do myMenu() myMenu(){ Set menu = $$^menu($zname) Write !,"--------Menu---------" write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) write ##Expression($$asLine^menu(menu,$Increment(menuLineNum))) Write !! do { Write $Char(13),"Option? ",*27,"[0K" Read menuOption Quit:menuOption="" Quit:"qQ"[$Extract(menuOption) Quit:$Listget(menu,+menuOption)'="" } while 1 Write ! if (+menuOption) { Set label = $Listget($Listget(menu, menuOption)) Do @label } }
go to post Martin Fukátko · Jul 17, 2020 DBearver works. Here are settings for Cahé on locathost with superport=1972 and namespace SAMPLES. Martin
go to post Martin Fukátko · Dec 14, 2018 Groran, to make sure that problem is the connection timeout you can test the SQL in terminal. Terminal connection doesn't have timeout. and you can see how much it costs. Here is example from documentation: SAMPLES>SET result=$SYSTEM.SQL.Execute("SELECT TOP 5 name,dob,ssn FROM Sample.Person") SAMPLES>DO result.%Display()
go to post Martin Fukátko · Aug 25, 2017 When you can't use ^%NOJRN (e.g. mirrored database) you can let 2nd process to move log data from CACHETEMP to production database. Let start 2nd process during Caché start and let test it every 0.1 second if log data in CACHETEMP exists.
go to post Martin Fukátko · Mar 14, 2017 Or you can use $zconvert instead of $translate. It is more useable in some cases.
go to post Martin Fukátko · Aug 12, 2016 basic.csp could show the way how to do it.You can star it directly from Studio.Martin