Compile Subroutine Table_Info(Table, Process) If Assigned(Table) else Table = "" If Assigned(Process) else Process = "" If Process EQ "" then Process = "ALL" TableInfo = "" MaxLens = "" HeadInfo = "" MaxFMs = "" ColInfo = "" Open Table to handle then Open "DICT.":Table to hDict then GoSub Pull_Dict_Items Done = 0 Counter = 0 Select handle Loop Readnext ID else Done = 1 If Num(Process) then // go this many times If Counter GT Process then Done = 1 end Until Done Read Rec from Handle, ID then NumFms = Count(Rec, @FM) + (Rec NE "") If NumFMs GT MaxFMs then MaxFMs = NumFMs end For FMLoop = 1 to NumFms CurVal = Rec Begin Case Case Index(CurVal, @SVM, 1) If Index(ColInfo, "SVM,", 1) else ColInfo = ColInfo:"SVM," end Case Index(CurVal, @VM, 1) If Index(ColInfo, "VM,", 1) else ColInfo = ColInfo:"VM," end NumVms = Count(CurVal, @VM) + (CurVal NE "") For VMLoop = 1 to NumVMs CurVMVal = CurVal<0, VMLoop> CurLen = Len(CurVMVal) If CurLen GT MaxLens then MaxLens = CurLen end Next VMLoop Case 1 CurLen = Len(CurVal) If CurLen GT MaxLens then MaxLens = CurLen end End Case Next FMLoop Counter += 1 end Repeat end end FinalVar = "" For FMLoop = 1 to MaxFms FinalVar := HeadInfo<1, FMLoop>:@VM:ColInfo:@VM:MaxLens:@FM Next FMLoop Open "SYSLISTS" to hSyslists then Write FinalVar to hSyslists, "TABLE_INFO" else null Call SRP_Editor_Open("Record", "SYSLISTS":@FM:"TABLE_INFO") end Return Pull_Dict_Items: HeadInfo = "" DictList = "" // If Dictlist is Null then make a list of all data dicts. Clearselect Select hDict Done = 0 Loop Readnext DictID else Done = 1 Until Done Read DictRec from hDict, DictID then If DictRec<1> _EQC "F" then If DictRec<2> GT 0 then DictList> = DictID end end end Repeat // Now put the ID in place. * DictList = Insert(DictList, 1, 0, 0, "ID") NumCols = Count(DictList, @FM) + (DictList NE "") For ColLoop = 1 to NumCols CurDictID = DictList VMPos = Field(CurDictID, "*", 2, 1) If VMPos then If VMPos[1, 2] _EQC "VM" then VMPos[1, 2] = "" end CurDictID = Field(CurDictID, "*", 1, 1) Swap " " with "_" in CurDictID Convert @Lower.Case to @Upper.Case in CurDictID end else Swap " " with "_" in CurDictID Convert @Lower.Case to @Upper.Case in CurDictID If CurDictID EQ "ID" then expDictID = "MAIN_ID" end else expDictID = CurDictID end end Read DictRec from hDict, CurDictID else DictRec = "" Begin Case Case DictList EQ "ID" HeadInfo<1, ColLoop> = "ID" HeadInfo<2, ColLoop> = 0 HeadInfo<3, ColLoop> = "" HeadInfo<4, ColLoop> = "" HeadInfo<5, ColLoop> = "" Case DictRec HeadInfo<1, ColLoop> = DictList HeadInfo<2, ColLoop> = DictRec<2> ; * FM HeadInfo<3, ColLoop> = DictRec<7> ; * Oconv HeadInfo<4, ColLoop> = VMPos HeadInfo<5, ColLoop> = "" End Case Next ColLoop return