forked from shabiel/KIDS-VC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXPD_8P0_11310.KID
2042 lines (2013 loc) · 59.9 KB
/
XPD_8P0_11310.KID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
KIDS Distribution saved on Sep 01, 2014@15:25:18
KIDS Version Control
**KIDS**:XPD*8.0*11310^
**INSTALL NAME**
XPD*8.0*11310
"BLD",8948,0)
XPD*8.0*11310^KIDS^0^3140901^y
"BLD",8948,4,0)
^9.64PA^^
"BLD",8948,6.3)
4
"BLD",8948,"KRN",0)
^9.67PA^779.2^20
"BLD",8948,"KRN",.4,0)
.4
"BLD",8948,"KRN",.401,0)
.401
"BLD",8948,"KRN",.402,0)
.402
"BLD",8948,"KRN",.403,0)
.403
"BLD",8948,"KRN",.5,0)
.5
"BLD",8948,"KRN",.84,0)
.84
"BLD",8948,"KRN",3.6,0)
3.6
"BLD",8948,"KRN",3.8,0)
3.8
"BLD",8948,"KRN",9.2,0)
9.2
"BLD",8948,"KRN",9.8,0)
9.8
"BLD",8948,"KRN",9.8,"NM",0)
^9.68A^4^4
"BLD",8948,"KRN",9.8,"NM",1,0)
XPDK2V0^^0^B92910048
"BLD",8948,"KRN",9.8,"NM",2,0)
XPDK2V1^^0^B25126356
"BLD",8948,"KRN",9.8,"NM",3,0)
XPDK2VC^^0^B189402324
"BLD",8948,"KRN",9.8,"NM",4,0)
XPDOS^^0^B13271785
"BLD",8948,"KRN",9.8,"NM","B","XPDK2V0",1)
"BLD",8948,"KRN",9.8,"NM","B","XPDK2V1",2)
"BLD",8948,"KRN",9.8,"NM","B","XPDK2VC",3)
"BLD",8948,"KRN",9.8,"NM","B","XPDOS",4)
"BLD",8948,"KRN",19,0)
19
"BLD",8948,"KRN",19,"NM",0)
^9.68A^3^3
"BLD",8948,"KRN",19,"NM",1,0)
XPD VC BUILD^^0
"BLD",8948,"KRN",19,"NM",2,0)
XPD VC FILE^^0
"BLD",8948,"KRN",19,"NM",3,0)
XPD DISTRIBUTION MENU^^2
"BLD",8948,"KRN",19,"NM","B","XPD DISTRIBUTION MENU",3)
"BLD",8948,"KRN",19,"NM","B","XPD VC BUILD",1)
"BLD",8948,"KRN",19,"NM","B","XPD VC FILE",2)
"BLD",8948,"KRN",19.1,0)
19.1
"BLD",8948,"KRN",101,0)
101
"BLD",8948,"KRN",409.61,0)
409.61
"BLD",8948,"KRN",771,0)
771
"BLD",8948,"KRN",779.2,0)
779.2
"BLD",8948,"KRN",870,0)
870
"BLD",8948,"KRN",8989.51,0)
8989.51
"BLD",8948,"KRN",8989.52,0)
8989.52
"BLD",8948,"KRN",8994,0)
8994
"BLD",8948,"KRN","B",.4,.4)
"BLD",8948,"KRN","B",.401,.401)
"BLD",8948,"KRN","B",.402,.402)
"BLD",8948,"KRN","B",.403,.403)
"BLD",8948,"KRN","B",.5,.5)
"BLD",8948,"KRN","B",.84,.84)
"BLD",8948,"KRN","B",3.6,3.6)
"BLD",8948,"KRN","B",3.8,3.8)
"BLD",8948,"KRN","B",9.2,9.2)
"BLD",8948,"KRN","B",9.8,9.8)
"BLD",8948,"KRN","B",19,19)
"BLD",8948,"KRN","B",19.1,19.1)
"BLD",8948,"KRN","B",101,101)
"BLD",8948,"KRN","B",409.61,409.61)
"BLD",8948,"KRN","B",771,771)
"BLD",8948,"KRN","B",779.2,779.2)
"BLD",8948,"KRN","B",870,870)
"BLD",8948,"KRN","B",8989.51,8989.51)
"BLD",8948,"KRN","B",8989.52,8989.52)
"BLD",8948,"KRN","B",8994,8994)
"KRN",19,170,-1)
2^3
"KRN",19,170,0)
XPD DISTRIBUTION MENU^Edits and Distribution^^M^1^^^^^^^2^y
"KRN",19,170,10,0)
^19.01IP^10^10
"KRN",19,170,10,9,0)
11752^VC1^5
"KRN",19,170,10,9,"^")
XPD VC BUILD
"KRN",19,170,10,10,0)
11753^VC2^6
"KRN",19,170,10,10,"^")
XPD VC FILE
"KRN",19,170,"U")
EDITS AND DISTRIBUTION
"KRN",19,11752,-1)
0^1
"KRN",19,11752,0)
XPD VC BUILD^Export for version control comp from a local build^^R^^^^^^^^KIDS^y
"KRN",19,11752,1,0)
^^3^3^3140901^
"KRN",19,11752,1,1,0)
This option lets you export version controlled components from a KIDS
"KRN",19,11752,1,2,0)
build on your system. Use this to version control builds from your system
"KRN",19,11752,1,3,0)
every time you create a build.
"KRN",19,11752,25)
EXPKIDIN^XPDK2VC
"KRN",19,11752,"U")
EXPORT FOR VERSION CONTROL COM
"KRN",19,11753,-1)
0^2
"KRN",19,11753,0)
XPD VC FILE^Export for version control components from a file^^R^^^^^^^^^y
"KRN",19,11753,1,0)
^^3^3^3140901^
"KRN",19,11753,1,1,0)
This option loads a KIDs formatted HFS file into a temporary ^TMP
"KRN",19,11753,1,2,0)
global, exports its contents in a version control format, and then
"KRN",19,11753,1,3,0)
deletes the temporary ^TMP global. Use this to decompose an HFS KIDS file.
"KRN",19,11753,25)
EXPFILIN^XPDK2VC
"KRN",19,11753,"U")
EXPORT FOR VERSION CONTROL COM
"MBREQ")
0
"ORD",18,19)
19;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA
"ORD",18,19,0)
OPTION
"PKG",2,-1)
1^1
"PKG",2,0)
KIDS^XPD^Kernel Installation & Distribution System
"PKG",2,22,0)
^9.49I^1^1
"PKG",2,22,1,0)
8.0^2950703^2960531
"PKG",2,22,1,"PAH",1,0)
11310^3140901
"QUES","XPF1",0)
Y
"QUES","XPF1","??")
^D REP^XPDH
"QUES","XPF1","A")
Shall I write over your |FLAG| File
"QUES","XPF1","B")
YES
"QUES","XPF1","M")
D XPF1^XPDIQ
"QUES","XPF2",0)
Y
"QUES","XPF2","??")
^D DTA^XPDH
"QUES","XPF2","A")
Want my data |FLAG| yours
"QUES","XPF2","B")
YES
"QUES","XPF2","M")
D XPF2^XPDIQ
"QUES","XPI1",0)
YO
"QUES","XPI1","??")
^D INHIBIT^XPDH
"QUES","XPI1","A")
Want KIDS to INHIBIT LOGONs during the install
"QUES","XPI1","B")
NO
"QUES","XPI1","M")
D XPI1^XPDIQ
"QUES","XPM1",0)
PO^VA(200,:EM
"QUES","XPM1","??")
^D MG^XPDH
"QUES","XPM1","A")
Enter the Coordinator for Mail Group '|FLAG|'
"QUES","XPM1","B")
"QUES","XPM1","M")
D XPM1^XPDIQ
"QUES","XPO1",0)
Y
"QUES","XPO1","??")
^D MENU^XPDH
"QUES","XPO1","A")
Want KIDS to Rebuild Menu Trees Upon Completion of Install
"QUES","XPO1","B")
NO
"QUES","XPO1","M")
D XPO1^XPDIQ
"QUES","XPZ1",0)
Y
"QUES","XPZ1","??")
^D OPT^XPDH
"QUES","XPZ1","A")
Want to DISABLE Scheduled Options, Menu Options, and Protocols
"QUES","XPZ1","B")
NO
"QUES","XPZ1","M")
D XPZ1^XPDIQ
"QUES","XPZ2",0)
Y
"QUES","XPZ2","??")
^D RTN^XPDH
"QUES","XPZ2","A")
Want to MOVE routines to other CPUs
"QUES","XPZ2","B")
NO
"QUES","XPZ2","M")
D XPZ2^XPDIQ
"RTN")
4
"RTN","XPDK2V0")
0^1^B92910048
"RTN","XPDK2V0",1,0)
XPDK2V0 ; VEN/SMH - Continuation of XPDK2VC ;2014-03-24 3:56 PM
"RTN","XPDK2V0",2,0)
;;8.0;KERNEL;**11310*;Mar 28, 2014;Build 4
"RTN","XPDK2V0",3,0)
;
"RTN","XPDK2V0",4,0)
; (C) Sam Habiel 2014, who needs more money than fame (but a rich wife will do!)
"RTN","XPDK2V0",5,0)
; License: Apache 2
"RTN","XPDK2V0",6,0)
;
"RTN","XPDK2V0",7,0)
RTN(FAIL,RTNGLO,ROOT) ; Routine Exporter
"RTN","XPDK2V0",8,0)
; .FAIL - Output. Did we fail? Mostly b/c of filesystem issues.
"RTN","XPDK2V0",9,0)
; RTNGLO - The KIDS global ending at "RTN". Use $NA to pass this.
"RTN","XPDK2V0",10,0)
; ROOT - File system root where we are gonna make the Routines directory
"RTN","XPDK2V0",11,0)
;
"RTN","XPDK2V0",12,0)
N RTNDIR S RTNDIR=ROOT_"Routines"_$$D^XPDOS()
"RTN","XPDK2V0",13,0)
N % S %=$$MKDIR^XPDOS(RTNDIR)
"RTN","XPDK2V0",14,0)
I % S FAIL=1 QUIT
"RTN","XPDK2V0",15,0)
;
"RTN","XPDK2V0",16,0)
D EN^DDIOL("Exporting these routines to "_RTNDIR)
"RTN","XPDK2V0",17,0)
;
"RTN","XPDK2V0",18,0)
N POP
"RTN","XPDK2V0",19,0)
N RTN S RTN=""
"RTN","XPDK2V0",20,0)
N RTNDDIOL S RTNDDIOL="" ; Output message
"RTN","XPDK2V0",21,0)
F S RTN=$O(@RTNGLO@(RTN)) Q:RTN="" D Q:POP
"RTN","XPDK2V0",22,0)
. D OPEN^%ZISH("RTNHDR",RTNDIR,RTN_".header","W")
"RTN","XPDK2V0",23,0)
. I POP S FAIL=1 QUIT
"RTN","XPDK2V0",24,0)
. U IO
"RTN","XPDK2V0",25,0)
. W @RTNGLO@(RTN) ; Header node.
"RTN","XPDK2V0",26,0)
. D CLOSE^%ZISH("RTNHDR")
"RTN","XPDK2V0",27,0)
. ;
"RTN","XPDK2V0",28,0)
. ; Now write the routine code
"RTN","XPDK2V0",29,0)
. D OPEN^%ZISH("RTNCODE",RTNDIR,RTN_".m","W")
"RTN","XPDK2V0",30,0)
. I POP S FAIL=1 QUIT
"RTN","XPDK2V0",31,0)
. U IO
"RTN","XPDK2V0",32,0)
. N LN F LN=0:0 S LN=$O(@RTNGLO@(RTN,LN)) Q:'LN D
"RTN","XPDK2V0",33,0)
.. I LN=2 W $P(^(LN,0),";",1,6),! ; **** DO NOT INCLUDE BUILD NUMBER YOU STUPID IDIOT! **** SCREWS UP DIFF ****
"RTN","XPDK2V0",34,0)
.. E W ^(LN,0),!
"RTN","XPDK2V0",35,0)
. D CLOSE^%ZISH("RTNCODE")
"RTN","XPDK2V0",36,0)
. ; done!
"RTN","XPDK2V0",37,0)
. S RTNDDIOL=RTNDDIOL_" "_RTN ; Add to output message
"RTN","XPDK2V0",38,0)
S $E(RTNDDIOL)="" ; Remove leading space
"RTN","XPDK2V0",39,0)
;
"RTN","XPDK2V0",40,0)
D EN^DDIOL(RTNDDIOL)
"RTN","XPDK2V0",41,0)
K @RTNGLO
"RTN","XPDK2V0",42,0)
QUIT
"RTN","XPDK2V0",43,0)
;
"RTN","XPDK2V0",44,0)
FIA(FAIL,KIDGLO,ROOT) ; Print FIA, UP, ^DD, ^DIC, SEC, IX, KEY, KEYPTR for each file
"RTN","XPDK2V0",45,0)
; .FAIL - Output. Did we fail? Mostly b/c of filesystem issues.
"RTN","XPDK2V0",46,0)
; KIDGLO - The KIDS global (not a sub). Use $NA to pass this.
"RTN","XPDK2V0",47,0)
; ROOT - File system root where we are gonna export.
"RTN","XPDK2V0",48,0)
Q:'$D(@KIDGLO@("FIA")) ; No files to export
"RTN","XPDK2V0",49,0)
;
"RTN","XPDK2V0",50,0)
N POP
"RTN","XPDK2V0",51,0)
;
"RTN","XPDK2V0",52,0)
N PATH S PATH=ROOT_"Files"_$$D^XPDOS()
"RTN","XPDK2V0",53,0)
S POP=$$MKDIR^XPDOS(PATH)
"RTN","XPDK2V0",54,0)
I POP D EN^DDIOL($$RED("Couldn't create directory")) S FAIL=1 QUIT
"RTN","XPDK2V0",55,0)
;
"RTN","XPDK2V0",56,0)
D EN^DDIOL("Exporting files DD and Data to Files/")
"RTN","XPDK2V0",57,0)
;
"RTN","XPDK2V0",58,0)
N FILE F FILE=0:0 S FILE=$O(@KIDGLO@("FIA",FILE)) Q:'FILE D Q:$G(POP) ; For each top file in "FIA"
"RTN","XPDK2V0",59,0)
. N FNUM S FNUM=FILE ; File Number
"RTN","XPDK2V0",60,0)
. N FNAM S FNAM=@KIDGLO@("FIA",FILE) ; File Name (Value of the first FIA node)
"RTN","XPDK2V0",61,0)
. S FNAM=$TR(FNAM,"\/!@#$%^&*()","------------") ; Replace punc with dashes
"RTN","XPDK2V0",62,0)
. N HFSNAME S HFSNAME=FNUM_"+"_FNAM_".DD.zwr" ; File Name
"RTN","XPDK2V0",63,0)
. D OPEN^%ZISH("DD",PATH,HFSNAME,"W") ; Open
"RTN","XPDK2V0",64,0)
. I POP S FAIL=1 QUIT ; Open failed
"RTN","XPDK2V0",65,0)
. U IO ; Use device
"RTN","XPDK2V0",66,0)
. D ZWRITE($NA(@KIDGLO@("FIA",FILE))) ; DIFROM FIA Array (data on what to send)
"RTN","XPDK2V0",67,0)
. I $D(@KIDGLO@("^DIC",FILE)) D ZWRITE($NA(^(FILE))) K @KIDGLO@("^DIC",FILE) ; FOF Nodes.
"RTN","XPDK2V0",68,0)
. D ZWRITE($NA(@KIDGLO@("^DD",FILE))) K @KIDGLO@("^DD",FILE) ; Data Dictionary
"RTN","XPDK2V0",69,0)
. I $D(@KIDGLO@("SEC","^DIC",FILE)) D ZWRITE($NA(^(FILE))) K @KIDGLO@("SEC","^DIC",FILE) ; ^DIC Security Nodes
"RTN","XPDK2V0",70,0)
. I $D(@KIDGLO@("SEC","^DD",FILE)) D ZWRITE($NA(^(FILE))) K @KIDGLO@("SEC","^DD",FILE) ; ^DD Security Nodes
"RTN","XPDK2V0",71,0)
. I $D(@KIDGLO@("UP",FILE)) D ZWRITE($NA(^(FILE))) K @KIDGLO@("UP",FILE) ; Subfile upward nodes to find parent files
"RTN","XPDK2V0",72,0)
. I $D(@KIDGLO@("IX",FILE)) D ZWRITE($NA(^(FILE))) K @KIDGLO@("IX",FILE) ; New Style Indexes
"RTN","XPDK2V0",73,0)
. I $D(@KIDGLO@("KEY",FILE)) D ; Keys?
"RTN","XPDK2V0",74,0)
. . D ZWRITE($NA(@KIDGLO@("KEY",FILE))) K @KIDGLO@("KEY",FILE) ; Keys...
"RTN","XPDK2V0",75,0)
. . D ZWRITE($NA(@KIDGLO@("KEYPTR",FILE))) K @KIDGLO@("KEYPTR",FILE) ; and pointer resolution to NS indexes
"RTN","XPDK2V0",76,0)
. N SUBFILE F SUBFILE=0:0 S SUBFILE=$O(@KIDGLO@("FIA",FILE,SUBFILE)) Q:'SUBFILE D
"RTN","XPDK2V0",77,0)
. . I $D(@KIDGLO@("PGL",SUBFILE)) D ZWRITE($NA(@KIDGLO@("PGL",SUBFILE))) K @KIDGLO@("PGL",SUBFILE) ; Source system pointer resolution (not used at dest.)
"RTN","XPDK2V0",78,0)
. D CLOSE^%ZISH("DD") ; Close. Resets IO.
"RTN","XPDK2V0",79,0)
. D EN^DDIOL("Exported "_HFSNAME)
"RTN","XPDK2V0",80,0)
;
"RTN","XPDK2V0",81,0)
;
"RTN","XPDK2V0",82,0)
D DATA(.FAIL,KIDGLO,PATH) ; Now Data...
"RTN","XPDK2V0",83,0)
K @KIDGLO@("FIA") ; Kill this off now.
"RTN","XPDK2V0",84,0)
QUIT
"RTN","XPDK2V0",85,0)
;
"RTN","XPDK2V0",86,0)
DATA(FAIL,KIDGLO,ROOT) ; Print DATA, FRV1, FRVL, FRV1K subscripts
"RTN","XPDK2V0",87,0)
; .FAIL - Output. Did we fail? Mostly b/c of filesystem issues.
"RTN","XPDK2V0",88,0)
; KIDGLO - The KIDS global (not a sub). Use $NA to pass this.
"RTN","XPDK2V0",89,0)
; ROOT - File system root where we are gonna export.
"RTN","XPDK2V0",90,0)
Q:'$D(@KIDGLO@("DATA"))
"RTN","XPDK2V0",91,0)
;
"RTN","XPDK2V0",92,0)
N POP
"RTN","XPDK2V0",93,0)
N FILE F FILE=0:0 S FILE=$O(@KIDGLO@("FIA",FILE)) Q:'FILE D Q:$G(POP) ; For each top file in "FIA"
"RTN","XPDK2V0",94,0)
. Q:'$D(@KIDGLO@("DATA",FILE)) ; No Data. Skip.
"RTN","XPDK2V0",95,0)
. N FNUM S FNUM=FILE ; File Number
"RTN","XPDK2V0",96,0)
. N FNAM S FNAM=@KIDGLO@("FIA",FILE) ; File Name (Value of the first FIA node)
"RTN","XPDK2V0",97,0)
. S FNAM=$TR(FNAM,"\/!@#$%^&*()","------------") ; Replace punc with dashes
"RTN","XPDK2V0",98,0)
. N HFSNAME S HFSNAME=FNUM_"+"_FNAM_".Data.zwr" ; File Name
"RTN","XPDK2V0",99,0)
. D OPEN^%ZISH("DATA",ROOT,HFSNAME,"W") ; Open
"RTN","XPDK2V0",100,0)
. I POP S FAIL=1 QUIT ; Open failed
"RTN","XPDK2V0",101,0)
. U IO ; Use device
"RTN","XPDK2V0",102,0)
. D ZWRITE($NA(@KIDGLO@("DATA",FILE))) K @KIDGLO@("DATA",FILE) ; Export Data
"RTN","XPDK2V0",103,0)
. I $D(@KIDGLO@("FRV1",FILE)) D ; Pointer Resolution?
"RTN","XPDK2V0",104,0)
. . D ZWRITE($NA(@KIDGLO@("FRV1",FILE))) K @KIDGLO@("FRV1",FILE) ; Operator node. See DIFROMSR.
"RTN","XPDK2V0",105,0)
. . D ZWRITE($NA(@KIDGLO@("FRVL",FILE))) K @KIDGLO@("FRVL",FILE) ; Don't know what that is. See DIFROMSR.
"RTN","XPDK2V0",106,0)
. . D ZWRITE($NA(@KIDGLO@("FRV1K",FILE))) K @KIDGLO@("FRV1K",FILE) ; ditto
"RTN","XPDK2V0",107,0)
. D CLOSE^%ZISH("DATA") ; Close. Resets IO.
"RTN","XPDK2V0",108,0)
. D EN^DDIOL("Exported "_HFSNAME)
"RTN","XPDK2V0",109,0)
K @KIDGLO@("DATA")
"RTN","XPDK2V0",110,0)
QUIT
"RTN","XPDK2V0",111,0)
;
"RTN","XPDK2V0",112,0)
LOAD ; Restore patch components recursively
"RTN","XPDK2V0",113,0)
; TODO: Document and clean.
"RTN","XPDK2V0",114,0)
N DIR,X,Y,DIROUT,DIRUT,DTOUT,DUOUT,DIROUT ; fur DIR
"RTN","XPDK2V0",115,0)
S DIR(0)="F^2:1000",DIR("A")="Full path of patches to load, up to but not including patch names"
"RTN","XPDK2V0",116,0)
S DIR("B")=$G(^DISV(DUZ,"XPDK2V0")) ; Recurse Path
"RTN","XPDK2V0",117,0)
I DIR("B")="" K DIR("B")
"RTN","XPDK2V0",118,0)
D ^DIR
"RTN","XPDK2V0",119,0)
QUIT:Y="^"
"RTN","XPDK2V0",120,0)
N ROOT S ROOT=Y ; root patch
"RTN","XPDK2V0",121,0)
S ^DISV(DUZ,"XPDK2V0")=ROOT
"RTN","XPDK2V0",122,0)
N D S D=$$D^XPDOS()
"RTN","XPDK2V0",123,0)
I $E(ROOT,$L(ROOT))=D S $E(ROOT,$L(ROOT))=""
"RTN","XPDK2V0",124,0)
N FILES ; final array to keep files
"RTN","XPDK2V0",125,0)
N LVL S LVL=0 ; tree level for debugging
"RTN","XPDK2V0",126,0)
D LOAD1(ROOT)
"RTN","XPDK2V0",127,0)
D PROCESS(.FILES)
"RTN","XPDK2V0",128,0)
QUIT
"RTN","XPDK2V0",129,0)
;
"RTN","XPDK2V0",130,0)
LOAD1(ROOT) ; Recursive entry point to load each directory
"RTN","XPDK2V0",131,0)
; TODO: Document and clean.
"RTN","XPDK2V0",132,0)
; ZEXCEPT: FILES
"RTN","XPDK2V0",133,0)
; ZEXCEPT: LVL
"RTN","XPDK2V0",134,0)
; ZEXCEPT: D fs delimiter
"RTN","XPDK2V0",135,0)
S LVL=LVL+1
"RTN","XPDK2V0",136,0)
N % ; Throw away variable
"RTN","XPDK2V0",137,0)
N ARRAY S ARRAY("*")=""
"RTN","XPDK2V0",138,0)
N SCRATCH
"RTN","XPDK2V0",139,0)
S %=$$LIST^%ZISH(ROOT,"ARRAY","SCRATCH")
"RTN","XPDK2V0",140,0)
; I $$DEFDIR^%ZISH(ROOT)="/"!('$$LIST^%ZISH(ROOT,"ARRAY","FILES")) QUIT ; DEFDIR bug!
"RTN","XPDK2V0",141,0)
N F S F="" F S F=$O(SCRATCH(F)) Q:F="" D
"RTN","XPDK2V0",142,0)
. I $E(F)="." QUIT ; Hidden file
"RTN","XPDK2V0",143,0)
. N OLDROOT S OLDROOT=ROOT
"RTN","XPDK2V0",144,0)
. N ROOT S ROOT=OLDROOT_D_F
"RTN","XPDK2V0",145,0)
. W "found ",?LVL*5,F,!
"RTN","XPDK2V0",146,0)
. N SCRATCH2
"RTN","XPDK2V0",147,0)
. N % S %=$$LIST^%ZISH(ROOT,"ARRAY","SCRATCH2") ; %=1 if a directory (files returned); %=0 if not
"RTN","XPDK2V0",148,0)
. I % D ; stack $TEST
"RTN","XPDK2V0",149,0)
. . D LOAD1(ROOT) ; Recurse if directory
"RTN","XPDK2V0",150,0)
. E S FILES(ROOT)="" ; otherwise, just put it for us to review
"RTN","XPDK2V0",151,0)
. S LVL=LVL-1
"RTN","XPDK2V0",152,0)
QUIT
"RTN","XPDK2V0",153,0)
;
"RTN","XPDK2V0",154,0)
PROCESS(FILES) ; Process each file to load into ^XTMP or so...
"RTN","XPDK2V0",155,0)
N POP
"RTN","XPDK2V0",156,0)
N IEN S IEN=0
"RTN","XPDK2V0",157,0)
N F S F="" F S F=$O(FILES(F)) Q:F="" D
"RTN","XPDK2V0",158,0)
. D OPEN^%ZISH("F",$P(F,D,1,$L(F,D)-1),$P(F,D,$L(F,D)),"R") ; Read file (handle, path, file, mode)
"RTN","XPDK2V0",159,0)
. I POP S $EC=",U-FILE-DISAPPEARED,"
"RTN","XPDK2V0",160,0)
. U IO
"RTN","XPDK2V0",161,0)
. S IEN=IEN+1
"RTN","XPDK2V0",162,0)
. N X F R X:1 Q:$$STATUS^%ZISH() D
"RTN","XPDK2V0",163,0)
. . ; TO CONTINUE HERE!!! -- MAKE SPECIAL PROCESSING FOR ROUTINES
"RTN","XPDK2V0",164,0)
. . S @X
"RTN","XPDK2V0",165,0)
. D CLOSE^%ZISH()
"RTN","XPDK2V0",166,0)
QUIT
"RTN","XPDK2V0",167,0)
;
"RTN","XPDK2V0",168,0)
ZWRITE(NAME,QS,QSREP) ; Replacement for ZWRITE ; Public Proc
"RTN","XPDK2V0",169,0)
ZWRITE0 ; Goto Entry point for XPDK2VC (only permitted user)
"RTN","XPDK2V0",170,0)
; Pass NAME by name as a closed reference. lvn and gvn are both supported.
"RTN","XPDK2V0",171,0)
; QS = Query Subscript to replace. Optional.
"RTN","XPDK2V0",172,0)
; QSREP = Query Subscrpt replacement. Optional, but must be passed if QS is.
"RTN","XPDK2V0",173,0)
; : syntax is not supported (yet)
"RTN","XPDK2V0",174,0)
S QS=$G(QS),QSREP=$G(QSREP)
"RTN","XPDK2V0",175,0)
I QS,'$L(QSREP) S $EC=",U-INVALID-PARAMETERS,"
"RTN","XPDK2V0",176,0)
N INCEXPN S INCEXPN=""
"RTN","XPDK2V0",177,0)
I $L(QSREP) S INCEXPN="S $G("_QSREP_")="_QSREP_"+1"
"RTN","XPDK2V0",178,0)
N L S L=$L(NAME) ; Name length
"RTN","XPDK2V0",179,0)
I $E(NAME,L-2,L)=",*)" S NAME=$E(NAME,1,L-3)_")" ; If last sub is *, remove it and close the ref
"RTN","XPDK2V0",180,0)
N ORIGNAME S ORIGNAME=NAME ;
"RTN","XPDK2V0",181,0)
N ORIGQL S ORIGQL=$QL(NAME) ; Number of subscripts in the original name
"RTN","XPDK2V0",182,0)
I $D(@NAME)#2 W $S(QS:$$SUBNAME(NAME,QS,QSREP),1:NAME),"=",$$FORMAT(@NAME),! ; Write base if it exists
"RTN","XPDK2V0",183,0)
; $QUERY through the name.
"RTN","XPDK2V0",184,0)
; Stop when we are out.
"RTN","XPDK2V0",185,0)
; Stop when the last subscript of the original name isn't the same as
"RTN","XPDK2V0",186,0)
; the last subscript of the Name.
"RTN","XPDK2V0",187,0)
F S NAME=$Q(@NAME) Q:NAME="" Q:$NA(@ORIGNAME,ORIGQL)'=$NA(@NAME,ORIGQL) D
"RTN","XPDK2V0",188,0)
. W $S(QS:$$SUBNAME(NAME,QS,QSREP),1:NAME),"=",$$FORMAT(@NAME),!
"RTN","XPDK2V0",189,0)
QUIT
"RTN","XPDK2V0",190,0)
;
"RTN","XPDK2V0",191,0)
SUBNAME(N,QS,QSREP) ; Substitue subscript QS's value with QSREP in name reference N
"RTN","XPDK2V0",192,0)
N VARCR S VARCR=$NA(@N,QS-1) ; Closed reference of name up to the sub we want to change
"RTN","XPDK2V0",193,0)
N VAROR S VAROR=$S($E(VARCR,$L(VARCR))=")":$E(VARCR,1,$L(VARCR)-1)_",",1:VARCR_"(") ; Open ref
"RTN","XPDK2V0",194,0)
N B4 S B4=$NA(@N,QS),B4=$E(B4,1,$L(B4)-1) ; Before sub piece, only used in next line
"RTN","XPDK2V0",195,0)
N AF S AF=$P(N,B4,2,99) ; After sub piece
"RTN","XPDK2V0",196,0)
QUIT VAROR_QSREP_AF
"RTN","XPDK2V0",197,0)
;
"RTN","XPDK2V0",198,0)
FORMAT(V) ; Add quotes, replace control characters if necessary; Public $$
"RTN","XPDK2V0",199,0)
;If numeric, nothing to do.
"RTN","XPDK2V0",200,0)
;If no encoding required, then return as quoted string.
"RTN","XPDK2V0",201,0)
;Otherwise, return as an expression with $C()'s and strings.
"RTN","XPDK2V0",202,0)
I +V=V Q V ; If numeric, just return the value.
"RTN","XPDK2V0",203,0)
N QT S QT="""" ; Quote
"RTN","XPDK2V0",204,0)
I $F(V,QT) D ;chk if V contains any Quotes
"RTN","XPDK2V0",205,0)
. N P S P=0 ;position pointer into V
"RTN","XPDK2V0",206,0)
. F S P=$F(V,QT,P) Q:'P D ;find next "
"RTN","XPDK2V0",207,0)
. . S $E(V,P-1)=QT_QT ;double each "
"RTN","XPDK2V0",208,0)
. . S P=P+1 ;skip over new "
"RTN","XPDK2V0",209,0)
I $$CCC(V) D Q V ; If control character is present do this and quit
"RTN","XPDK2V0",210,0)
. S V=$$RCC(QT_V_QT) ; Replace control characters in "V"
"RTN","XPDK2V0",211,0)
. S:$E(V,1,3)="""""_" $E(V,1,3)="" ; Replace doubled up quotes at start
"RTN","XPDK2V0",212,0)
. N L S L=$L(V) S:$E(V,L-2,L)="_""""" $E(V,L-2,L)="" ; Replace doubled up quotes at end
"RTN","XPDK2V0",213,0)
Q QT_V_QT ; If no control charactrrs, quit with "V"
"RTN","XPDK2V0",214,0)
;
"RTN","XPDK2V0",215,0)
CCC(S) ;test if S Contains a Control Character or $C(255); Public $$
"RTN","XPDK2V0",216,0)
Q:S?.E1C.E 1
"RTN","XPDK2V0",217,0)
Q:$F(S,$C(255)) 1
"RTN","XPDK2V0",218,0)
Q 0
"RTN","XPDK2V0",219,0)
;
"RTN","XPDK2V0",220,0)
RCC(NA) ;Replace control chars in NA with $C( ). Returns encoded string; Public $$
"RTN","XPDK2V0",221,0)
Q:'$$CCC(NA) NA ;No embedded ctrl chars
"RTN","XPDK2V0",222,0)
N OUT S OUT="" ;holds output name
"RTN","XPDK2V0",223,0)
N CC S CC=0 ;count ctrl chars in $C(
"RTN","XPDK2V0",224,0)
N C255 S C255=$C(255) ;$C(255) which Mumps may not classify as a Control
"RTN","XPDK2V0",225,0)
N C ;temp hold each char
"RTN","XPDK2V0",226,0)
N I F I=1:1:$L(NA) S C=$E(NA,I) D ;for each char C in NA
"RTN","XPDK2V0",227,0)
. I C'?1C,C'=C255 D S OUT=OUT_C Q ;not a ctrl char
"RTN","XPDK2V0",228,0)
. . I CC S OUT=OUT_")_""",CC=0 ;close up $C(... if one is open
"RTN","XPDK2V0",229,0)
. I CC D
"RTN","XPDK2V0",230,0)
. . I CC=256 S OUT=OUT_")_$C("_$A(C),CC=0 ;max args in one $C(
"RTN","XPDK2V0",231,0)
. . E S OUT=OUT_","_$A(C) ;add next ctrl char to $C(
"RTN","XPDK2V0",232,0)
. E S OUT=OUT_"""_$C("_$A(C)
"RTN","XPDK2V0",233,0)
. S CC=CC+1
"RTN","XPDK2V0",234,0)
. Q
"RTN","XPDK2V0",235,0)
Q OUT
"RTN","XPDK2V0",236,0)
;
"RTN","XPDK2V0",237,0)
TEST D EN^XTMUNIT($T(+0),1,1) QUIT
"RTN","XPDK2V0",238,0)
T1 ; @TEST subscript substitutions
"RTN","XPDK2V0",239,0)
D CHKEQ^XTMUNIT($$SUBNAME($NA(^DIPT(2332,0)),1,"IEN"),"^DIPT(IEN,0)")
"RTN","XPDK2V0",240,0)
D CHKEQ^XTMUNIT($$SUBNAME($NA(^DIPT("A",123,0)),2,"IEN"),"^DIPT(""A"",IEN,0)")
"RTN","XPDK2V0",241,0)
QUIT
"RTN","XPDK2V0",242,0)
;
"RTN","XPDK2V0",243,0)
RED(X) ; Convenience method for Sam to see things on the screen.
"RTN","XPDK2V0",244,0)
Q $C(27)_"[41;1m"_X_$C(27)_"[0m"
"RTN","XPDK2V0",245,0)
;
"RTN","XPDK2V1")
0^2^B25126356
"RTN","XPDK2V1",1,0)
XPDK2V1 ; VEN/SMH - Analyze KIDS file and extract information ;2014-03-18 11:57 AM
"RTN","XPDK2V1",2,0)
;;8.0;KERNEL;**11310**;Mar 28, 2014;Build 4
"RTN","XPDK2V1",3,0)
; Inspired by the VISTA XML Parser, a State Machine
"RTN","XPDK2V1",4,0)
; Thank you Dr. Douglas Martin (SAIC/DKM)
"RTN","XPDK2V1",5,0)
;
"RTN","XPDK2V1",6,0)
; (C) Sam Habiel 2014, who needs more money than fame (but a rich wife will do!)
"RTN","XPDK2V1",7,0)
; License: Apache 2
"RTN","XPDK2V1",8,0)
;
"RTN","XPDK2V1",9,0)
; Conversion procedure from a VA PM HFS-extracted KIDS (complete):
"RTN","XPDK2V1",10,0)
;^TMP(28177,1,0)="Released TIU*1*241 SEQ #237" <-- $TXT prepended
"RTN","XPDK2V1",11,0)
;^TMP(28177,2,0)="Extracted from mail message" <-- this becomes the txt
"RTN","XPDK2V1",12,0)
;^TMP(28177,3,0)="**KIDS**:TIU*1.0*241^" <-- $END TXT replaced
"RTN","XPDK2V1",13,0)
;^TMP(28177,4,0)="" --> becomes $KID append whatever is in 6
"RTN","XPDK2V1",14,0)
;^TMP(28177,5,0)="**INSTALL NAME**"
"RTN","XPDK2V1",15,0)
;^TMP(28177,6,0)="TIU*1.0*241"
"RTN","XPDK2V1",16,0)
;---
"RTN","XPDK2V1",17,0)
;^TMP(28177,1189,0)="**END**" --> becomes $END KID whatever is in 6
"RTN","XPDK2V1",18,0)
;^TMP(28177,1190,0)="**END**" --> DELETED
"RTN","XPDK2V1",19,0)
;
"RTN","XPDK2V1",20,0)
; A few random notes on various KIDS issues
"RTN","XPDK2V1",21,0)
; If the original is a mail message, it will looks like this
"RTN","XPDK2V1",22,0)
;
"RTN","XPDK2V1",23,0)
; >> Released GMRA*4*44 SEQ #41
"RTN","XPDK2V1",24,0)
; >> Extracted from mail message
"RTN","XPDK2V1",25,0)
; >> **KIDS**:GMRA*4.0*44^
"RTN","XPDK2V1",26,0)
; >>
"RTN","XPDK2V1",27,0)
; >> **INSTALL NAME** etc..
"RTN","XPDK2V1",28,0)
; >> kids contents
"RTN","XPDK2V1",29,0)
; >> **END**
"RTN","XPDK2V1",30,0)
; >> **END**
"RTN","XPDK2V1",31,0)
;
"RTN","XPDK2V1",32,0)
; If the original isn't a PM HFS-extracted KIDS build, but a Straight from
"RTN","XPDK2V1",33,0)
; KIDS KIDS-build, then the KIDS first line looks like this:
"RTN","XPDK2V1",34,0)
;
"RTN","XPDK2V1",35,0)
; >> KIDS Distribution saved on Apr 30, 2013@05:31:47
"RTN","XPDK2V1",36,0)
; >> OR*371
"RTN","XPDK2V1",37,0)
; >> **KIDS**:OR*3.0*371^
"RTN","XPDK2V1",38,0)
; >> <blank line>
"RTN","XPDK2V1",39,0)
; >> **INSTALL NAME**
"RTN","XPDK2V1",40,0)
;
"RTN","XPDK2V1",41,0)
; Multibuilds look like this:
"RTN","XPDK2V1",42,0)
;
"RTN","XPDK2V1",43,0)
; >> KIDS Distribution saved on Sep 23, 2011@17:42:57
"RTN","XPDK2V1",44,0)
; >> IB/PRCA Remedy Ticket Fixes
"RTN","XPDK2V1",45,0)
; >> **KIDS**:IB*2.0*459^PRCA*4.5*280^
"RTN","XPDK2V1",46,0)
; >> <blank line>
"RTN","XPDK2V1",47,0)
; >> **INSTALL NAME**
"RTN","XPDK2V1",48,0)
; >> text of first KIDS build
"RTN","XPDK2V1",49,0)
; >> **INSTALL NAME**
"RTN","XPDK2V1",50,0)
; >> text of second KIDS build
"RTN","XPDK2V1",51,0)
; >> **END**
"RTN","XPDK2V1",52,0)
; >> **END**
"RTN","XPDK2V1",53,0)
;
"RTN","XPDK2V1",54,0)
; A KIDS sent from another system via KIDS/MM has the following contents.
"RTN","XPDK2V1",55,0)
;$TXT Created by TESTMASTER,USER at VEN.SMH101.COM (KIDS) on Thursday, 01/07/14 at 15:55
"RTN","XPDK2V1",56,0)
; <contents>
"RTN","XPDK2V1",57,0)
;$END TXT
"RTN","XPDK2V1",58,0)
;$KID ZZZ*1.0*1
"RTN","XPDK2V1",59,0)
;**INSTALL NAME**
"RTN","XPDK2V1",60,0)
; <contents>
"RTN","XPDK2V1",61,0)
;$END KID ZZZ*1.0*1
"RTN","XPDK2V1",62,0)
;
"RTN","XPDK2V1",63,0)
ANALYZE(RTN,MSGGREF,OPT) ; [PUBLIC] Proc ; Analyze a KIDS file in global MSGGREF. Return in RTN.
"RTN","XPDK2V1",64,0)
; RTN - Global name - use with subscript indirection.
"RTN","XPDK2V1",65,0)
; MSGREG - Global passed by name containing message. Use Sub Ind to get data.
"RTN","XPDK2V1",66,0)
; OPT - Value - Options. Only supported one is "D" - debug. Prints out lines as they are read.
"RTN","XPDK2V1",67,0)
;
"RTN","XPDK2V1",68,0)
N CREF ; Current global reference
"RTN","XPDK2V1",69,0)
N START,STATE,LINE,BUILD
"RTN","XPDK2V1",70,0)
S STATE="BEGIN"
"RTN","XPDK2V1",71,0)
N EOD S EOD=0 ; End of Document
"RTN","XPDK2V1",72,0)
S CREF=MSGGREF ; Current reference for $Q
"RTN","XPDK2V1",73,0)
N QL S QL=$QL(MSGGREF) ; QL of original global for quit next line.
"RTN","XPDK2V1",74,0)
F QUIT:EOD D SEEK() QUIT:EOD D @STATE ; CENTRAL READING LOOP
"RTN","XPDK2V1",75,0)
QUIT
"RTN","XPDK2V1",76,0)
;
"RTN","XPDK2V1",77,0)
; === REST OF EP'S ARE PRIVATE ===
"RTN","XPDK2V1",78,0)
;
"RTN","XPDK2V1",79,0)
SEEK(NOTRIM) ; Get next line
"RTN","XPDK2V1",80,0)
; ZEXCEPT: CREF,EOD,LINE,QL - Newd above
"RTN","XPDK2V1",81,0)
; ZEXCEPT: MSGGREF,OPT - Params
"RTN","XPDK2V1",82,0)
S CREF=$QUERY(@CREF)
"RTN","XPDK2V1",83,0)
I CREF="" S EOD=1 QUIT
"RTN","XPDK2V1",84,0)
I $NA(@CREF,QL)'=$NA(@MSGGREF,QL) S EOD=1 QUIT ; $Q went beyond deep end.
"RTN","XPDK2V1",85,0)
S LINE=@CREF
"RTN","XPDK2V1",86,0)
I '$G(NOTRIM) S LINE=$$TRIM^XLFSTR(LINE,"R") ; Remove the spaces from the right
"RTN","XPDK2V1",87,0)
I $G(OPT)["D" WRITE LINE,! ; Debug mode
"RTN","XPDK2V1",88,0)
QUIT
"RTN","XPDK2V1",89,0)
;
"RTN","XPDK2V1",90,0)
BEGIN ; Begin State
"RTN","XPDK2V1",91,0)
; ZEXCEPT: LINE,STATE
"RTN","XPDK2V1",92,0)
D SEEK() ; Second line; first line already read. Discard both.
"RTN","XPDK2V1",93,0)
S STATE="KIDSSS"
"RTN","XPDK2V1",94,0)
QUIT
"RTN","XPDK2V1",95,0)
;
"RTN","XPDK2V1",96,0)
KIDSSS ; Process **KIDS**
"RTN","XPDK2V1",97,0)
; ZEXCEPT: LINE,STATE,RTN
"RTN","XPDK2V1",98,0)
D ASSERT($E(LINE,1,8)="**KIDS**")
"RTN","XPDK2V1",99,0)
N BUILDS S BUILDS=$P(LINE,"**KIDS**:",2) ; Get the builds (even just one)
"RTN","XPDK2V1",100,0)
N I,BUILD F I=1:1:$L(BUILDS,U) S BUILD=$P(BUILDS,U,I) Q:BUILD="" S @RTN@(BUILD,0)=BUILD ; Put them into an array
"RTN","XPDK2V1",101,0)
D SEEK() ; Get rid of the blank line next.
"RTN","XPDK2V1",102,0)
S STATE="INSTLNM" ; Move to process **INSTALL NAME**
"RTN","XPDK2V1",103,0)
QUIT
"RTN","XPDK2V1",104,0)
;
"RTN","XPDK2V1",105,0)
INSTLNM ; Process **INSTALL NAME**
"RTN","XPDK2V1",106,0)
; ZEXCEPT: LINE,STATE,RTN,BUILD
"RTN","XPDK2V1",107,0)
D ASSERT($E(LINE,1,$L("**INSTALL NAME**"))="**INSTALL NAME**")
"RTN","XPDK2V1",108,0)
N OLDLINE S OLDLINE=LINE ; Just preserve this for convenience
"RTN","XPDK2V1",109,0)
D SEEK() ; Get the install Name
"RTN","XPDK2V1",110,0)
S BUILD=LINE ; Build name. Build var is shared below.
"RTN","XPDK2V1",111,0)
D ASSERT($D(@RTN@(BUILD))) ; Must exist from KIDSSS
"RTN","XPDK2V1",112,0)
S @RTN@(BUILD,1)="$KID "_BUILD ; Build name
"RTN","XPDK2V1",113,0)
S @RTN@(BUILD,2)=OLDLINE ; **INSTALL NAME**
"RTN","XPDK2V1",114,0)
S @RTN@(BUILD,3)=LINE ; Actual build name
"RTN","XPDK2V1",115,0)
S STATE="ZERO" ; Build file zero node
"RTN","XPDK2V1",116,0)
QUIT
"RTN","XPDK2V1",117,0)
;
"RTN","XPDK2V1",118,0)
ZERO ; Process the ZERO node of the Build
"RTN","XPDK2V1",119,0)
; ZEXCEPT: LINE,STATE,RTN,BUILD
"RTN","XPDK2V1",120,0)
D ASSERT(LINE?1"""BLD"","1.N1",0)") ; Must look like "BLD",8190,0)
"RTN","XPDK2V1",121,0)
N NS S NS=$O(@RTN@(BUILD," "),-1)+1 ; Next sub
"RTN","XPDK2V1",122,0)
S @RTN@(BUILD,NS)=LINE ; Load this