Robert Cemper · Aug 24, 2021 go to post

the maxSCALE = 18 
see Doc on $NORMALIZE()
used in ##class/%Library.Numeric).Normalize()
/// Converts <var>%val</var> to a normalized value.
ClassMethod Normalize(%val As %RawString) As %Numeric [ CodeMode = generator, ServerOnly = 1 ]
{
%codemode=$$$cMETHCODEMODEEXPRESSION
%code="$select($zu(115,13)&&(%val=$c(0)):"""",1:$normalize($decimal(%val),"_+%parameter("SCALE")_"))"
QUIT $$$OK
}

But it is no problem to clone this data tape and write a private one

Robert Cemper · Aug 24, 2021 go to post

ah!

I have a link generator written that is reading Source (Oracle) tables and that
uses the %Library.ResultSet class. for each it gets column name, type, maxsize,
precision, lais, readonly, required & data type name and builds Cache Linked Table.

So you don't use the Caché provided Default Link generator in SMP !!!
So you get the default of datatype class %Numeric  (=> SCALE=2)

It might be enough to add :

$SELECT(columntype["Numeric":"%Numeric (SCALE=4)",1:columntype) 

It's all under your own control.

Robert Cemper · Aug 24, 2021 go to post

And therefore you should edit the generated class and not touch any defaults.
I assume it's the Link Generator that uses SCALE=2 if Oracle doesn't provide anything.

Robert Cemper · Aug 24, 2021 go to post

if you link a table from another DB  (Oracle) there is a related class generated in Caché.
In this class a property related to your column with type %Numeric.
all you have to do is to add (SCALE=4)  or whatever scale you need.
this data type existed already in Caché 5.*  about 20 years back. 

The system-wide control is stored in Cache.cpf file.
You can change ist from SMP in  System > Configuration > System-defined DDL Mappings 
though I would not recommend to do it on a system-wide scope
as this affects ALL mapping between Caché Objects and SQL

Robert Cemper · Aug 19, 2021 go to post

it makes sense also to display what you group 

SELECT count(*),substr(TimeLogged,1,7), ConfigName
FROM Ens_Util.Log
where TimeLogged %STARTSWITH '2021-07'
and ConfigName = 'operation_Name'
group by substr(TimeLogged,1,7)
Robert Cemper · Aug 18, 2021 go to post

I see we share the same approach. Thanks for the confirmation.
As an isolated developer, I couldn't identify any significant improvement over my actual environment.

Robert Cemper · Aug 17, 2021 go to post

Though this looks quite impressive I have 2 concerns

#1

#2

Still 23 days to go free.

Robert Cemper · Aug 17, 2021 go to post

It seems in github.com .gitattributes are honored and code coloring works  OK
while the NEW editor in github.dev ignores it. sad
And I found it boring slow in startup

Robert Cemper · Aug 17, 2021 go to post

I used the default Editor in Github Web text viewer

I saw no difference over the last months

Robert Cemper · Aug 17, 2021 go to post

That's what is scaring me:
 "Any application that can be written in ObjectScript, will eventually be written in ObjectScript."
and the reinventing of wheels will go on ....sad

Robert Cemper · Aug 17, 2021 go to post

the content of .gitattributes is incomplete 

should be:

*.cls linguist-language=ObjectScript
*.mac linguist-language=ObjectScript
*.int linguist-language=ObjectScript
*.inc linguist-language=ObjectScript
*.csp linguist-language=Html

*.sh text eol=lf
*.cls text eol=lf
*.mac text eol=lf
*.int text eol=lf
Dockerfil* text eol=lf

I'll place a PR to fix it

Robert Cemper · Aug 16, 2021 go to post

Store as quine.int
Run it by DO ^quine

quine ;; just a simple example
           ;; have any content
clone "ZL quine ZS quine1 P"  
           ;; may have more content

Robert Cemper · Aug 11, 2021 go to post

Thanks a lot @Nigel Salm !
This matches my expectations I have from "Robotics".
Some solutions, that are used in real life.
Robots running around, serving tea, playing chess or tic-tac-toe  running on 2 or 4 feet or barking and singing are just toys to me. Nice for kids, nice for movies but totally useless in real life. Just a mimic copying humans or pets.

Robert Cemper · Aug 6, 2021 go to post

Class Documentation of %Library.RoutineIndex tells me:
property Type as %String [ Required ];

The type of routine, this will be one of:

  • MAC - Macro routine, content is stored in ^rMAC global
  • INT - ObjectScript routine, content is stored in ^ROUTINE global
  • INC - Include file, these may be included from a MAC routine, content is stored in ^rINC
  • BAS - Cache Basic routine, content is stored in the ^ROUTINE global
  • MVB - MultiValue Basic routine, content is stored in the ^ROUTINE global
  • OBJ - Object code, content is stored in ^rOBJ global

Class Documentation of %Library.Routine explains the storage and  tells me: 
• classMethode GetRoutineGlobals(ByRef Names As %String) as %Status

Return list of globals where routine and class information is stored.
Returns Names="ROUTINE,rBACKUP,rINC,rINCSAVE,rINDEX,rMAC,rMACSAVE,rMAP,rOBJ,oddDEF"
Here is some documentation on the format of the routine globals. ROUTINE - Native .INT COS code, generated from .MAC, or generated from classes. When compiled generates .OBJ code.
ROUTINE(Name,0)=timestamp when last saved
ROUTINE(Name,0,0)=# lines in routine
ROUTINE(Name,0,1...x) = Source Lines in routine
ROUTINE(Name,0,"GENERATED")= 0/1 whether routine is generated or native
ROUTINE(Name,0,"INC",IncludeFileName1)=Timestamp when last include file last saved
ROUTINE(Name,0,"INC",IncludeFileName2)=Timestamp when last include file last saved
ROUTINE(Name,0,"SIZE")=# bytes in routine
ROUTINE(Name,0,"LANG")=language mode ROUTINE(Name,"MAC")=Timestamp of .MAC code when last saved if generated
rBACKUP(Name,Type,version) - backup of ^ROUTINE, created by the command Merge ^rBACKUP(rtn,type,nextverersion)=^ROUTINE(rtn) where type="INT/MVI/BAS" rINC - Native .INT or macro code, compiled into .MAC when included with #include directive
rINC(Name,0)=timestamp when last saved
rINC(Name,0,0)=# lines in include file
rINC(Name,0,1...x) = Source Lines in include file
rINC(Name,0,"SIZE")=# bytes in include file
rINC("ZZ","P") - Meta data used for precompiling include files rINCSAVE - Backup of ^rINC, created by the command Merge ^rINCSAVE(rtn,nextver)=^rINC(rtn,0) rINDEX - Index of .OBJ, .INT, and .MAC routines
rINDEX(Name,"OBJ/MAC/INC")=$lb(Time compiled,Size)
rINDEX(Name,"INT")=$lb(Time compiled,Size,Generated 0/1) rMAC - Native .MAC Macro code which when compiled generates .INT code
rMAC(Name,0)=Timestamp when last saved
rMAC(Name,0,0)=#lines in routine
rMAC(Name,0,1...x) = Source Lines in routine
rMAC(Name,0,"SIZE")=# bytes in routine rMACSAVE(Name,Type,version) - backup of ^rMAC, created by the command Merge ^rMACSAVE(rtn,nextver)=^rMAC(rtn,0) rMAP - Debug map used by the debugger and for error trapping
rMAP(Name,"INT","MAC",offsets)=$lb(debuginfo)
rMAP(Name,"MAC","INT",offsets)=$lb(debuginfo) rOBJ - Compiled .INT code
rOBJ(Name,"INT")=timestamp of .INT code when compiled
rOBJ(Name,0...n)=Compiled object code oddDEF - Source code for classes
oddDEF($zcvt(Name,"U"),....)=source code from class. Note that all of the other odd* nodes are meta data describing the class, and can be recreated by compiling the class. The rINDEXCLASS and rINDEXSQL nodes also get recreated when compiling the class.

so you may either do a query or just look into the globals directly
the sequence MAC        -> INT           -> OBJ      is
equivalent to modified -> modified - > compiled

Robert Cemper · Aug 6, 2021 go to post

No doubt, that it is a great environment for what I classify as ARTISTS.
But consider the maintenance of such ARTWORK.
It is a painful to impossible exercise to find and educate someone to replace a lost ARTIST.
Think of the masterpieces of the Italian Renaissance whether in sculpture or in painting.
We just don't understand the incredible technique they used.
Most famous case: Leonardo Da Vinci's "Last Supper" in Milan.
It is broken and just a shadow is left. Up to now, nobody was able to fix it in an acceptable way

Robert Cemper · Aug 5, 2021 go to post

except if  ...   As %String(COLLATION = "EXACT");

But rebuild of indices is still a must or good practice

Robert Cemper · Aug 3, 2021 go to post

Thanks for the DOWN VOTE, anonymous voter.
It confirms my initial suspicion that someone may dislike my projection of future

Robert Cemper · Jul 31, 2021 go to post

That's in fact happening by separating Globals-DB from Routine-DB in the namespace definition.
Those globals are visible in any DB but they are used only for RoutineDB with a kind of implicit routine mapping.  (ages old and implemented shortly after "Big Bang") 
Once the Routine-DB is clean and isolated just copy the full DB 
or use $system.OBJ.Export(....)

As example of this implicit mapping a view of my ^ROUTINE in namespace DEMO

Robert Cemper · Jul 30, 2021 go to post

create a new DB and list all 32 system elements in DB view
ROUTINE => .int
odd* => obj stuff, and all r* for various others

Robert Cemper · Jul 29, 2021 go to post

I'd suggest GBLOCKCOPY as it operates @ DB level and doesn't care about namespace 

Robert Cemper · Jul 23, 2021 go to post

still another variant that I would prefer

set str=""
for ... {
  set str=str_myval_","
}
set
str=$e(str,1,*-1)

And BTW: $ZH is much easier to handle than $now()