* XFORMDBF.H - include file for generic DBF transformer * By M. Asherman, Copyright (c) 1999 - 2001, SpaceTime Systems * 6/22/99: introduced to minimize hard-wired arbitrary constants. * 6/22/99: added macros XFDB_ALOUT, XFDB_ALINP. * 6/26/99: added macro XFDB_NCOLS and macros for column #s in the mapping array. * 6/27/99: XFDB_NCOLS should be 6, not 7. * 6/28/99: introducing Action codes for new first arg to xformdbf(), plus XFDB_APPNM. * 9/19/99: add new XFDB_ACRUC ('RunC') action. * 11/27/99: add macros for error codes and messages. * 11/28/99: more macros for error codes and messages. * 11/29/99: add XFDB_CLIBQ for more convenient usage with newobject(). * Also add more macros for error codes and messages. * 12/02/99: more macros for error codes and messages. * Separated RUN from RUN1 error macros. * 12/03/99: more macros for error codes and messages. * 1/5/00: more macros for error codes and messages related to optimization. * 1/6/00: change XFDB_ALOUT from 'xformout' to 'y', XFDB_ALINP from 'xforminp' to 'x', * to reduce optimized REPL command line length. * 1/12/00: introduce additional macros for error codes and msgs used in xfom_buildrepl. * 3/17/00: introduce macros for error codes and msgs used in xfom_validmapping. * 3/18/00: more macros for error codes and msgs used in xfom_validmapping. * 3/24/00: macros for error codes and msgs used in Activate. * 4/2/00: new XFDB_LOOKUP_DFLT and XFDB_LOOKUP_MVAR for Lookup command line defaults. * Also added Lookup-related error code and message. * 6/24/00: add codes for use by the new XFormDBF.XFOM_ShowOutFld method (xfma0052). * 1/27/01: substitute saver2.h for saver.h (xfma0072). * 1/29/01: eliminate obsolete macros XFDB_FUNCD, XFDB_CMDMV, XFDB_METAD, XFDB_APPNM, * XFDB_CLIB, and XFDB_CLIBQ, plus obsolete error code/msg macros (xfma0072). * Revise error numbering to group by method. * 1/30/01: add macro for the new PromptNX action code. * 2/4/01: revise macros related to help file errors and adjust numbering for consistency. #include SAVER2.H && generic Saver macros (Version 2) * macros for xformdbf Action codes #define XFDB_ACPRM 'prompt' && prompt the user with modal dialog form (default) #define XFDB_ACPRN 'promptn' && prompt the user with modeless dialog form #define XFDB_ACPRNX 'promptnx' && same as PromptN + READ EVENTS #define XFDB_ACRUN 'run' && Run a transformation non-interactively #define XFDB_ACRUC 'runc' && Clone output template and Run non-interactively * macros used in form XFORMDBF.scx #define XFDB_ALINP 'x' && reserved alias for input file #define XFDB_ALOUT 'y' && reserved alias for output file #define XFDB_LOOKUP_DFLT '' && absolute default Lookup button command line #define XFDB_LOOKUP_MVAR 'm.xfor_lkup' && global mvar name for default Lookup command line * Changes to the following must also be accompanied by adjustment to method xfom_run1 * in order to support the specified number of REPLACE command line continuations. * Presumably there is some extra cost, and ultimately a hard limit to how high * we can set this, so use a value large enough but not way too large for anticipated * usage requirements. (This only applies to the old un-optimized mode of running.) #define XFDB_MAXREPLINES 30 && max number of m.repline mvars supported * macros for referring to column #s in the mapping array #define XFDB_NCOLS 6 && # columns in the mapping array #define XFDB_CNFNM 1 && field name column # #define XFDB_CNSEQ 2 && Seq # column # #define XFDB_CNTYP 3 && field type column # #define XFDB_CNWID 4 && field width column # #define XFDB_CNDEC 5 && field decimals column # #define XFDB_CNEXP 6 && mapping expression column # * macros for error codes and messages used in form XFORMDBF.scx #define XFDB_EC_INIT_ACTION 1 && error code #define XFDB_EM_INIT_ACTION "Unsupported Action. 1st arg must be: " + chr(13) + proper(XFDB_ACPRM) + ' (the default), ' + proper(XFDB_ACPRN) + ' (modeless), ' + proper(XFDB_ACRUN) + ' (non-interactive), or ' + proper(XFDB_ACRUC) + ' (clone & run)' #define XFDB_EC_INIT_INFILE 4 && error code #define XFDB_EM_INIT_INFILE "4th argument must be empty or a character-type input filename." #define XFDB_EC_INIT_OUTFILE 5 && error code #define XFDB_EM_INIT_OUTFILE "5th argument must be empty or a character-type output filename." #define XFDB_EC_INIT_NOINP 6 && error code #define XFDB_EM_INIT_NOINP "Input table is missing: " #define XFDB_EC_INIT_NOHELP 7 && error code #define XFDB_EM_INIT_NOHELP "Application Help will be disabled. Can't open help file: " #define XFDB_EC_DEST_NOCLEAN 11 && error code #define XFDB_EM_DEST_NOCLEAN "Cleanup expression on form destruction failed: " #define XFDB_EC_OPIN_NOCLEAN 21 && error code #define XFDB_EM_OPIN_NOCLEAN "Cleanup expression on re-opening input file failed: " #define XFDB_EC_OPIN_NOINIT 22 && error code #define XFDB_EM_OPIN_NOINIT "Input initialization expression failed: " #define XFDB_EC_OPIN_NOUSE 23 && error code #define XFDB_EM_OPIN_NOUSE "Unable to open input file: " #define XFDB_EC_CLON_NOTMPL 31 && error code #define XFDB_EM_CLON_NOTMPL "Can't clone because no template file is specified for this config." #define XFDB_EC_CLON_NOTFOUND 32 && error code #define XFDB_EM_CLON_NOTFOUND "Template file to clone not found: " #define XFDB_EC_CLON_NOUSE 33 && error code #define XFDB_EM_CLON_NOUSE "Unable to open template file: " #define XFDB_EC_CLON_NOCOPY 34 && error code #define XFDB_EM_CLON_NOCOPY "Failed to copy template to output file: " #define XFDB_EC_RUN_NOTOPEN 41 && error code #define XFDB_EM_RUN_NOTOPEN "Input and Output files must be opened in order to run." #define XFDB_EC_RUN_MAXREPLINES 42 && error code #define XFDB_EM_RUN_MAXREPLINES "Too many REPLACE command continuation lines for optimized mode." #define XFDB_EC_RUN_ESC 43 && error code #define XFDB_EM_RUN_ESC "Run terminated by user Escape." #define XFDB_EC_RUN1_APPEND 51 && error code #define XFDB_EM_RUN1_APPEND "Failed on attempt to append to output." #define XFDB_EC_RUN1_EVAL 52 && error code #define XFDB_EM_RUN1_EVAL "Unable to evaluate expression for output field: " #define XFDB_EC_RUN1_REPLREC 53 && error code #define XFDB_EM_RUN1_REPLREC "Unable to replace fields in output record" #define XFDB_EC_RUN1_REPLFIELD 54 && error code #define XFDB_EM_RUN1_REPLFIELD "Unable to replace output field: " #define XFDB_EC_OPOUT_NOUSE 61 && error code #define XFDB_EM_OPOUT_NOUSE "Unable to open output file: " #define XFDB_EC_ZAP_NOTOPEN 71 && error code #define XFDB_EM_ZAP_NOTOPEN "Output file is not open." #define XFDB_EC_ZAP_NOZAP 72 && error code #define XFDB_EM_ZAP_NOZAP "Unable to ZAP output table: " #define XFDB_EC_TEST_NOTOPEN 81 && error code #define XFDB_EM_TEST_NOTOPEN XFDB_EM_RUN_NOTOPEN #define XFDB_EC_TEST_EOF 82 && error code #define XFDB_EM_TEST_EOF "No current Input record." #define XFDB_EC_STRUC_NOMODI 91 && error code #define XFDB_EM_STRUC_NOMODI "Failed to MODIFY STRUCTURE of output table: " #define XFDB_EC_STRUC_NOCREATE 92 && error code #define XFDB_EM_STRUC_NOCREATE "Failed to CREATE output table: " #define XFDB_EC_BUILD_STRTOFILE 101 && error code #define XFDB_EM_BUILD_STRTOFILE "Unable to generate source file: " #define XFDB_EC_BUILD_COMPILE 102 && error code #define XFDB_EM_BUILD_COMPILE "Compilation failed. See error info in: " #define XFDB_EC_BUILD_UNKNOWN 103 && error code #define XFDB_EM_BUILD_UNKNOWN "Unexpected error code from bldprg(): " #define XFDB_EC_VALMAP_NOEVAL 111 && error code #define XFDB_EM_VALMAP_NOEVAL "Mapping expression can not be evaluated." #define XFDB_EC_VALMAP_TYPE 112 && error code #define XFDB_EM_VALMAP_TYPE "Mapping expression is incompatible with field type." #define XFDB_EC_ACT_NOHELP 121 && error code #define XFDB_EM_ACT_NOHELP "Application Help will be disabled. Can't open help file: " #define XFDB_EC_LOOKUP 131 && error code #define XFDB_EM_LOOKUP "Can't execute the Lookup command line: " #define XFDB_EC_SHOW_EVAL 141 && error code #define XFDB_EM_SHOW_EVAL "Unable to evaluate expression for output field: "