Similar to previous years I will provide the results of our private leaderboard 

  • It will sort by published ranking but separate DC members from "guests"
  • The matching of DC members is a manual task 
  • if I missed you pls. let me know your identity in AoC by DC mail  to add your DC flag
  • due to private issue my updates might show delays sometimes
  • 2 test sets with results are available on OEX: AoC2024-test
  • I just added a column to show completion of parts in the exercises
    • -  no part
    • 1 only part 1  (silver star)
    • 2 only part 2 (another silver star)
    • 3 1+2 both parts completed (gold star) 

DCrank  AOCrank Scores  Stars   ok%     ----- Code Parts OK -----       Name
0       ---     ----    ----    ---     ----*----*----*----*----*       --- DC Members ---
1       2       1192    8       16      3333---------------------       maxymczech
2       3       1175    8       16      3333---------------------       Jani Hurskainen
3       5       1173    8       16      3333---------------------       Oskari Kosonen
4       7       1156    8       16      3333---------------------       Ivo ver eecke
5       8       1126    8       16      3333---------------------       Keith Avery
6       15      851     6       12      333----------------------       rhodery
7       16      849     6       12      333----------------------       JFerreB
8       17      829     6       12      333----------------------       Peter Zubiago
9       18      827     6       12      333----------------------       TylerFeldhege
10      19      549     4       8       33-----------------------       Oliver Wilms
11      21      413     3       6       31-----------------------       Chris Marais
12      ---     ----    ----    ---     -------------------------       --- ISC internals ---
13      11      1098    8       16      3333---------------------       TestSet 1
14      13      1090    8       16      3333---------------------       TestSet 2
15      ---     ----    ----    ---     -------------------------       --- unknow in DC ---
16      1       1204    8       16      3333---------------------       Dominik Znidar
17      4       1174    8       16      3333---------------------       Jarjar 314
18      6       1163    8       16      3333---------------------       Joaquin Derrac Rus
19      9       1117    8       16      3333---------------------       Abdul
20      10      1103    8       16      3333---------------------       Sloan Kanaski
21      12      1093    8       16      3333---------------------       (anonymous user #4293990)
22      14      884     6       12      333----------------------       Chhayank Warad
23      20      415     3       6       31-----------------------       Gary Nguyen
 
24 Rows(s) Affected
 
UTC 2024-12-04 18:19:30
EST 2024-12-04 13:19:30
 

Hi @Jeffrey Drumm ;
different approach: use your own datatype that always returns fixed MAXLEN string:

 

/// Make fixlength String according to MAXLEN parameter
Class rcc.GetFix Extends %Library.String
{
/// Fill value <var>%val</var> to <a href="#MAXLEN">MAXLEN</a> characters.
Method Get() As %String [ CodeMode = generator, ServerOnly = 1 ]
{
	set code="$e(%val_"""_$j("",+%parameter("MAXLEN"))
	set code=code_""",1,"_+%parameter("MAXLEN")_")"
	$$$GENERATE( "  Quit "_code)
	QUIT $$$OK
}
}

and a test class:

Class rcc.FixTest Extends %RegisteredObject
{
Property test As rcc.GetFix(MAXLEN = 12);
}

and now some check from terminal:
 

SAMPLES>set z=##class(rcc.FixTest).%New() set z.test="rob"
SAMPLES>write z.test,$L(z.test)
rob         12

SAMPLES>;some oversized string
SAMPLES>set z.test=";some oversized string"
SAMPLES>write z.test,$L(z.test)
;some oversi12
SAMPLES>  

Hope this helps you along
 

  • .MAC  and much more .INT  are an almost 1:1 image of the runtime .OBJ code
  • they get implicitely compiled by ZSAVE command
  • while any .CLS gets first stored with a lot of internal parameters where XML is faster than UDL
  • then it's translated to .INT(at least) including all extra params,  
  • and inherited pieces and other features for comfort 
  • and then compiled as any other .INT for the final .OBJ 

So comparing .CLS  to .MAC/.INT is like comparing a goat to the final cheese you buy.

A few questions:

  • my local IPv4 address in the ODBC connection
    • in ODBC you have to specify the IP address of the Caché server 
    • there you create the connection FROM YOUR local server
    • by default there's no connection outgoing from Caché
    • No need for your local IP - eventually for some firewalls
  • enabling remote access 
    • if you have username + PW from Caché you should have access
    • only some firewalls on server or client may block you
  • more important: what OS do you run on server and client ?    
  • and what type of connection do you try to establish ?  Web, SuperServer, Terminal, ... ?

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
}

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