go to post Anna Golitsyna · Jun 9 Thanks a lot everybody for your input. I need a bit more time to mark your replies as answers but I will do that.
go to post Anna Golitsyna · Jun 3 Yes, I use that too occasionally. I think Portal functionality is faster though.
go to post Anna Golitsyna · Jun 3 Thanks a lot! I successfully tested both and one correction: the date is not in MUMPS format. It works with the 06/03/2025 format though.
go to post Anna Golitsyna · Apr 12 I did not try it myself, but I talked to other people and searched more, and it seems that using VS Code (as opposed to Iris/Cache Studio) combined with Copilot is currently the best available way of incorporating AI into ObjectScript/MUMPS coding: Coding InterSystems ObjectScript with AI Copilot. @Evgeny Shvarov, would you agree? Would you like to add anything on the discussion subject?
go to post Anna Golitsyna · Feb 5 I will have time to prepare such a snippet tomorrow, sorry. Meanwhile, it's not necessarily one line off but up to several lines off, a few routines only. In your code, is it possible to extract text of the line for which tokens are calculated? I looked around and did not see such a possibility.
go to post Anna Golitsyna · Feb 5 I have an odd problem. In vast majority of cases globals are defined by your code correctly. However, for some routines the lineNum as returned by GetNext is one line count off and the global with the stated token attributes is actually on the next line. I tried to slightly modify such routines and recompile, but it did not always help. Any advice?
go to post Anna Golitsyna · Feb 5 Excellent, just excellent. It did find correctly all globals in a routine (no indirection). I populated in = ##class(%Stream.TmpCharacter).%New() with this code:S NumLines=^ROUTINE(routineName,0,0) ; Omit extensionF n=0:1:NumLines { S line=$T(@routineName+n^@routineName) D in.Write(line),in.Write($c(13,10))}D in.Rewind() I also added this after your Write: Set line=$G(^ROUTINE(rtnName,0,lineNum+1)) Write $C(9),$E(line,token.p+1,token.p+token.c),!I did not try finding globals in classes, but I assume this would be very similar. Is there any online documentation that shows that token value for globals is 18? Would be curious about other token values.
go to post Anna Golitsyna · Feb 5 Thanks, Brett. I did try using SyntaxColor but not with JSON and did not like the HTML results. I'll give your code a try.
go to post Anna Golitsyna · Aug 26, 2024 $STACK, of course. It looks like current line is represented by $st(1,"MCODE"). Did not know about $zname. Thanks!
go to post Anna Golitsyna · Jul 17, 2024 I rebuild ^rINDEX using, as recommended, D ##class(%Library.RoutineIndex).RebuildIndex($NAMESPACE). That reduced the number of ^rINDEX entries with an empty Date Modified, the cause of the $RO error. However, this function is partially based on ^ROUTINE which in its turn had bogus entries, all of the type ^ROUTINE("ABC",0,"SIZE")=<some integer>. That’s all these routines contain. I killed these ^ROUTINE nodes and rebuilt ^rINDEX. No empty Date Modified.
go to post Anna Golitsyna · Jul 17, 2024 I made a mistake, now corrected: it's Cache, not Ensemble. It does have this function too. I'll post results here.
go to post Anna Golitsyna · Apr 15, 2024 I wrote a simple function to find non-printable characters in a routine: findNonAsciis stream = ##class(%FileCharacterStream).%New()s stream.Filename="C:\TestAGbackup_2024-04-15_AG.txt"f { q:stream.AtEnd s line = stream.ReadLine() ; Strip all control characters, including non-processable by XML export, except for tabs and newlines s l2=$ZSTRIP(line,"*C","",$C(9)_$C(10)_$C(13)) w:l2'=line line,!,l2,!} q