Fileman new-style index question, and Fileman Functions question.

77 views
Skip to first unread message

Kevin Toppenberg

unread,
Jul 10, 2022, 8:01:50 PM7/10/22
to Hardhats

Hey all,
I have a custom new-style index on a subfile that looks like this.  It creates a whole-file index.

The Version Number (.02) sometimes gets populated with a number like "4.0", i.e. a string, and sometimes it's just "4".  These numbers are coming from KIDS patches. 

I would like these to both sort together, both being indexed as "4".  An easy way to do this would be to change the SET and KILL logic to add a "+", as drawn in below.  But the editor won't let me do that, indicating it can only be done for MUMPS style cross references.

So I suspect that the proper way to do this, would be to use a Fileman function on line #2, something like:  NUMERIC(VERSION (#.02)), with NUMERIC being a made-up function on my wish-list to be the same a +<MyString>. But I can't find any such function. 

As I write this, I realize I could also add an input transform on the field so that all "4.0" such numbers would be actually stored as 4.  But the data is already loaded and I don't want to do it again.

Summary
1) Is there a Fileman function such as NUMERIC()  ?
2) If not, how would I force VERSION (# .02) to be a numeric value

Thanks in advance.

Kevin


fileman xref.png

Kevin Toppenberg

unread,
Jul 10, 2022, 9:21:11 PM7/10/22
to Hardhats
Let me refine/change the setup from the prior post.   Something screwy is going on...  Cross reference entries for times when the Version number is a string, and not a mumps cardinal number (e.g. "4.0")  seem to be getting lost, and are not even found in "C" XRef.

For example, here is 1 record from the file.  Notice the yellow entry, #5 first.

         Entry #72
             .01-NAME OF DIR (WITHOUT PATH) : CPRS_32A Files_scrubbed/
             .02-PARENT PATH : Patches_By_Application/CPRS GUI FILES/
             .03-PARENT IENS (22709.12) : 26,1,
               1-CONTAINED FILE ENTRY : <MULTIPLE-VALUED>
                  Entry #1
                     .01-NAME OF FILE ENTRY : CPRS_V32A_COMBINED_BUILD.KIDs
                     .02-TYPE : KIDS
                       1-PATCH INFO : <MULTIPLE-VALUED>
                          Entry #1
                             .01-PACKAGE : OR
                             .02-VERSION : 3.0
                             .03-PATCH NUM : 539
                          Entry #2
                             .01-PACKAGE : TIU
                             .02-VERSION : 1.0
                             .03-PATCH NUM : 339
                          Entry #3
                             .01-PACKAGE : GMRA
                             .02-VERSION : 4.0
                             .03-PATCH NUM : 63
                          Entry #4
                             .01-PACKAGE : GMRV
                             .02-VERSION : 5.0
                             .03-PATCH NUM : 43
                          Entry #5
                             .01-PACKAGE : GMRC
                             .02-VERSION : 3.0
                             .03-PATCH NUM : 84

                          Entry #6
                             .01-PACKAGE : YS
                             .02-VERSION : 5.01
                             .03-PATCH NUM : 170

                          Entry #7
                             .01-PACKAGE : LR
                             .02-VERSION : 5.2
                             .03-PATCH NUM : 544
               2-CONTAINED CHILD DIRECTORY : <MULTIPLE-VALUED>
                  Entry #3
                     .01-NAME CHILD DIR (WITHOUT PATH) : OR_30_539_SRC_scrubbed.zip/
                     .02-ENTRY IENS (22709.12) : 1381,1,
                  Entry #4
                     .01-NAME CHILD DIR (WITHOUT PATH) : OR_30_539_scrubbed.zip/
                     .02-ENTRY IENS (22709.12) : 1383,1,

Here is a raw dump of the data above:

yottadb>zwr ^TMG(22709.1,1,1,72,*)
^TMG(22709.1,1,1,72,0)="CPRS_32A Files_scrubbed/"
^TMG(22709.1,1,1,72,1,0)="^22709.121^1^1"
^TMG(22709.1,1,1,72,1,1,0)="CPRS_V32A_COMBINED_BUILD.KIDs^K"
^TMG(22709.1,1,1,72,1,1,1,0)="^22709.1211^7^7"
^TMG(22709.1,1,1,72,1,1,1,1,0)="OR^3.0^539^"
^TMG(22709.1,1,1,72,1,1,1,2,0)="TIU^1.0^339^"
^TMG(22709.1,1,1,72,1,1,1,3,0)="GMRA^4^63^"
^TMG(22709.1,1,1,72,1,1,1,4,0)="GMRV^5.0^43^"
^TMG(22709.1,1,1,72,1,1,1,5,0)="GMRC^3.0^84^"
^TMG(22709.1,1,1,72,1,1,1,6,0)="YS^5.01^170^"
^TMG(22709.1,1,1,72,1,1,1,7,0)="LR^5.2^544^"
^TMG(22709.1,1,1,72,1,1,1,"B","GMRA",3)=""
^TMG(22709.1,1,1,72,1,1,1,"B","GMRC",5)=""
^TMG(22709.1,1,1,72,1,1,1,"B","GMRV",4)=""
^TMG(22709.1,1,1,72,1,1,1,"B","LR",7)=""
^TMG(22709.1,1,1,72,1,1,1,"B","OR",1)=""
^TMG(22709.1,1,1,72,1,1,1,"B","TIU",2)=""
^TMG(22709.1,1,1,72,1,1,1,"B","YS",6)=""
^TMG(22709.1,1,1,72,1,"B","CPRS_V32A_COMBINED_BUILD.KIDs",1)=""
^TMG(22709.1,1,1,72,2,0)="^22709.122^4^2"
^TMG(22709.1,1,1,72,2,3,0)="OR_30_539_SRC_scrubbed.zip/"
^TMG(22709.1,1,1,72,2,3,1)="1381,1,"
^TMG(22709.1,1,1,72,2,4,0)="OR_30_539_scrubbed.zip/"
^TMG(22709.1,1,1,72,2,4,1)="1383,1,"
^TMG(22709.1,1,1,72,2,"B","OR_30_539_SRC_scrubbed.zip/",3)=""
^TMG(22709.1,1,1,72,2,"B","OR_30_539_scrubbed.zip/",4)=""
^TMG(22709.1,1,1,72,3)="26,1,"
^TMG(22709.1,1,1,72,4)="Patches_By_Application/CPRS GUI FILES/"

Below is a dump of the whole-file cross reference, "C".  It has the following format:

^TMG(22709.1,"C",<PCKINIT>,<VER>,<SEQ#>,<PATCH#>,<WEB SERVER IEN>,<IEN 22709.12>,<IEN 22709.121>,<IEN 22709.1211>)=""

Thus the Version number would come as the first value after "GMRC", and the Patch number would come in the 3rd value after "GMRC", e.g. "60" on the first line.  Notice that there NO decimal "3.0" ("3.0" is not a mumps cardinal number) values for version, and no for patch 84 for GMRS

yottadb>zwr ^TMG(22709.1,"C","GMRC",*)
^TMG(22709.1,"C","GMRC",3,51,60,1,150,267,1)=""
^TMG(22709.1,"C","GMRC",3,52,61,1,150,268,1)=""
^TMG(22709.1,"C","GMRC",3,53,67,1,150,269,1)=""
^TMG(22709.1,"C","GMRC",3,54,58,1,150,270,1)=""
^TMG(22709.1,"C","GMRC",3,55,62,1,150,81,1)=""
^TMG(22709.1,"C","GMRC",3,55,62,1,150,223,1)=""
^TMG(22709.1,"C","GMRC",3,56,63,1,150,83,1)=""
^TMG(22709.1,"C","GMRC",3,56,63,1,150,224,1)=""
^TMG(22709.1,"C","GMRC",3,57,65,1,150,85,1)=""
^TMG(22709.1,"C","GMRC",3,57,65,1,150,225,1)=""
^TMG(22709.1,"C","GMRC",3,58,69,1,150,87,1)=""
^TMG(22709.1,"C","GMRC",3,58,69,1,150,226,1)=""
^TMG(22709.1,"C","GMRC",3,59,44,1,150,89,1)=""
^TMG(22709.1,"C","GMRC",3,59,44,1,150,227,1)=""
^TMG(22709.1,"C","GMRC",3,60,70,1,150,91,1)=""
^TMG(22709.1,"C","GMRC",3,60,70,1,150,228,1)=""
^TMG(22709.1,"C","GMRC",3,61,68,1,150,93,1)=""
^TMG(22709.1,"C","GMRC",3,61,68,1,150,229,1)=""
^TMG(22709.1,"C","GMRC",3,63,64,1,150,230,1)=""
^TMG(22709.1,"C","GMRC",3,64,71,1,150,96,1)=""
^TMG(22709.1,"C","GMRC",3,64,71,1,150,231,1)=""
^TMG(22709.1,"C","GMRC",3,65,72,1,150,98,1)=""
^TMG(22709.1,"C","GMRC",3,65,72,1,150,232,1)=""
^TMG(22709.1,"C","GMRC",3,66,74,1,150,100,1)=""
^TMG(22709.1,"C","GMRC",3,66,74,1,150,233,1)=""
^TMG(22709.1,"C","GMRC",3,67,46,1,150,102,1)=""
^TMG(22709.1,"C","GMRC",3,67,46,1,150,234,1)=""
^TMG(22709.1,"C","GMRC",3,68,76,1,150,104,1)=""
^TMG(22709.1,"C","GMRC",3,68,76,1,150,235,1)=""
^TMG(22709.1,"C","GMRC",3,69,73,1,150,236,1)=""
^TMG(22709.1,"C","GMRC",3,70,82,1,150,107,1)=""
^TMG(22709.1,"C","GMRC",3,70,82,1,150,237,1)=""
^TMG(22709.1,"C","GMRC",3,71,75,1,150,109,1)=""
^TMG(22709.1,"C","GMRC",3,71,75,1,150,238,1)=""
^TMG(22709.1,"C","GMRC",3,72,85,1,150,111,1)=""
^TMG(22709.1,"C","GMRC",3,72,85,1,150,239,1)=""
^TMG(22709.1,"C","GMRC",3,73,81,1,57,26,1)=""
^TMG(22709.1,"C","GMRC",3,73,81,1,150,240,1)=""
^TMG(22709.1,"C","GMRC",3,74,80,1,150,241,1)=""
^TMG(22709.1,"C","GMRC",3,75,83,1,150,115,1)=""
^TMG(22709.1,"C","GMRC",3,75,83,1,150,242,1)=""
^TMG(22709.1,"C","GMRC",3,76,86,1,150,117,1)=""
^TMG(22709.1,"C","GMRC",3,76,86,1,150,243,1)=""
^TMG(22709.1,"C","GMRC",3,77,87,1,150,244,1)=""
^TMG(22709.1,"C","GMRC",3,78,90,1,150,120,1)=""
^TMG(22709.1,"C","GMRC",3,78,90,1,150,245,1)=""
^TMG(22709.1,"C","GMRC",3,79,94,1,150,246,1)=""
^TMG(22709.1,"C","GMRC",3,80,97,1,150,247,1)=""
^TMG(22709.1,"C","GMRC",3,81,89,1,150,124,1)=""
^TMG(22709.1,"C","GMRC",3,81,89,1,150,248,1)=""
^TMG(22709.1,"C","GMRC",3,82,92,1,150,126,1)=""
^TMG(22709.1,"C","GMRC",3,82,92,1,150,249,1)=""
^TMG(22709.1,"C","GMRC",3,83,91,1,150,128,1)=""
^TMG(22709.1,"C","GMRC",3,83,91,1,150,250,1)=""
^TMG(22709.1,"C","GMRC",3,84,98,1,150,251,1)=""
^TMG(22709.1,"C","GMRC",3,85,96,1,150,131,1)=""
^TMG(22709.1,"C","GMRC",3,85,96,1,150,252,1)=""
^TMG(22709.1,"C","GMRC",3,86,100,1,150,253,1)=""
^TMG(22709.1,"C","GMRC",3,87,111,1,150,254,1)=""
^TMG(22709.1,"C","GMRC",3,88,103,1,150,255,1)=""
^TMG(22709.1,"C","GMRC",3,89,108,1,150,256,1)=""
^TMG(22709.1,"C","GMRC",3,90,99,1,150,137,1)=""
^TMG(22709.1,"C","GMRC",3,90,99,1,150,257,1)=""
^TMG(22709.1,"C","GMRC",3,91,106,1,150,139,1)=""
^TMG(22709.1,"C","GMRC",3,91,106,1,150,258,1)=""
^TMG(22709.1,"C","GMRC",3,92,116,1,150,259,1)=""
^TMG(22709.1,"C","GMRC",3,93,104,1,150,142,1)=""
^TMG(22709.1,"C","GMRC",3,93,104,1,150,260,1)=""
^TMG(22709.1,"C","GMRC",3,94,107,1,150,144,1)=""
^TMG(22709.1,"C","GMRC",3,94,107,1,150,261,1)=""
^TMG(22709.1,"C","GMRC",3,95,114,1,150,146,1)=""
^TMG(22709.1,"C","GMRC",3,95,114,1,150,262,1)=""
^TMG(22709.1,"C","GMRC",3,96,109,1,150,263,1)=""
^TMG(22709.1,"C","GMRC",3,97,117,1,150,264,1)=""
^TMG(22709.1,"C","GMRC",3,98,110,1,150,150,1)=""
^TMG(22709.1,"C","GMRC",3,98,110,1,150,265,1)=""
^TMG(22709.1,"C","GMRC",3,99,113,1,150,152,1)=""
^TMG(22709.1,"C","GMRC",3,99,113,1,150,266,1)=""
^TMG(22709.1,"C","GMRC",3,100,119,1,150,1,1)=""
^TMG(22709.1,"C","GMRC",3,100,119,1,150,164,1)=""
^TMG(22709.1,"C","GMRC",3,101,121,1,150,3,1)=""
^TMG(22709.1,"C","GMRC",3,101,121,1,150,165,1)=""
^TMG(22709.1,"C","GMRC",3,102,112,1,150,5,1)=""
^TMG(22709.1,"C","GMRC",3,102,112,1,150,166,1)=""
^TMG(22709.1,"C","GMRC",3,103,120,1,150,167,1)=""
^TMG(22709.1,"C","GMRC",3,104,118,1,150,168,1)=""
^TMG(22709.1,"C","GMRC",3,105,125,1,150,169,1)=""
^TMG(22709.1,"C","GMRC",3,106,124,1,150,10,1)=""
^TMG(22709.1,"C","GMRC",3,106,124,1,150,170,1)=""
^TMG(22709.1,"C","GMRC",3,107,129,1,150,171,1)=""
^TMG(22709.1,"C","GMRC",3,108,127,1,150,172,1)=""
^TMG(22709.1,"C","GMRC",3,109,130,1,150,173,1)=""
^TMG(22709.1,"C","GMRC",3,110,128,1,150,174,1)=""
^TMG(22709.1,"C","GMRC",3,111,132,1,150,175,1)=""
^TMG(22709.1,"C","GMRC",3,112,126,1,150,176,1)=""
^TMG(22709.1,"C","GMRC",3,113,133,1,150,177,1)=""
^TMG(22709.1,"C","GMRC",3,114,131,1,150,178,1)=""
^TMG(22709.1,"C","GMRC",3,115,135,1,150,179,1)=""
^TMG(22709.1,"C","GMRC",3,116,138,1,150,180,1)=""
^TMG(22709.1,"C","GMRC",3,117,105,1,150,181,1)=""
^TMG(22709.1,"C","GMRC",3,118,140,1,150,182,1)=""
^TMG(22709.1,"C","GMRC",3,119,141,1,150,183,1)=""
^TMG(22709.1,"C","GMRC",3,120,142,1,150,184,1)=""
^TMG(22709.1,"C","GMRC",3,121,123,1,150,26,1)=""
^TMG(22709.1,"C","GMRC",3,121,123,1,150,185,1)=""
^TMG(22709.1,"C","GMRC",3,122,144,1,150,186,1)=""
^TMG(22709.1,"C","GMRC",3,123,143,1,150,187,1)=""
^TMG(22709.1,"C","GMRC",3,124,134,1,150,30,1)=""
^TMG(22709.1,"C","GMRC",3,124,134,1,150,188,1)=""
^TMG(22709.1,"C","GMRC",3,125,139,1,150,32,1)=""
^TMG(22709.1,"C","GMRC",3,125,139,1,150,189,1)=""
^TMG(22709.1,"C","GMRC",3,126,137,1,150,190,1)=""
^TMG(22709.1,"C","GMRC",3,127,147,1,150,191,1)=""
^TMG(22709.1,"C","GMRC",3,128,151,1,150,192,1)=""
^TMG(22709.1,"C","GMRC",3,129,146,1,150,37,1)=""
^TMG(22709.1,"C","GMRC",3,129,146,1,150,193,1)=""
^TMG(22709.1,"C","GMRC",3,130,155,1,150,194,1)=""
^TMG(22709.1,"C","GMRC",3,131,157,1,150,195,1)=""
^TMG(22709.1,"C","GMRC",3,132,152,1,150,41,1)=""
^TMG(22709.1,"C","GMRC",3,132,152,1,150,196,1)=""
^TMG(22709.1,"C","GMRC",3,133,159,1,150,197,1)=""
^TMG(22709.1,"C","GMRC",3,134,88,1,69,18,1)=""
^TMG(22709.1,"C","GMRC",3,134,88,1,150,198,1)=""
^TMG(22709.1,"C","GMRC",3,135,148,1,150,199,1)=""
^TMG(22709.1,"C","GMRC",3,136,158,1,150,47,1)=""
^TMG(22709.1,"C","GMRC",3,136,158,1,150,201,1)=""
^TMG(22709.1,"C","GMRC",3,137,161,1,150,202,1)=""
^TMG(22709.1,"C","GMRC",3,138,160,1,150,203,1)=""
^TMG(22709.1,"C","GMRC",3,139,154,1,150,51,1)=""
^TMG(22709.1,"C","GMRC",3,139,154,1,150,204,1)=""
^TMG(22709.1,"C","GMRC",3,140,165,1,150,205,1)=""
^TMG(22709.1,"C","GMRC",3,141,166,1,150,206,1)=""
^TMG(22709.1,"C","GMRC",3,142,145,1,150,207,1)=""
^TMG(22709.1,"C","GMRC",3,143,163,1,150,56,1)=""
^TMG(22709.1,"C","GMRC",3,143,163,1,150,208,1)=""
^TMG(22709.1,"C","GMRC",3,144,164,1,150,209,1)=""
^TMG(22709.1,"C","GMRC",3,145,167,1,150,59,1)=""
^TMG(22709.1,"C","GMRC",3,145,167,1,150,210,1)=""
^TMG(22709.1,"C","GMRC",3,146,172,1,150,211,1)=""
^TMG(22709.1,"C","GMRC",3,147,168,1,150,62,1)=""
^TMG(22709.1,"C","GMRC",3,147,168,1,150,212,1)=""
^TMG(22709.1,"C","GMRC",3,148,171,1,150,64,1)=""
^TMG(22709.1,"C","GMRC",3,148,171,1,150,213,1)=""
^TMG(22709.1,"C","GMRC",3,149,170,1,150,66,1)=""
^TMG(22709.1,"C","GMRC",3,149,170,1,150,214,1)=""
^TMG(22709.1,"C","GMRC",3,150,177,1,150,68,1)=""
^TMG(22709.1,"C","GMRC",3,150,177,1,150,215,1)=""
^TMG(22709.1,"C","GMRC",3,151,84,1,150,216,1)=""
^TMG(22709.1,"C","GMRC",3,152,174,1,150,217,1)=""
^TMG(22709.1,"C","GMRC",3,153,173,1,150,72,1)=""
^TMG(22709.1,"C","GMRC",3,153,173,1,150,218,1)=""
^TMG(22709.1,"C","GMRC",3,154,181,1,150,219,1)=""
^TMG(22709.1,"C","GMRC",3,155,176,1,150,75,1)=""
^TMG(22709.1,"C","GMRC",3,155,176,1,150,220,1)=""
^TMG(22709.1,"C","GMRC",3,156,169,1,150,77,1)=""
^TMG(22709.1,"C","GMRC",3,156,169,1,150,221,1)=""
^TMG(22709.1,"C","GMRC",3,157,186,1,150,79,1)=""
^TMG(22709.1,"C","GMRC",3,157,186,1,150,222,1)=""

As a comparison, here is a portion of the "C" index for the "YS" entry above, that does have a decimal versions (though still mumps cardinal numbers).

^TMG(22709.1,"C","YS",5.01,135,174,1,697,84,1)=""
^TMG(22709.1,"C","YS",5.01,135,174,1,697,191,1)=""
^TMG(22709.1,"C","YS",5.01,136,179,1,697,192,1)=""
^TMG(22709.1,"C","YS",5.01,137,170,1,697,193,1)=""
^TMG(22709.1,"C","YS",5.01,138,177,1,697,88,1)=""
^TMG(22709.1,"C","YS",5.01,138,177,1,697,194,1)=""
^TMG(22709.1,"C","YS",5.01,139,183,1,697,195,1)=""
^TMG(22709.1,"C","YS",5.01,140,184,1,697,196,1)=""
^TMG(22709.1,"C","YS",5.01,141,178,1,697,92,1)=""

So I wrote a one-liner to show all the version numbers found in the "C" cross reference, to see if any of them are strings, i.e. non-cardinal numbers.  And there are NONE. 

yottadb>S PKG="" F  S PKG=$O(^TMG(22709.1,"C",PKG)) Q:PKG=""  W PKG,": [" S V="" F  S V=$O(^TMG(22709.1,"C",PKG,V)) W:V="" "]",! Q:V=""  W V," "

ABSV: [4 ]
ACKQ: [3 ]
ANRV: [5 ]
BPS: [1 ]
CHDS: [2.2 ]
CRHD: [1 ]
DENT: [1.2 ]
DG: [5.3 ]
DGBT: [1 ]
DGJ: [1 ]
DI: [22 22.2 ]
DVB: [4 ]
DVBA: [2.7 ]
EAS: [1 ]
EC: [2 ]
ECX: [3 ]
EDP: [2 ]
EN: [7 ]
ES: [1 ]
ETS: [1 ]
FB: [3.5 ]
FH: [5.5 ]
GEC: [2 ]
GMPL: [2 ]
GMRA: [4 ]
GMRC: [3 ]
GMRG: [3 ]
GMRV: [4 5 ]
GMRY: [4 ]
GMTS: [2.7 ]
HBH: [1 ]
HDI: [1 ]
HDS: [1 ]
HL: [1.6 ]
HMP: [2 ]
IB: [2 ]
IBD: [3 ]
ICD: [18 ]
ICPT: [6 ]
IVM: [2 ]
JLV: [2.5 2.6 2.7 2.8 2.9 3 ]
KMP: [4 ]
KMPD: [3 ]
KMPR: [2 ]
KMPS: [2 ]
LA: [5.2 ]
LBR: [2.5 ]
LEX: [2 ]
LHS: [1 ]
LR: [5.2 ]
MAG: [3 ]
MBAA: [1 ]
MBAD: [1 ]
MC: [2.3 ]
MD: [1 ]
MHE: [1 ]
MHV: [1 ]
MMRS: [1 ]
MPIF: [1 ]
NHIN: [1 ]
NUPA: [1 ]
NUR: [4 ]
OHRS: [1.4 ]
ONC: [2.11 2.2 ]
OOPS: [2 ]
OR: [3 ]
ORRC: [1 ]
PPP: [1 ]
PRC: [5.1 ]
PRCA: [4.5 ]
PRCN: [1 ]
PREA: [1 ]
PREC: [2.2 3 5 6 6.1 6.2 ]
PRED: [2 3 ]
PREM: [1.1 2 3 ]
PREN: [1 1.1 3 3.1 ]
PRPF: [3 4 ]
PRS: [4 ]
PSB: [3 ]
PSD: [3 ]
PSGW: [2.3 ]
PSJ: [5 ]
PSN: [4 ]
PSO: [7 ]
PSS: [1 ]
PSU: [4 ]
PSX: [2 ]
PX: [1 ]
PXRM: [2 ]
QAC: [2 ]
QAN: [2 ]
QAO: [3 ]
QAQ: [1.7 ]
RA: [5 ]
RG: [1 ]
RMIM: [1 ]
RMPF: [3 ]
RMPR: [3 ]
ROEB: [2 ]
ROEG: [2 ]
ROEV: [2 ]
ROR: [1.5 ]
RT: [2 ]
SD: [5.3 ]
SH: [3 ]
SOW: [3 ]
SPN: [2 3 ]
SR: [3 ]
TBI: [2 ]
TIU: [1 ]
USR: [1 ]
VALM: [1 ]
VAQ: [1.5 ]
VBEC: [1 2 ]
VDEF: [1 ]
VDI: [1 ]
VIAA: [1 ]
VIAB: [1 ]
VPR: [1 ]
VPS: [1 ]
VSS: [5 ]
WEBA: [2.4 2.5 2.6 2.7 ]
WEBB: [1 2 ]
WEBC: [1 ]
WEBD: [1.11 2.1 2.4 2.5 2.6 3 ]
WEBE: [1 2.5 2.6 2.7 2.8 2.9 3 ]
WEBG: [1 2 3 ]
WEBI: [5 5.5 6 8 8.6 9 9.5 10.5 11 11.5 12 12.5 14 14.5 15 15.5 16 16.5 17 17.5 18 18.5 19 19.5 ]
WEBN: [1.1 ]
WEBP: [1 ]
WEBV: [1 ]
WII: [1 ]
WV: [1 ]
XM: [8 ]
XOBE: [1 ]
XOBS: [1.6 ]
XOBV: [1.5 1.6 ]
XOBW: [1 ]
XT: [7.3 ]
XU: [8 ]
XWB: [1.1 ]
YS: [5.01 ]

Here is the overall data dictionary display for the file

File: TMG KIDS REMOTE DIRECTORY                                                 REF  NODE;PIECE     FLD NUM  FIELD NAME
=======================================================================================================================
  1  0;1                .01  SERVER                                    [RFJ80]
     1;0                  1  DIRECTORY NAME                  <-Mult [22709.12]
  2   -0;1              .01   -NAME OF DIR (WITHOUT PATH)             [MFJ240]
  3   -4;1              .02   -PARENT PATH                             [FJ240]
  4   -3;1              .03   -PARENT IENS (22709.12)                  [FJ240]
  5   -5;1              .04   -IS ZIP?                                     [S]
      -1;0                1   -CONTAINED FILE ENTRY         <-Mult [22709.121]
  6    --0;1            .01    --NAME OF FILE ENTRY                   [MFJ240]
  7    --0;2            .02    --TYPE                                      [S]
  8    --0;3            .03    --PROCESSED                                 [S]
       --1;0              1    --PATCH INFO                <-Mult [22709.1211]
  9     ---0;1          .01     ---PACKAGE                              [FJ10]
 10     ---0;2          .02     ---VERSION                              [FJ10]
 11     ---0;3          .03     ---PATCH NUM                            [FJ10]
 12     ---0;4          .04     ---SEQUENCE NUM                         [FJ10]
       --2;0              2    --DEPENDENCIES              <-Mult [22709.1212]
 13     ---0;1          .01     ---PACKAGE                              [FJ16]
 14     ---0;2          .02     ---VERSION                              [FJ16]
 15     ---0;3          .03     ---PATCH NUM                            [FJ16]
      -2;0                2   -CONTAINED CHILD DIRECTORY    <-Mult [22709.122]
 16    --0;1            .01    --NAME CHILD DIR (WITHOUT PATH)        [MFJ240]
 17    --1;1            .02    --ENTRY IENS (22709.12)                 [FJ240]
 <> <> <>

And here is the detail for the Version field.

--------------------------------------------------------------------------------
  FIELD NAME:       VERSION

  FLD NUMBER:       .02             FLD TITLE:
  NODE;PIECE:       0;2            HELP FRAME:

      ACCESS:       RD:    DEL:    WR:

   DATA TYPE:       Free Text

  INPUT TRANSFORM:  K:$L(X)>10!($L(X)<1) X

  PROMPT MESSAGE:   Answer must be 1-10 characters in length.

 NEW-STYLE INDEXES

  INDEX: C
     Type:          REGULAR
     Root File:     22709.1211 - Whole file index on subfile fields
     Order #:       2    Max Length:  30
     Subscript #:   2    Collation:   Forward
     Execute:       After all fields in a record are updated
     Use:           Lookup & Sorting
     Short Desc:    This is index by Package-Version-SeqNum-PatchNum
     Activity:      Fired when installing an entry at a site
                    Fired when re-cross-referenced

     Set Logic:     S ^TMG(22709.1,"C",$E(X(1),1,30),$E(X(2),1,30),$E(X(3),1,30
                    ),$E(X(4),1,30),DA(3),DA(2),DA(1),DA)=""
     Kill Logic:    K ^TMG(22709.1,"C",$E(X(1),1,30),$E(X(2),1,30),$E(X(3),1,30
                    ),$E(X(4),1,30),DA(3),DA(2),DA(1),DA)
     Kill Index:    K ^TMG(22709.1,"C")



--------------------------------------------------------------------------------
  <RETURN>


I then manually searched through all the data, looking for all entries missing from the "C" cross reference. 

yottadb>S (CT1,CT2,IEN)=0 F  S IEN=$O(^TMG(22709.1,1,1,IEN)) Q:IEN'>0  S I2=0 F  S I2=$O(^TMG(22709.1,1,1,IEN,1,I2)) Q:I
2'>0  S I3=0 F  S I3=$O(^TMG(22709.1,1,1,IEN,1,I2,1,I3)) Q:I3'>0  S ZN=$G(^TMG(22709.1,1,1,IEN,1,I2,1,I3,0)) S:ZN'="" CT
1=CT1+1 S PK=$P(ZN,"^",1),VER=$P(ZN,"^",2) IF PK'="",VER'="",$DATA(^TMG(22709.1,"C",PK,VER))=0 W:(ZN'="") I3,",",I2,",",
IEN,",1, -> ",ZN,! SET CT2=CT2+1

1,6,19,1, -> BPS^1.0^10^
2,6,19,1, -> PSO^7.0^359^
3,6,19,1, -> IB^2.0^435^
1,7,19,1, -> BPS^1.0^11^
2,7,19,1, -> PSO^7.0^385^
3,7,19,1, -> IB^2.0^452^
4,7,19,1, -> PSX^2.0^73^
1,8,19,1, -> BPS^1.0^15^
2,8,19,1, -> PSO^7.0^421^
3,8,19,1, -> PSX^2.0^74^
<--- CLIPPED FOR THE SAKE OF BREVITY -->
1,407,686,1, -> XU^8.0^524^
1,409,686,1, -> XU^8.0^541^
1,411,686,1, -> XU^8.0^538^
1,413,686,1, -> XU^8.0^542^
1,415,686,1, -> XU^8.0^534^
1,417,686,1, -> XU^8.0^539^
1,419,686,1, -> XU^8.0^528^
1,1,697,1, -> OR^3.0^434^
2,1,697,1, -> GMRV^5.0^34^
2,2,697,1, -> PSO^7.0^457^
3,2,697,1, -> PSJ^5.0^327^
4,2,697,1, -> OR^3.0^427^
1,3,697,1, -> PSO^7.0^574^
3,127,697,1, -> PXRM^2.0^62^

yottadb>W CT1,", ",CT2
10411, 1038
yottadb>

CT1=10411, meaning that there were 10,411 total records, and
CT2=1038, means that 1,038 records were NOT INCLUDED IN CROSS REFERENCE.

Or approx 10% of records are not found in cross reference.


Summary:
 1) Why are non-cardinal-numeric values for the Version field not showing up in cross reference?  Is this expected behavior??  If the Version field is defined as free text (a string), then shouldn't the cross reference accomidate a string entry?  I initially wanted them to sort together (in my first post).  But it seems crazy that it is completely MISSING!!

2) What the heck is going on?

Kevin


P.s. I think I could debug through and find out why this is happening. But I have already spent WAY TO MUCH TIME in front of this terminal today, so I am going to break away. 

David Whitten

unread,
Jul 11, 2022, 5:28:44 AM7/11/22
to hard...@googlegroups.com
The NUMERIC() Function is not necessary as you can just use 0+value to get the numeric value. 

Dave Whitten 
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+unsubscribe@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/1473bfd5-74e6-490d-879d-41bb6dba7744n%40googlegroups.com.

Sam Habiel

unread,
Jul 11, 2022, 6:17:53 AM7/11/22
to hardhats
Looking at your index, I am not sure why you are even building it. There is an existing API to check if a KIDS build is installed. I don't remember it right now, but it's used in the OSEHRA Auto-Patching Scripts.

Most likely the reason you are missing records is that one of the values is an empty string, which cannot be indexed. SEQ NUM field is frequently empty.

--Sam

To unsubscribe, send email to Hardhats+u...@googlegroups.com


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/CAH8N84zV%2BBpzoJUvgGj-WEBpzmobtiT_eUGR5A4DO_wg76kHoA%40mail.gmail.com.

Kevin Toppenberg

unread,
Jul 11, 2022, 6:34:54 AM7/11/22
to Hardhats
Sam,

See below:

>>Looking at your index, I am not sure why you are even building it. There is an existing API to check if a KIDS build is installed. I don't remember it right now, but it's used in the OSEHRA Auto-Patching Scripts.

The purpose of my code is to create metadata for every file available on the https://foia-vista.worldvista.org/Patches_By_Application/ site.  So an API call relating to which patch is already installed wouldn't apply.    The reason for making this is that over and over I would have difficulty finding a patch.  So my goal is to definitively catalog every patch (including those contained in multibuilds, and those inside zip files), and then have a reference as to their location.


Most likely the reason you are missing records is that one of the values is an empty string, which cannot be indexed. SEQ NUM field is frequently empty.

Having said that, I realize that my post was long.  But I don't think you reviewed it carefully.   I demonstrated code that manually looked at all the mumps global data for Version field, confirmed that there was a non-cardinal number (e.g. "1,413,686,1, -> XU^8.0^542^"), and that a corresponding entry in the cross reference was missing.  In fact, I found 1038 instances of entries with such a value that was not cross referenced.

So the answer is not that the Version field was empty.

As additional information, I just re-indexed the field and ran the above code, and I got the same number of missing cross reference entries. 
 
--Sam


Thanks,

Kevin



Kevin Toppenberg

unread,
Jul 11, 2022, 6:36:23 AM7/11/22
to Hardhats
Dave,


>The NUMERIC() Function is not necessary as you can just use 0+value to get the numeric value.
>
>Dave Whitten 

Ahhh, very clever!

Thanks
Kevin

Kevin Toppenberg

unread,
Jul 11, 2022, 6:39:14 AM7/11/22
to Hardhats
Sam,

Sorry, I didn't read YOUR post carefully enough.  I misread that you said the Version information was missing.  But instead, you said SEQ number was missing.  And that does seem to be correct.

So can I change the cross-reference code such I used Dave's approach of 0+value, to force the empty values to have a SEQ number of 0?

Thanks
Kevin

Kevin Toppenberg

unread,
Jul 11, 2022, 8:52:46 AM7/11/22
to Hardhats
After some fiddling with the screenman interface, and reviewing the online manual for new style cross references, we got this going, and now "8.0" sorts as "8", and null seq# sorts as 0

Thanks all

Kevin

Steven McPhelan

unread,
Jul 14, 2022, 11:08:13 AM7/14/22
to hardhats
Unless Fileman logic has changed, I do not believe what you did will still work as Sam implied.  Fileman used to not invoke the SET or KILL logic if any of the fields used in the cross reference have a value of NULL.  So you +logic won't even be executed and your index will be incomplete.

Steve
Whoever would overthrow the liberty of a nation must begin by subduing the freeness of speech - Benjamin Franklin


--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.

Kevin Toppenberg

unread,
Jul 14, 2022, 1:33:04 PM7/14/22
to Hardhats

Steve,
See below. 

On Thursday, July 14, 2022 at 11:08:13 AM UTC-4 smcp...@alumni.uci.edu wrote:
Unless Fileman logic has changed, I do not believe what you did will still work as Sam implied.  Fileman used to not invoke the SET or KILL logic if any of the fields used in the cross reference have a value of NULL.  So you +logic won't even be executed and your index will be incomplete.

Steve

I checked, and Fileman DOES appear to be filing in cases of a null value.   Here is our new-style index definition.

Showing FILE: INDEX (#.11)
 Entry #405,
     .01-FILE : 22709.1
     .02-NAME : C
     .11-SHORT DESCRIPTION : This is index by Package-Version-SeqNum-PatchNum
      .2-TYPE : REGULAR
      .4-EXECUTION : RECORD
     .41-ACTIVITY : IR
     .42-USE : LOOKUP & SORTING
      .5-ROOT TYPE : WHOLE FILE
     .51-ROOT FILE : 22709.1211
     1.1-SET LOGIC : S ^TMG(22709.1,"C",$E(X(1),1,30),X(7),$E(X(4),1,30),X(6),DA(3),DA(2),DA(1),DA)=""
     2.1-KILL LOGIC : K ^TMG(22709.1,"C",$E(X(1),1,30),X(7),$E(X(4),1,30),X(6),DA(3),DA(2),DA(1),DA)
     2.5-KILL ENTIRE INDEX CODE : K ^TMG(22709.1,"C")
    11.1-CROSS-REFERENCE VALUES : <MULTIPLE-VALUED>
          Entry #1
             .01-ORDER NUMBER : 1
              .5-SUBSCRIPT NUMBER : 1
               1-TYPE OF VALUE : FIELD
               2-FILE : 22709.1211
               3-FIELD : .01
               6-MAXIMUM LENGTH : 30
               7-COLLATION : forwards
          Entry #2
             .01-ORDER NUMBER : 2
               1-TYPE OF VALUE : FIELD
               2-FILE : 22709.1211
               3-FIELD : .02
               6-MAXIMUM LENGTH : 30
               7-COLLATION : forwards
          Entry #3
             .01-ORDER NUMBER : 3
               1-TYPE OF VALUE : FIELD
               2-FILE : 22709.1211
               3-FIELD : .04
               6-MAXIMUM LENGTH : 30
               7-COLLATION : forwards
          Entry #4
             .01-ORDER NUMBER : 4
              .5-SUBSCRIPT NUMBER : 3
               1-TYPE OF VALUE : COMPUTED VALUE
             4.5-COMPUTED CODE : S X=+$G(X(3))
               6-MAXIMUM LENGTH : 30
               7-COLLATION : forwards
          Entry #5
             .01-ORDER NUMBER : 5
               1-TYPE OF VALUE : FIELD
               2-FILE : 22709.1211
               3-FIELD : .03
               6-MAXIMUM LENGTH : 30
               7-COLLATION : forwards
          Entry #6
             .01-ORDER NUMBER : 6
              .5-SUBSCRIPT NUMBER : 4
               1-TYPE OF VALUE : COMPUTED VALUE
             4.5-COMPUTED CODE : S X=+$G(X(5))
          Entry #7
             .01-ORDER NUMBER : 7
              .5-SUBSCRIPT NUMBER : 2
               1-TYPE OF VALUE : COMPUTED VALUE
             4.5-COMPUTED CODE : S X=+$G(X(2))
-------------------------------


And here is a dump of the "C" cross reference for the YS package.  I highlighted in red the first instance of a "0", which indicates a null value for SEQ# in the record, and I highlighted in yellow, the first instance where SEQ# does have a value. 

yottadb>zwr ^TMG(22709.1,"C","YS",*)
^TMG(22709.1,"C","YS",5.01,0,60,1,25,41,1)=""
^TMG(22709.1,"C","YS",5.01,0,60,1,166,75,1)=""
^TMG(22709.1,"C","YS",5.01,0,60,1,697,120,1)=""
^TMG(22709.1,"C","YS",5.01,0,85,1,697,135,1)=""
^TMG(22709.1,"C","YS",5.01,0,92,1,697,131,1)=""
^TMG(22709.1,"C","YS",5.01,0,93,1,697,129,1)=""
^TMG(22709.1,"C","YS",5.01,0,96,1,697,121,1)=""
^TMG(22709.1,"C","YS",5.01,0,97,1,697,122,1)=""
^TMG(22709.1,"C","YS",5.01,0,98,1,697,123,1)=""
^TMG(22709.1,"C","YS",5.01,0,103,1,697,114,1)=""
^TMG(22709.1,"C","YS",5.01,0,108,1,697,116,1)=""
^TMG(22709.1,"C","YS",5.01,0,116,1,57,11,1)=""
^TMG(22709.1,"C","YS",5.01,0,116,1,697,117,1)=""
^TMG(22709.1,"C","YS",5.01,0,119,1,697,127,1)=""
^TMG(22709.1,"C","YS",5.01,0,122,1,697,2,1)=""
^TMG(22709.1,"C","YS",5.01,0,128,1,66,1,3)=""
^TMG(22709.1,"C","YS",5.01,0,128,1,697,1,3)=""
^TMG(22709.1,"C","YS",5.01,0,129,1,697,118,1)=""
^TMG(22709.1,"C","YS",5.01,0,141,1,697,119,1)=""
^TMG(22709.1,"C","YS",5.01,0,154,1,25,27,2)=""
^TMG(22709.1,"C","YS",5.01,0,154,1,697,3,2)=""
^TMG(22709.1,"C","YS",5.01,0,166,1,522,518,2)=""
^TMG(22709.1,"C","YS",5.01,0,170,1,72,1,6)=""
^TMG(22709.1,"C","YS",5.01,77,85,1,697,213,1)=""
^TMG(22709.1,"C","YS",5.01,78,93,1,697,214,1)=""
^TMG(22709.1,"C","YS",5.01,79,92,1,697,215,1)=""
^TMG(22709.1,"C","YS",5.01,80,102,1,697,5,1)=""
^TMG(22709.1,"C","YS",5.01,80,102,1,697,138,1)=""
^TMG(22709.1,"C","YS",5.01,81,100,1,697,7,1)=""
^TMG(22709.1,"C","YS",5.01,81,100,1,697,139,1)=""
^TMG(22709.1,"C","YS",5.01,82,98,1,697,140,1)=""
^TMG(22709.1,"C","YS",5.01,83,97,1,697,141,1)=""
^TMG(22709.1,"C","YS",5.01,84,96,1,697,142,1)=""
^TMG(22709.1,"C","YS",5.01,85,104,1,697,143,1)=""
^TMG(22709.1,"C","YS",5.01,86,103,1,697,144,1)=""
^TMG(22709.1,"C","YS",5.01,87,106,1,697,14,1)=""
^TMG(22709.1,"C","YS",5.01,87,106,1,697,145,1)=""
^TMG(22709.1,"C","YS",5.01,88,60,1,697,146,1)=""
^TMG(22709.1,"C","YS",5.01,89,112,1,697,147,1)=""
^TMG(22709.1,"C","YS",5.01,90,111,1,697,148,1)=""
^TMG(22709.1,"C","YS",5.01,91,105,1,697,149,1)=""
^TMG(22709.1,"C","YS",5.01,92,107,1,697,20,1)=""
^TMG(22709.1,"C","YS",5.01,92,107,1,697,150,1)=""
^TMG(22709.1,"C","YS",5.01,93,118,1,697,151,1)=""
^TMG(22709.1,"C","YS",5.01,94,113,1,697,23,1)=""
^TMG(22709.1,"C","YS",5.01,94,113,1,697,152,1)=""
^TMG(22709.1,"C","YS",5.01,95,120,1,697,153,1)=""
^TMG(22709.1,"C","YS",5.01,96,116,1,57,35,1)=""
^TMG(22709.1,"C","YS",5.01,96,116,1,697,154,1)=""
^TMG(22709.1,"C","YS",5.01,97,119,1,697,155,1)=""
^TMG(22709.1,"C","YS",5.01,98,131,1,697,111,1)=""
^TMG(22709.1,"C","YS",5.01,98,131,1,697,211,1)=""
^TMG(22709.1,"C","YS",5.01,99,128,1,697,212,1)=""
^TMG(22709.1,"C","YS",5.01,100,121,1,697,28,1)=""
^TMG(22709.1,"C","YS",5.01,100,121,1,697,156,1)=""
^TMG(22709.1,"C","YS",5.01,101,129,1,697,30,1)=""
^TMG(22709.1,"C","YS",5.01,101,129,1,697,157,1)=""
^TMG(22709.1,"C","YS",5.01,102,117,1,697,32,1)=""
^TMG(22709.1,"C","YS",5.01,102,117,1,697,158,1)=""
^TMG(22709.1,"C","YS",5.01,103,134,1,697,34,1)=""
^TMG(22709.1,"C","YS",5.01,103,134,1,697,159,1)=""
^TMG(22709.1,"C","YS",5.01,104,136,1,697,36,1)=""
^TMG(22709.1,"C","YS",5.01,104,136,1,697,160,1)=""
^TMG(22709.1,"C","YS",5.01,105,123,1,697,161,1)=""
^TMG(22709.1,"C","YS",5.01,107,143,1,697,40,1)=""
^TMG(22709.1,"C","YS",5.01,107,143,1,697,163,1)=""
^TMG(22709.1,"C","YS",5.01,108,148,1,697,42,1)=""
^TMG(22709.1,"C","YS",5.01,108,148,1,697,164,1)=""
^TMG(22709.1,"C","YS",5.01,109,147,1,697,165,1)=""
^TMG(22709.1,"C","YS",5.01,110,122,1,697,166,1)=""
^TMG(22709.1,"C","YS",5.01,112,152,1,697,168,1)=""
^TMG(22709.1,"C","YS",5.01,113,139,1,697,169,1)=""
^TMG(22709.1,"C","YS",5.01,114,153,1,697,170,1)=""
^TMG(22709.1,"C","YS",5.01,115,155,1,697,171,1)=""
^TMG(22709.1,"C","YS",5.01,116,151,1,697,172,1)=""
^TMG(22709.1,"C","YS",5.01,117,142,1,697,173,1)=""
^TMG(22709.1,"C","YS",5.01,118,156,1,697,174,1)=""
^TMG(22709.1,"C","YS",5.01,119,130,1,697,58,1)=""
^TMG(22709.1,"C","YS",5.01,119,130,1,697,175,1)=""
^TMG(22709.1,"C","YS",5.01,120,159,1,697,176,1)=""
^TMG(22709.1,"C","YS",5.01,121,161,1,697,177,1)=""
^TMG(22709.1,"C","YS",5.01,122,164,1,697,178,1)=""
^TMG(22709.1,"C","YS",5.01,123,150,1,697,63,1)=""
^TMG(22709.1,"C","YS",5.01,123,150,1,697,179,1)=""
^TMG(22709.1,"C","YS",5.01,124,154,1,697,180,1)=""
^TMG(22709.1,"C","YS",5.01,125,132,1,697,66,1)=""
^TMG(22709.1,"C","YS",5.01,125,132,1,697,181,1)=""
^TMG(22709.1,"C","YS",5.01,126,165,1,697,68,1)=""
^TMG(22709.1,"C","YS",5.01,126,165,1,697,182,1)=""
^TMG(22709.1,"C","YS",5.01,127,166,1,697,183,1)=""
^TMG(22709.1,"C","YS",5.01,128,141,1,697,184,1)=""
^TMG(22709.1,"C","YS",5.01,129,149,1,697,72,1)=""

^TMG(22709.1,"C","YS",5.01,129,149,1,697,185,1)=""
^TMG(22709.1,"C","YS",5.01,130,172,1,697,74,1)=""
^TMG(22709.1,"C","YS",5.01,130,172,1,697,186,1)=""
^TMG(22709.1,"C","YS",5.01,131,173,1,697,76,1)=""
^TMG(22709.1,"C","YS",5.01,131,173,1,697,187,1)=""
^TMG(22709.1,"C","YS",5.01,132,175,1,697,78,1)=""
^TMG(22709.1,"C","YS",5.01,132,175,1,697,188,1)=""
^TMG(22709.1,"C","YS",5.01,133,171,1,697,80,1)=""
^TMG(22709.1,"C","YS",5.01,133,171,1,697,189,1)=""
^TMG(22709.1,"C","YS",5.01,134,158,1,697,82,1)=""
^TMG(22709.1,"C","YS",5.01,134,158,1,697,190,1)=""

^TMG(22709.1,"C","YS",5.01,135,174,1,697,84,1)=""
^TMG(22709.1,"C","YS",5.01,135,174,1,697,191,1)=""
^TMG(22709.1,"C","YS",5.01,136,179,1,697,192,1)=""
^TMG(22709.1,"C","YS",5.01,137,170,1,697,193,1)=""
^TMG(22709.1,"C","YS",5.01,138,177,1,697,88,1)=""
^TMG(22709.1,"C","YS",5.01,138,177,1,697,194,1)=""
^TMG(22709.1,"C","YS",5.01,139,183,1,697,195,1)=""
^TMG(22709.1,"C","YS",5.01,140,184,1,697,196,1)=""
^TMG(22709.1,"C","YS",5.01,141,178,1,697,92,1)=""
^TMG(22709.1,"C","YS",5.01,141,178,1,697,197,1)=""
^TMG(22709.1,"C","YS",5.01,142,191,1,697,198,1)=""
^TMG(22709.1,"C","YS",5.01,143,190,1,697,199,1)=""
^TMG(22709.1,"C","YS",5.01,144,182,1,697,96,1)=""
^TMG(22709.1,"C","YS",5.01,144,182,1,697,200,1)=""
^TMG(22709.1,"C","YS",5.01,145,181,1,697,98,1)=""
^TMG(22709.1,"C","YS",5.01,145,181,1,697,201,1)=""
^TMG(22709.1,"C","YS",5.01,146,195,1,697,202,1)=""
^TMG(22709.1,"C","YS",5.01,147,198,1,697,203,1)=""
^TMG(22709.1,"C","YS",5.01,148,187,1,697,125,1)=""
^TMG(22709.1,"C","YS",5.01,148,187,1,697,204,1)=""
^TMG(22709.1,"C","YS",5.01,149,200,1,697,205,1)=""
^TMG(22709.1,"C","YS",5.01,150,193,1,697,104,1)=""
^TMG(22709.1,"C","YS",5.01,150,193,1,697,206,1)=""
^TMG(22709.1,"C","YS",5.01,151,201,1,697,207,1)=""
^TMG(22709.1,"C","YS",5.01,152,205,1,697,208,1)=""
^TMG(22709.1,"C","YS",5.01,153,199,1,697,108,1)=""
^TMG(22709.1,"C","YS",5.01,153,199,1,697,209,1)=""
^TMG(22709.1,"C","YS",5.01,154,203,1,697,210,1)=""

I also wrote this code that looks at every record and ensures there is no missing "C" cross reference values.  And there are none. 

MISSING;
  NEW CT1,CT2,I1,I0,PK,VER,PATNUM,SEQNUM
  SET (CT1,CT2,I1)=0 SET I0=1
  FOR  S I1=$O(^TMG(22709.1,I0,1,I1)) Q:I1'>0  DO
  . SET I2=0
  . FOR  S I2=$O(^TMG(22709.1,I0,1,I1,1,I2)) Q:I2'>0  DO
  . . SET I3=0
  . . FOR  SET I3=$O(^TMG(22709.1,I0,1,I1,1,I2,1,I3)) Q:I3'>0  DO
  . . . SET ZN=$G(^TMG(22709.1,I0,1,I1,1,I2,1,I3,0)) Q:ZN=""
  . . . NEW IENS SET IENS=I3_","_I2_","_I1_","_I0_","
  . . . SET CT1=CT1+1
  . . . SET PK=$P(ZN,"^",1)
  . . . SET VER=+$P(ZN,"^",2)
  . . . SET PATNUM=+$P(ZN,"^",3)
  . . . SET SEQNUM=+$P(ZN,"^",4)
  . . . NEW DATA SET DATA=$DATA(^TMG(22709.1,"C",PK,VER,SEQNUM,PATNUM))
  . . . IF (PK="") WRITE "PKG fld empty "
  . . . IF (VER="") WRITE "VER fld empty "
  . . . IF (SEQNUM=0) WRITE "SEQ# = 0 ",IENS,ZN,!
  . . . IF (PATNUM=0) WRITE "PATCHNUM# = 0 "
  . . . IF DATA=0 DO
  . . . . WRITE "Missing INDEX: ",IENS," -> ",ZN,!
  . . . . ZWR ^TMG(22709.1,I0,1,I1,1,I2,1,I3,*)
  . . . . SET CT2=CT2+1
  WRITE !,CT1," Total records reviewed",!
  WRITE CT2," indexes missing.",!  
 

Kevin

David Whitten

unread,
Aug 14, 2026, 11:57:52 AM (24 hours ago) Aug 14
to hard...@googlegroups.com
I think this cross reference uses + to force strings to be numeric then the code never sees an empty string 
Dave


---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hardhats/797342ca-3a7b-4b6b-b0ba-f0e313dcfc16n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages