This is hard for me to wrap my head around. I'm going to think out loud here.
1. I start with a subfile number. e.g. 8989.3211, field .01, stored in 0;1 2. I can find the following heirarchy of files: 8989.3 -> GL = ^XTV(8989.3 8989.332 -> subfile is stored in node "ABPKG" 8989.3321 -> subfile is stored in node 1 8989.33211 -> subfile is stored in node 1 field .01 --> stored in 0;1 3. I need to create a closed format global reference for all possible entries: I put some sample data in and got this: 6) ^XTV(8989.3,1,"ABPKG",0) = ^8989.332P^2^2 7) ^XTV(8989.3,1,"ABPKG",1,0) = 101^3051116 8) ^XTV(8989.3,1,"ABPKG",1,1,0) = ^8989.3321^2^2 9) ^XTV(8989.3,1,"ABPKG",1,1,1,0) = TMG 10) ^XTV(8989.3,1,"ABPKG",1,1,1,1,0) = ^8989.33211A^3^3 11) ^XTV(8989.3,1,"ABPKG",1,1,1,1,1,0) = AAA 12) ^XTV(8989.3,1,"ABPKG",1,1,1,1,2,0) = BBB 13) ^XTV(8989.3,1,"ABPKG",1,1,1,1,3,0) = CCC 14) ^XTV(8989.3,1,"ABPKG",1,1,1,1,"B","AAA",1) = 15) ^XTV(8989.3,1,"ABPKG",1,1,1,1,"B","BBB",2) = 16) ^XTV(8989.3,1,"ABPKG",1,1,1,1,"B","CCC",3) = 17) ^XTV(8989.3,1,"ABPKG",1,1,2,0) = ZXC 18) ^XTV(8989.3,1,"ABPKG",1,1,2,1,0) = ^8989.33211A^2^2 19) ^XTV(8989.3,1,"ABPKG",1,1,2,1,1,0) = SSS 20) ^XTV(8989.3,1,"ABPKG",1,1,2,1,2,0) = DDD 21) ^XTV(8989.3,1,"ABPKG",1,1,2,1,"B","DDD",2) = 22) ^XTV(8989.3,1,"ABPKG",1,1,2,1,"B","SSS",1) = 23) ^XTV(8989.3,1,"ABPKG",1,1,"B","TMG",1) = 24) ^XTV(8989.3,1,"ABPKG",1,1,"B","ZXC",2) = 25) ^XTV(8989.3,1,"ABPKG",2,0) = 33^3051116 25) ^XTV(8989.3,1,"ABPKG",2,0) = 33^3051116 26) ^XTV(8989.3,1,"ABPKG",2,1,0) = ^8989.3321^2^2 27) ^XTV(8989.3,1,"ABPKG",2,1,1,0) = TMG 28) ^XTV(8989.3,1,"ABPKG",2,1,1,1,0) = ^8989.33211A^2^2 29) ^XTV(8989.3,1,"ABPKG",2,1,1,1,1,0) = EEE 30) ^XTV(8989.3,1,"ABPKG",2,1,1,1,2,0) = III 31) ^XTV(8989.3,1,"ABPKG",2,1,1,1,"B","EEE",1) = 32) ^XTV(8989.3,1,"ABPKG",2,1,1,1,"B","III",2) = 33) ^XTV(8989.3,1,"ABPKG",2,1,2,0) = WER 34) ^XTV(8989.3,1,"ABPKG",2,1,2,1,0) = ^8989.33211A^2^2 35) ^XTV(8989.3,1,"ABPKG",2,1,2,1,1,0) = RRR 36) ^XTV(8989.3,1,"ABPKG",2,1,2,1,2,0) = EEE 37) ^XTV(8989.3,1,"ABPKG",2,1,2,1,"B","EEE",2) = 38) ^XTV(8989.3,1,"ABPKG",2,1,2,1,"B","RRR",1) = 39) ^XTV(8989.3,1,"ABPKG",2,1,"B","TMG",1) = 40) ^XTV(8989.3,1,"ABPKG",2,1,"B","WER",2) = To disect one of the lines above 36) ^XTV(8989.3,1 <-- IEN in file 8989.3 36) ^XTV(8989.3,1,"ABPKG" <--- storage node for file 8989.332 36) ^XTV(8989.3,1,"ABPKG",2 <--- IEN in file 8989.332 36) ^XTV(8989.3,1,"ABPKG",2,1 <--- storage node for file 8989.3321 36) ^XTV(8989.3,1,"ABPKG",2,1,2 <--- IEN in file 8989.3321 36) ^XTV(8989.3,1,"ABPKG",2,1,2,1 <--- storage node for file 8989.33211 36) ^XTV(8989.3,1,"ABPKG",2,1,2,1,2 <--- IEN in file 8989.33211 36) ^XTV(8989.3,1,"ABPKG",2,1,2,1,2,0 <--- storage node for field .01 36) ^XTV(8989.3,1,"ABPKG",2,1,2,1,2,0) = EEE ^XTV(8989.3, IEN1,Node1, IEN2,Node2, IEN3,Node3, IEN4,Node4), or ^XTV(8989.3, 1,"ABPKG", 2,1, 2,1, 2,0 ) = EEE CONCLUSION: <Global Ref>,IEN1,Node1,IEN2,Node2,IEN3,Node3,IEN4,Node4), I need to break away here. But I need to come up with a recursive function that will be able to construct this complete reference from left to right. I will have to pass each child iteration the reference so far, as well as the information needed to construct the subscript nodes. Then, this iterative process will need to be able to cycle through all the possibilities. I think this is a basic problem. But I need to rest my brain before I can code it. Reiterative stuff can be a headache! Thanks for reading/listening. Any input is always appreciated. Kevin On 11/16/05, Greg Woodhouse <[EMAIL PROTECTED]> wrote: > To do this, I wrote a simple program to recursively walk the file(s) passing > the global root as an optional third parameter to subfiles (leaving it null > for true files). The code itself was actually quite compact. > > Kevin Toppenberg <[EMAIL PROTECTED]> wrote: > Next I need to work on pointers in > subfiles. I will have to stand on my head a bit to sequentially get > all of them.... > > Thanks > Kevin > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members