MapPrep Utility
The MapPrep utility helps you to prepare a new repository structure for use with CodeGen's structure mapping capabilities. The you specify the name of an existing structure and the utility exports a repository schema for that structure, then post-processes the schema appending _MAPPED to the name of the structure, and adding all of the required structure to structure and field to field mapping relationships. The schema for the new mapped structure can then be loaded into the repository.
The -p command line option causes MapPrep to prompt you to enter new names for the structure and all fields. You can type ENTER to accept a default new structure name, or to keep the existing name for any field. This can save a lot of time as one of the primary reasons for using structure mapping is to allow you to generate code with more meaningful field names when the actual field names in the original structure are cryptic or un-descriptive.
For additional information refer to Structure Mapping.
Command Line Options
MapPrep -s structure [...] | * [-n newstr] [-p[s|f]] [-u] [-k] [-v] [-h]
-s structure [...] | * Structure(s) to process, * to process all
-n newstr
Name of new mapped structure (only when processing a single structure)
-p Prompt for alternate structure and field names
-ps Prompt for alternate structure name only
-pf Prompt for alternate field names only
-u Add mapping data to the user defined text field instead of the long description field.
-l Load new schemas directly into repository
-ls Leave schema file after repository load
-k Retain key definitions in mapped structure
-v Verbose messages.
-h Display this help / usage information
Examples of Use
MapPrep -s CUSMAS
The command above will export a repository schema for the existing structure CUSMAS, and will then create a new schema file called CUSMAS_MAPPED.SCH that describes a new structure called CUSMAS_MAPPED which contains the fields from the original CUSMAS structure, except any fields that were marked "excluded by language". The new schema file will contain special mapping codes from the new structure to the original structure, and from the remaining fields to the corresponding fields in the original structure. These data mapping codes will be added to a new blank line in the structure and fields long descriptions.
MapPrep -s CUSMAS -p
The command above will behave similar to the command described above, except that you will be prompted to enter new names for the mapped structure and its fields. The name of the schema file that is created will also be based on the structure name that you enter.
MapPrep -s CUSMAS -n CUSTOMER -pf
The command above will behave similar to the command described above, except that the name for the new structure (and schema file) have been provided on the command line. You will still be prompted to enter new names for all of the new structures fields.
Copyright © 2012 Synergex International, Inc.