exec/importcfg.js
is a utility script that will import configurations of items configured in SCFG (e.g. message areas, files areas, external program configurations) that have been exported using Export Configuration
NOTE: importcfg can only import files that have been exported with exportcfg using the –json option
importcfg.js
may be invoked via JSexec (e.g. from an OS command prompt) or load()ed
from another JavaScript module.
The command-line syntax (or load
arguments) are detailed here:
usage: importcfg.js [-overwrite] [-debug] <cfg-type> <filename> cfg-types (choose one): msg-grps msg-subs file-libs file-dirs file-prots file-extrs file-comps file-viewers file-testers file-dlevents text-secs xtrn-secs xtrn-progs xtrn-events xtrn-editors
For most types, the data will be imported with the same internal ids as was exported. For external sections and programs, special logic exists to match up based on the section or external code, which allows importing external programs from other systems.
jsexec exportcfg xtrn-secs -json >secs.json jsexec exportcfg xtrn-progs -json >progs.json
jsexec importcfg xtrn-secs <secs.json jsexec importcfg xtrn-progs <progs.json