Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== QTIPS - Updating Multiple Dictionaries With A Single Command===== ^Published By^Date^Version^Knowledge Level^Keywords^ |Sprezzatura Ltd|01 AUG 1992|2.12+|EXPERT|DICT, SYSCOLUMNS, DICTCOMPILE, EDIT_SOFTKEYS| Jim Poe of Adobe Mountain Systems Inc writes as follows - "If you are updating a system and need to update more than one dictionary, you can accomplish all the updates in one copy command by using the SYSCOLUMNS file as the destination file. As an example <code> Updating file DICT.CUSTOMERS, field NAME Updating file DICT.INVOICES, field INVOICE_DATE Use this command: COPY UPDATE_FILE CUSTOMERS*NAME INVOICES*INVOICE_DATE TO:(SYSCOLUMNS </code> One caveat - SYSCOLUMNS will translate FILE_NAME to FILE.NAME if appropriate, but will not translate FIELD_NAME to FIELD.NAME." He then expands on this by saying "When updating an include record such as an equate list that is used in multiple table dictionaries you can do the following: <code> SELECT SYSCOLUMNS IF FORMULA [] "$Insert Bp,Dict_Equates" DICTCOMPILE SYSCOLUMNS </code> Then finally to ensure that he has really earned his sweatshirt he comments "The following code is useful when called from the editor softkeys. It allows you to retrieve a formula from a dictionary item or a record from a source file and have it inserted in the current formula or record that you are editing" <code> Subroutine Insert_Source(Param) @Pseudo = "" * Use existing system window to get file and record(s) to merge Call Catalyst("W", "@COMMANDS@ EDIT.ANOTHER") If Len(@Pseudo<1>) Then File = @Pseudo<1> Record = @Pseudo<2> If File[1,4] = "DICT" Then Record = Xlate(File,Record, 8, "X") Convert @Fm To @Vm In Record End Else Record = Xlate(File, Record, "", "X") End /* Now put the information into @Cur.Buf and reset Cur.Buf<1> to point to it. Use 6 as this is beyond where Cut/Paste normally operates */ @Cur.Buf<1> = 6 @Cur.Buf<7> = Record @Data = @Edit.Keys<10> ; * ^F4 - paste End Return </code> Simply catalog the above program then add it as a softkey using the CW EDIT_SOFTKEYS command as documented in the 2.12 upgrade information. (Volume 4, Issue 4, Pages 4,5) tips/revmedia/v4i4a2.txt Last modified: 2024/06/19 20:20by 127.0.0.1