|
|||||||
QTIPS - Updating Multiple Dictionaries With A Single CommandJim 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 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 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: SELECT SYSCOLUMNS IF FORMULA [] "$Insert Bp,Dict_Equates" DICTCOMPILE SYSCOLUMNS 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" 0001 Subroutine Insert_Source(Param) 0002 @Pseudo = "" 0003 * Use existing system window to get file and record(s) to merge 0004 Call Catalyst("W", "@COMMANDS@ EDIT.ANOTHER") 0005 If Len(@Pseudo<1>) Then 0006 File = @Pseudo<1> 0007 Record = @Pseudo<2> 0008 If File[1,4] = "DICT" Then 0009 Record = Xlate(File,Record, 8, "X") 0010 Convert @Fm To @Vm In Record 0011 End Else 0012 Record = Xlate(File, Record, "", "X") 0013 End 0014 /* 0015 Now put the information into @Cur.Buf and reset Cur.Buf<1> to 0016 point to it. Use 6 as this is beyond where Cut/Paste normally 0017 operates 0018 */ 0019 @Cur.Buf<1> = 6 0020 @Cur.Buf<7> = Record 0021 @Data = @Edit.Keys<10> ; * ^F4 - paste 0022 End 0023 Return 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) |
|||||||
| |||||||