Robert Cemper · Oct 21, 2024 go to post

To get the property position dynamically by program you may use this ClassMethod
 

ClassMethod PropSeq(classname As %String = "", propname As %String = "")
   As %String [ SqlProc ]
{
    if classname="" set classname=..%ClassName(1)
    set pos=0
    &sql(
        SELECT SequenceNumber INTO :pos 
        FROM %Dictionary.CompiledProperty
        WHERE transient=0
        AND parent=:classname
        AND name=:propname
    )
    if SQLCODE set pos="-1;"_SQLCODE
    quit pos
}
Robert Cemper · Oct 20, 2024 go to post

a somewhat 'dirty' approach

select ID, Name_GivenName from Demo.DemoPatient 
where FOR SOME %ELEMENT(Demo.DemoPatient.Aliases) ($LISTFIND(%value,'Twain')>0)

advantage - no need to know the structure of your serial class
risk - false positives for unexpected coincidences.  eg. Washington, John, ...

Robert Cemper · Oct 20, 2024 go to post

the example builds on the fact that the storage structure of the serial object is known

 Storage Default
{
<Data name="serItemState">
<Value name="1">
<Value>Subject</Value>
</Value>
<Value name="2">
<Value>Change</Value>
</Value>
<Value name="3">
<Value>Color</Value>
</Value>
</Data>
<State>serItemState</State>
<StreamLocation>^rcc.IC.serItemS</StreamLocation>

in this case color  is #3 in serial storage  ==>>  $list(%Value,3)

So you need to know the position of FamilyName in  HS.SDA3.Name (e.g.7 ?)
then you can use $list(%value,7) =  'Twain'   as condition

7 is just a guess as I don't have any HS* classes at hands 

Robert Cemper · Oct 8, 2024 go to post

BIG THANKS!
That soved the problem

It's a shame that the owner of the package didn't react to the ISSUE on Github or OEX for 3 months

Robert Cemper · Oct 2, 2024 go to post

run

USER > zn "%SYS"
%SYS > ZLOAD JOURNAL
%SYS > Print

in WebTerminal you just get NOTHING
in normal terminal and iterm  you see the code  

Robert Cemper · Oct 2, 2024 go to post

@Mario Sanchez Macias  You missed the point.
The essential functionality is to have a total autonomous partition to work in.
It was never named so, but it is the real Shell for ObjectScript and its predecessors for >50 years !

Robert Cemper · Sep 26, 2024 go to post

simple case:
write some lines of ObjectScript in TERMINAL with Functions, ....
NO need to compile it, no INT, no MAC, no traces.
Just DO it:
---
or load some  INT., apply your changes, run it, forget it  
no save, no recompile, ...
WebTerminal is based on Xecute and compiled code
Same in Studio.
 

Robert Cemper · Sep 25, 2024 go to post

Overall a nice idea.
the package still needs some polishing to convince

suggestion1:  fix issue to build clean docker
suggestion2:  re-enable Start+Stop message so uses see it was moving
suggestion3:  show which class you check , kind of work log
suggestion4:  also step into sub-packages e.g. not just rcc but also rcc.unittests. codeinspector could be a good start
sugesstion5: allow also MAC, INT, INC code to be checked 

Robert Cemper · Sep 23, 2024 go to post

it would be great if the issues in building Docker container would be fixed.
so we can touch it and reduce frustration of evaluators first
Actually it is broken,  Issues pending since some days

Robert Cemper · Sep 23, 2024 go to post
  • is there anywhere a working example using the template ?
  • or a hint of how to apply it ?
Robert Cemper · Sep 18, 2024 go to post

Your code looks like a ClassQuery.   %Library.Query

This is not a Stored Procedure  :=>  a ClassMethod ...[SqlProc,SqlName=anyname]  

and everything happens inside this ClassMethod
you run is by CALL PROCEDURENAME

Robert Cemper · Sep 13, 2024 go to post
 if $d(^|"%SYS"|CONFIG("Namespaces"," "))
 for  set ns=$o(@$ZR) quit:ns=""  write ns,!  ; or do whatever you intend
Robert Cemper · Sep 12, 2024 go to post

Oh dear !
I started with DSM 1.0  in 1978  and met Terry in the kick-off training for support in Mainard.
It was a great experience to me. 

Robert Cemper · Sep 11, 2024 go to post

ÍD is an reserved name in IRIS / Ensemble
in fact as you describe it, it is rather a KEY than a typical ID
so this query may serve your needs

SELECT LIST(Value) WHERE KEY=11 

SELECT LIST(Value) WHERE KEY=12

Robert Cemper · Sep 4, 2024 go to post

Congrats:
I like your code example that demonstrates deep understanding of the DB concept.
 💪

Robert Cemper · Sep 3, 2024 go to post

From docs:

tformat = 1  >>> Express time in the form "hh:mm:ss" (24-hour clock).
W $ZTIME(338,1,)
00:05:38
W $ZTIME(338+43200,1)
12:05:38

My guess: You look for this
​​​​​​​W $tr($ZTIME(338,3),"AM")
12:05:38