Sample DBGenFormat Parameter File
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% A Series DATABridge Format Generator Control File %
% %
% Source: DATA/GENFORMAT/SAMPLE/CONTROL %
% %
% Version: 6.1 %
%
% Copyright (C) 1995-2011 by Attachmate Corporation %
% All Rights reserved %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is the input to the DATABridge Format Generator program.
%
% (Upper/lower case is not significant.)
%
% This file has these main sections:
% Alterations
% Virtuals
% Primary keys
% Reformat
% Translations
% Transforms
% Formats
% Filters
% Error Manager
% Startup
% Shutdown
% Alterations and Virtuals must precede the other sections.
% Translations, Transforms, Formats, and Filters can be intermixed with
% each other but cannot precede any Primary keys.
%
% When processing an update, the sequence is:
%
% 1. Apply the row filter (the FILTER's WHERE ... condition) and stop
% processing if the condition is false.
%
% 2. Call the TRANSFORM.
%
% 3. The TRANSFORM calls the FORMAT zero or more times for real and/or
% VIRTUAL records.
%
% 4. The FORMAT steps through the list of data items of the column
% filter (the FILTER's SELECT ...).
%
% 5. For each data item, if the data item is ALTERed, call the REFORMAT
% routine, otherwise format it according to its data type. If it
% is an ALPHA item, use the TRANSLATION table, if any. The
% reformatted values for ALTERed items are placed at the end of
% the record and formatted according to their data type just like
% unaltered items.
%
%
% Lines below beginning with %* indicate example declarations that you
% can uncomment and use immediately if you are compiling a tailored
% Support Library for the sample database, BANKDB.
%
%======================================================================
% Alterations
% (Data item reformatting)
% ========================
%
% In this section, list any data items that require transformation.
% When the formatting routines encounter a data item in the list, they
% will call the REFORMAT routine, which is either a procedure in the
% Support Library (see PATCH/DATABRIDGE/SAMPLE/SUPPORT/REFORMAT) or an
% entry point in a library (see SYMBOL/DATABRIDGE/SAMPLE/REFORMAT),
% before performing normal formatting. (The "Reformat" section below
% specifies where the REFORMAT routine resides.)
%
% For example, if dates are stored in a non-standard layout, the
% formatting routines could call REFORMAT to reformat the dates into
% a standard layout.
%
% The formatting routines will pass the number in brackets for the data
% item to REFORMAT, which can use the value to determine the type of
% formatting required.
%
% ALTER <dataset>
% (
% [<uservalue1>]
% <original dataname1> <new DASDL definition>
%
% [<uservalue2>]
% <original dataname2> <new DASDL definition>
%
% [REDEFINE]
% <original dataname3> <new DASDL definition>
%
% [DEFINE <uservalue3>]
% <new dataname4> <new DASDL definition>
%
% ...
% );
%
%
% Note that the numbers do not have to be unique. In fact, all data
% items of a particular type, e.g. days-since-1900, would probably have
% the same value since a single routine could convert any of them.
%
% Example:
%* ALTER BRANCH
%* (
%* [1] TS ALPHA (30); % was REAL
%* [2] BRANCH-ID NUMBER (6); % was NUMBER (4)
%* [3] BRANCH-AD1 GROUP % was ALPHA (40)
%* (
%* BR-ADD1 ALPHA (30);
%* BR-ADD2 ALPHA (30);
%* BR-CITY ALPHA (20);
%* BR-REGION ALPHA (15);
%* );
%* );
%*
%* ALTER BANK
%* (
%* [REDEFINE] BANK-ADDR3 GROUP % was ALPHA (30)
%* (
%* BR-CITY ALPHA (18);
%* BR-STATE ALPHA (2);
%* BR-ZIP ALPHA (10);
%* );
%* [DEFINE 6] BANK-PRES ALPHA (40); % new item
%* [DEFINE 7] BANK-PHONE ALPHA (12); % new item
%* );
%*
%* ALTER HISTORY
%* ( % was:
%* [REDEFINE] TRAN-DATE NUMBER (YYMMDD); % NUMBER (6)
%* [REDEFINE] TRAN-TIME NUMBER (HHMMSS); % NUMBER (6)
%* [REDEFINE] PROC-DATE NUMBER (YYMMDD); % NUMBER (6)
%* [REDEFINE] TS TIME_6; % REAL
%* );
%*
%*
%* ALTER EMPLOYEES
%* (
%* % Alter multiple adjacent data items as a single item.
%*
%* [REDEFINE] EMP-LAST-NAME,
%* EMP-FIRST-NAME
%* AS EMP-PERSONAL ALPHA (32);
%* );
%
% alterations go here ...
%======================================================================
% Virtuals
% (Virtual datasets)
% ==================
%
% These datasets will appear as normal datasets to Accessories
% but do not actually exist in the DMSII database. Special
% Transforms must "create" records in them.
%
% VIRTUAL <datasetname> # <strnum> POPULATION <est. recs.>
% DERIVED FROM <datasetlist>
% (
% <dataitems>
% );
%
% Example:
%
%* VIRTUAL ADDRESS #79 POPULATION 100000
%*
%* DERIVED FROM BANK, CUSTOMER
%*
%* (ADDR-BANK-ID NUMBER (4);
%* ADDR-CUST-ID NUMBER (8);
%* ADDR-LINE-NBR NUMBER (1);
%* ADDR-LINE ALPHA (30);
%* );
%
%
% The POPULATION clause is optional but strongly recommended. The
% default value is 1000000.
%
% The DERIVED FROM clause causes GenFormat to generate defines
% and variables that the transform can use to build virtual
% records. We recommend that you use the sample transform
% PATCH/DATABRIDGE/SAMPLE/SUPPORT/VIRTUAL
% as a starting point for writing the transform.
% virtuals go here ...
%======================================================================
% Primary Keys
% ============
%
% The PRIMARY KEY declarations below provide DATABridge with a unique
% key for the designated datasets. This is useful for datasets that do
% not have a NO DUPLICATES set declared (but *could* have one declared).
%
% Syntax:
%
% PRIMARY KEY OF <dataset> IS ( <key items> )
%
% (The keywords PRIMARY, OF, and IS are optional.)
%
% Examples:
%
%* Primary Key of CUSTOMER is (CUST-ID)
%*
%* Key ADDRESS (ADDR-BANK-ID, ADDR-CUST-ID, ADDR-LINE-NBR);
%
% DATABridge will *not* confirm that the specified key is unique.
%
% Primary Key declarations go here ...
%
%
%======================================================================
% Reformat
% ========
%
% This section specifies the location of the REFORMAT routine
% that will convert any ALTERed data items.
%
% An INTERNAL REFORMAT specifies a patchfile containing a REFORMAT
% routine that converts ALTERed data items. This patchfile will be
% compiled into the Support Library and called directly from the
% formatting routines. The patchfile can contain "global" as
% variables needed. This method makes the DBInterface definitions and
% Engine entry points available to the REFORMAT routine without
% having to declare them ($ INCLUDE "SYMBOL/DATABRIDGE/INTERFACE)
% or explicitly linking to DBEngine. The patchfile should not
% include an EXPORT declaration.
%
% Syntax:
% INTERNAL REFORMAT IN "<patchfiletitle>"
%
% Example:
%* INTERNAL REFORMAT
%* IN "PATCH/DATABRIDGE/SAMPLE/SUPPORT/REFORMAT"
%
% An EXTERNAL REFORMAT indicates that the REFORMAT routine
% resides in a separate library program, where it is declared as
% an entry point and EXPORTed. In this method, the REFORMAT
% routine must have $ SET INCLUDE_ENGINE (and INCLUDE_SUPPORT if
% needed) as well as $ INCLUDE "SYMBOL/DATABRIDGE/INTERFACE".
% The Support Library will ensure that the external REFORMAT
% library is linked to the same instance of DBEngine as the
% Accessory and Support.
%
% Syntax:
% EXTERNAL REFORMAT IN "<librarytitle>"
%
% Example:
% EXTERNAL REFORMAT IN "OBJECT/DATABRIDGE/REFORMAT"
%
% You can specify only one REFORMAT declaration.
%
% The default is
% EXTERNAL REFORMAT IN "OBJECT/DATABRIDGE/REFORMAT".
%
% The recommended method is to use INTERNAL REFORMAT ....
%
%
%======================================================================
% Translations
% ============
%
% The formatting routines use these translation tables to translate
% individual EBCDIC characters in text (ALPHA) data items. The
% format (declared below) specifies which table to use.
%
% Syntax:
% TRANSLATION tablename
% sourcevalue -> destinationvalue
% ...
%
% sourcevalue and destinationvalue can be the decimal value of
% a character, or the hexadecimal value of a character, or a
% quoted character. The following are equivalent.
% 193 -> 194
% 0xC1 -> 194
% "A" -> 194
% 193 -> 0xC2
% 0xC1 -> 0xC2
% "A" -> 0xC2
% 193 -> "B"
% 0xC1 -> "B"
% "A" -> "B"
%
% You can comment out each of the TRANSLATION tables declared below
% unless you have a FORMAT that explicitly references it.
%======================================================================
Translation CRToLF % Convert Carriage Return to Line Feed
037 -> 013 % cr -> lf
Translation UnitedKingdom % United Kingdom
123 -> 068 % # -> ú
Translation Denmark % Denmark
161 -> 087 % ~ -> »
124 -> 138 % @ -> -
090 -> 139 % ] -> +
074 -> 140 % [ -> ¦
224 -> 176 % \ -> +
095 -> 180 % ^ -> _
121 -> 188 % ` -> S
208 -> 189 % } -> s
192 -> 190 % { -> µ
106 -> 238 % | -> °
161 -> 252 % ~ -> n
Translation Finland % Finland
091 -> 069 % $ -> ñ
074 -> 138 % [ -> -
090 -> 139 % ] -> +
124 -> 143 % @ -> +
224 -> 174 % \ -> +
095 -> 180 % ^ -> _
192 -> 188 % { -> S
208 -> 189 % } -> s
121 -> 203 % ` -> T
106 -> 236 % | -> ÷
161 -> 252 % ~ -> n
Translation France % France
123 -> 068 % # -> ú
090 -> 072 % ] -> º
161 -> 073 % ~ -> ¿
074 -> 088 % [ -> ¦
124 -> 184 % @ -> a
224 -> 191 % \ -> t
208 -> 202 % } -> F
192 -> 203 % { -> T
106 -> 239 % | -> ·
Translation Germany % Germany
036 -> 192 % ? -> {
124 -> 072 % @ -> º
074 -> 138 % [ -> -
224 -> 174 % \ -> +
090 -> 180 % ] -> _
161 -> 183 % ~ -> ¯
192 -> 188 % { -> S
106 -> 236 % | -> ÷
208 -> 252 % } -> n
Translation Italy % Italy
224 -> 123 % \ -> #
123 -> 068 % # -> ú
124 -> 072 % @ -> º
074 -> 088 % [ -> ¦
192 -> 184 % { -> a
224 -> 191 % \ -> t
208 -> 202 % } -> F
090 -> 203 % ] -> T
161 -> 206 % ~ -> 8
106 -> 222 % | -> =
121 -> 239 % ` -> ·
Translation Norway % Norway
238 -> 106 % ° -> |
252 -> 161 % n -> ~
161 -> 087 % ~ -> »
124 -> 138 % @ -> -
090 -> 139 % ] -> +
074 -> 140 % [ -> ¦
224 -> 176 % \ -> +
095 -> 180 % ^ -> _
121 -> 188 % ` -> S
208 -> 189 % } -> s
192 -> 190 % { -> µ
106 -> 238 % | -> °
161 -> 252 % ~ -> n
Translation Spain % Spain
074 -> 066 % [ -> í
123 -> 068 % # -> ú
124 -> 072 % @ -> º
192 -> 088 % { -> ¦
090 -> 117 % ] -> +
224 -> 160 % \ -> -
208 -> 191 % } -> t
106 -> 221 % | -> ±
Translation Sweden % Sweden
091 -> 069 % $ -> ñ
074 -> 138 % [ -> -
090 -> 139 % ] -> +
124 -> 143 % @ -> +
224 -> 174 % \ -> +
095 -> 180 % ^ -> _
192 -> 188 % { -> S
208 -> 189 % } -> s
121 -> 203 % ` -> T
106 -> 236 % | -> ÷
161 -> 252 % ~ -> n
Translation SwissFrench % SwissFrench
123 -> 068 % # -> ú
090 -> 072 % ] -> º
161 -> 073 % ~ -> ¿
074 -> 088 % [ -> ¦
124 -> 184 % @ -> a
224 -> 191 % \ -> t
208 -> 202 % } -> F
192 -> 203 % { -> T
106 -> 239 % | -> ·
Translation SwissGerman % SwissGerman
124 -> 072 % @ -> º
074 -> 138 % [ -> -
224 -> 174 % \ -> +
090 -> 180 % ] -> _
161 -> 183 % ~ -> ¯
192 -> 188 % { -> S
106 -> 236 % | -> ÷
208 -> 252 % } -> n
Translation DenmarkEBCDIC % Denmark EBCDIC
124 -> 183 % @ -> ¯
066 -> 252 % í -> n
065 -> 250 % á -> ·
224 -> 251 % \ -> v
095 -> 187 % ^ -> p
121 -> 100 % ` -> ¦
208 -> 235 % } -> )
192 -> 225 % { -> ƒ
079 -> 234 % ! -> (
161 -> 115 % ~ -> +
Translation FinlandEBCDIC % Finland EBCDIC
091 -> 070 % $ -> Ñ
065 -> 183 % á -> ¯
066 -> 252 % í -> n
124 -> 204 % @ -> O
224 -> 186 % \ -> G
095 -> 187 % ^ -> p
192 -> 100 % { -> ¦
208 -> 235 % } -> )
121 -> 105 % ` -> ¦
079 -> 120 % ! -> -
161 -> 115 % ~ -> +
Translation FranceEBCDIC % France EBCDIC
123 -> 067 % # -> ó
066 -> 072 % í -> º
161 -> 127 % ~ -> "
065 -> 081 % á -> ¬
124 -> 103 % @ -> +
224 -> 236 % \ -> ÷
208 -> 104 % } -> +
192 -> 105 % { -> ¦
079 -> 099 % ! -> ¦
Translation ItalyEBCDIC % Italy EBCDIC
123 -> 067 % # -> ó
124 -> 072 % @ -> º
065 -> 081 % á -> ¬
192 -> 103 % { -> +
224 -> 236 % \ -> ÷
208 -> 104 % } -> +
066 -> 105 % í -> ¦
161 -> 089 % ~ -> ¦
079 -> 098 % ! -> ¦
121 -> 099 % ` -> ¦
Translation NorwayEBCDIC % Norway EBCDIC
234 -> 079 % ( -> !
115 -> 161 % + -> ~
124 -> 183 % @ -> ¯
066 -> 252 % í -> n
065 -> 250 % á -> ·
224 -> 251 % \ -> v
095 -> 187 % ^ -> p
121 -> 100 % ` -> ¦
208 -> 235 % } -> )
192 -> 225 % { -> ƒ
079 -> 234 % ! -> (
161 -> 115 % ~ -> +
Translation SwissFrenchEBCDIC % Swiss French EBCDIC
123 -> 067 % # -> ó
066 -> 072 % í -> º
161 -> 127 % ~ -> "
065 -> 081 % á -> ¬
124 -> 103 % @ -> +
224 -> 236 % \ -> ÷
208 -> 104 % } -> +
192 -> 105 % { -> ¦
079 -> 099 % ! -> ¦
Translation SwissGermanEBCDIC % Swiss German EBCDIC
124 -> 072 % @ -> º
065 -> 183 % á -> ¯
224 -> 186 % \ -> G
066 -> 187 % í -> p
161 -> 071 % ~ -> ª
192 -> 100 % { -> ¦
079 -> 120 % ! -> -
208 -> 115 % } -> +
Translation SpainEBCDIC % Spain EBCDIC
065 -> 137 % á -> i
123 -> 067 % # -> ó
124 -> 072 % @ -> º
192 -> 081 % { -> ¬
066 -> 111 % í -> ?
079 -> 220 % ! -> =
208 -> 236 % } -> ÷
224 -> 157 % \ -> +
Translation SwedenEBCDIC % Sweden EBCDIC
091 -> 070 % $ -> Ñ
065 -> 183 % á -> ¯
066 -> 252 % í -> n
124 -> 204 % @ -> O
224 -> 186 % \ -> G
095 -> 187 % ^ -> p
192 -> 100 % { -> ¦
208 -> 235 % } -> )
121 -> 105 % ` ->
079 -> 120 % ! -> -
161 -> 115 % ~ -> +
Translation UnitedKingdomEBCDIC % United Kingdom EBCDIC
123 -> 067 % # ->
Translation GermanEBCDIC % German EBCDIC
124 -> 072 % @ ->
065 -> 183 % á -> ¯
224 -> 186 % \ -> G
066 -> 187 % í -> p
161 -> 071 % ~ -> ª
192 -> 100 % { -> ¦
079 -> 120 % ! ->
208 -> 115 % } -> +
%======================================================================
% Transforms
% ==========
%
% A TRANSFORM is a special formatting routine used for populating
% VIRTUAL datasets or transforming an update in other ways.
% Syntax:
%
% TRANSFORM <transformname> IN "<patchfiletitle>"
% or
% COBOL TRANSFORM <transformname> IN "<objecttitle>"
%
% A transform is a user-written procedure in a patch file that
% is compiled into Support (similar to an INTERNAL FORMAT). A
% transform has access to both the before- and after-images at
% the same time the formatting routine.
%
% The patch file should declare the transform procedure header
% using the DBTransformHead define in DBInterface. Unlike a
% format, the procedure return value is DBMTYPE rather than a
% boolean. The parameters are UI, BI, AI, Format, and Writer,
% which are respectively, the UpdateInfo, before-image,
% after-image, formatting routine, and the Accessory-supplied
% output routine.
%
% These transforms are predefined in Support:
% ChangedRecordsOnly
% Discards records if none of the data items
% allowed by the filter are modified.
%
% ChangedItemsOnly
% Discards unmodified data items. The Accessory
% receives only the key items and data items that
% changed.
%
% Example:
%
%* TRANSFORM VIRTUALADDRESS
%* IN "PATCH/DATABRIDGE/SAMPLE/SUPPORT/FORMATADDRESS"
%
% A COBOL transform is a COBOL program that performs
% transformations similar to the ALGOL patch file transform
% described above. It is slightly more limited due to the
% restrictions on parameter types passed to COBOL programs.
% See SYMBOL/DATABRIDGE/SAMPLE/COBOLTRANSFORM for an example
% of how to write a COBOL transform program.
% The COBOL TRANSFORM declaration causes GenFormat to write out
% the (unformatted) layouts in a COBOL COPY file called:
%
% INCLUDE/DATABRIDGE/COBOLLAYOUT/databasename
%
% The dataset attributes, e.g. structure number, will be written
% to:
%
% INCLUDE/DATABRIDGE/COBOLATTRIBUTES/databasename
%
% (If you want GenFormat to produce this file for use by
% other COBOL programs, e.g. a formatting program, you can declare
% a dummy COBOL TRANSFORM that you don't actually use. There is
% very little overhead in Support for such a transform.)
%
% Example:
%
%* COBOL TRANSFORM MAKEVIRTUALS
%* IN "OBJECT/DATABRIDGE/SAMPLE/COBOLTRANSFORM"
%
% Transforms go here ...
%======================================================================
% Formats
% =======
%
% Option Means Default
% -------- ---------------------------- -------
% <type> type of format DISPLAY
% FORMAT name of the formatting routine
% PREFIX what to put at the beginning of each record Nothing
% POSTFIX what to put at the end of each record Nothing
% SEPARATOR what to put between each data item Nothing
% DECIMALPT decimal point character in numbers Nothing
% DATACHECK generate code to check for nulls, invalid TRUE
% characters or illegal numbers and overflows
% PADDING "fill" character for short records 48"00"
% OVERFLOW "fill" character for integer overflows 9999...
% NULL "fill" character for NULL values numbers: 0000...
% text: Spaces
% POSITIVE format of a non-negative number VALUE
% NEGATIVE format of a negative number VALUE
% UNSIGNED format of an unsigned number VALUE
% TEXT format of an alphanumeric item VALUE
% TRANSLATE name of the translation table to use for text None
% FLOAT format of floating point REAL SCIENTIFIC (11)
% Either DECIMAL (w, d) or SCIENTIFIC (w)
% TRUE string value to use for true "1"
% FALSE string value to use for false "0"
%
% <Type> Format type
% ------- -----------------------------------
% DISPLAY readable formatting
% BINARY binary formatting
% RAW unformatted
% COBOL readable formatting by a generated COBOL program
% (Requires the USING FILTER <filtername> clause.
% See example below.)
% VARYING variable-length, e.g. no trailing spaces, readable
% fields
%
% Code Represents
% ----- -----------------------------------
% STRNUM structure number (4 digits)
% STRNAME structure name (17 characters)
% RECTYPE record type (3 digits)
% CHANGECODE change code ('A' add, 'D' delete, 'M' modify)
% MODFLAG modifies flag ('1' delete/add was a modify, else '0')
% STACKNBR stack number of updating program (4 digits)
% MODE "tracking" mode, ('0' extract, '2' normal, etc.)
% FORMATLEVEL dataset format update level (4 digits)
% AFN audit file number (4 digits)
% ABSN audit block serial number (10 digits)
% SEG audit file segment number (7 digits)
% INX audit block word index (5 digits)
% YYYY year (4 digits)
% YY year (2 digits)
% MM month (2 digits)
% DD day (2 digits)
% HH hour (2 digits)
% MN minute (2 digits)
% SS second (2 digits)
%
% UID unique ID of record as 12 decimal digits*
% HEXUID unique ID of record as 12 hexadecimal digits*
% PUID unique ID of parent record as 12 decimal digits*
% HEXPUID unique ID of parent record as 12 hexadecimal digits*
% BIGUID unique ID of record as 15 decimal digits*
% BIGPUID unique ID of parent record as 15 decimal digits*
% RSN (same as BIGUID)
%
%... * Note: These UIDs may or may not be present depending on the
% type of dataset. If they are present, they will auto-
% matically have the 'separator' characters around them.
%
% BIGUID or RSN is required for unique IDs that are RSNs to avoid
% losing significant digits.
%
% CR carriage return character
% LF line feed character
% SPACE space character
% TAB horizontal tab character
%
% DATANAME name of the data item
% VALUE value of the data item in EBCDIC form.
% Type Size (in bytes) in output:
% ---- -------------------------
% ALPHA (n) n
% NUMBER (n) n
% NUMBER (Sn) 1 (sign) + n
% NUMBER (n, m) n + 1 (decimal point)
% NUMBER (Sn, m) 1 (sign) + n + 1 (decimal point)
% REAL 1 (sign) + w [from FLOAT SCIENTIFIC (w)
% or FLOAT DECIMAL (w, d)]
% REAL (n) 11
% REAL (Sn) 1 (sign) + 11
% REAL (Sn, m) 1 (sign) + 11 + 1 (decimal point)
% RECORD TYPE 11
% FIELD (n) 11
% BOOLEAN 1 ('0' is false, '1' is true)
%
%======================================================================
display format KEYFORMAT
% ---------
% formatting for key items. Required.
prefix ==> SPACE
separator SPACE
decimalpt .
unsigned DATANAME = VALUE
positive DATANAME = +VALUE
negative DATANAME = -VALUE
text DATANAME = "VALUE"
boolean DATANAME = VALUE
padding SPACE
float DECIMAL (12, 4)
display format COMMAFORMAT
% -----------
% prefix; comma between each data item
prefix STRNUM , RECTYPE , CHANGECODE ,
postfix UID PUID LF
separator ,
decimalpt .
positive +VALUE
negative -VALUE
text "VALUE"
padding SPACE
float SCIENTIFIC (11) % #.#####E-##
%float DECIMAL (12, 2) % #########.##
%translate UnitedKingdom
%null SPACE
%overflow *
%true "TRUE "
%false "FALSE"
display format RSNCOMMA
% --------
% prefix; comma between each data item
prefix STRNUM , RECTYPE , CHANGECODE ,
postfix BIGUID BIGPUID LF
separator ,
decimalpt .
positive +VALUE
negative -VALUE
text "VALUE"
padding SPACE
float SCIENTIFIC (11) % #.#####E-##
display format SNAPSHOTCOMMA
% -------------
% COMMAFORMAT but no prefix; just the data
postfix UID PUID LF
separator ,
decimalpt .
positive +VALUE
negative -VALUE
text "VALUE"
padding SPACE
%translate UnitedKingdom
%float DECIMAL (12, 2)
true "1"
false "0"
%* display format COMMAFORMATQUOTEALL
% -------------------
% COMMAFORMAT with quotes around everything
%* prefix "STRNUM" , "RECTYPE" , "CHANGECODE" ,
%* postfix UID PUID LF
%* separator ,
%* decimalpt .
%* positive "+VALUE"
%* negative "-VALUE"
%* unsigned "VALUE"
%* text "VALUE"
%* boolean "VALUE"
%* true "T"
%* false "F"
%* padding SPACE
%* float DECIMAL (12, 2)
display format FIXEDFORMAT
% -----------
% no delimiters; prefix has structure number, record type, change code
prefix STRNUM RECTYPE CHANGECODE
postfix UID PUID
decimalpt .
positive +VALUE
negative -VALUE
padding SPACE
%translate UnitedKingdom
%float DECIMAL (12, 2)
datacheck TRUE
display format SNAPSHOTFIXED
% -------------
% FIXEDFORMAT but no prefix; just the data
postfix UID PUID
decimalpt .
positive +VALUE
negative -VALUE
padding SPACE
%translate UnitedKingdom
%float DECIMAL (12, 2)
display format NameFormat
% ----------
% Insert the dataname in front of each data item value.
prefix CHANGECODE SPACE STRNAME SPACE
separator ,
unsigned DATANAME = VALUE
positive DATANAME = +VALUE
negative DATANAME = -VALUE
text DATANAME = "VALUE"
boolean DATANAME = VALUE
padding SPACE
binary format BINARYFORMAT % required for the Server Accessory
% ------------
%* translate UnitedKingdom % translation for ALPHAs
format AUDITLOC
% --------
prefix MM/DD/YYYY@HH:MN:SS[AFN,ABSN,INX] CHANGECODE
separator ,
% Note that in a COBOL format you must specify the filter it uses.
%* COBOL format COBOLCOMMA USING FILTER EVERYTHING
% ----------
%* prefix "STRNAME" , "RECTYPE" , "CHANGECODE" ,
%* postfix UID PUID LF
%* separator ,
%* decimalpt .
%* positive "+VALUE"
%* negative "-VALUE"
%* unsigned "VALUE"
%* text "VALUE"
%* padding SPACE
%* float decimal (12, 4)
%* datacheck FALSE
%
% A VARYING format has fields that vary in size depending on their
% contents. Alpha fields truncate trailing spaces. Numeric fields strip
% leading zeroes. The output file should be some type of STREAM file to
% allow for output records of different sizes.
%* varying format CSV
% ---
%* prefix STRNUM , RECTYPE , CHANGECODE ,
%* postfix LF
%* separator ,
%* decimalpt .
%* positive VALUE
%* negative -VALUE
%* text "VALUE"
%
% External formats
% ================
%
% EXTERNAL FORMAT <formatname> IN "<librarytitle>"
%
% The <librarytitle> is the title of an ALGOL library codefile
% containing an EXPORTed formatting procedure called <formatname>.
% The user must write the library program. Example:
%
% external format CUSTOMFORMAT
% in "OBJECT/LOCAL/FORMATLIB"
%
%
% Internal formats
% ================
%
% INTERNAL FORMAT <formatname> IN "<patchfiletitle>"
%
% The <patchfiletitle> is the title of an ALGOL source file
% containing a patch for Support that declares a formatting
% routine whose name is <formatname>.
%
%
%
%======================================================================
% Filters
% =======
%
% Option Means Default
% -------- ---------------------------- -------
% FILTER name of filtering routine Nothing
% SELECT specifies dataset name Nothing
% DEFAULT default selection expression NONE
% $ INCLUDE include ALGOL source file Nothing
%
% Syntax for "SELECT" option:
%
% SELECT <filteritems> FROM <dataset> <optional where> <optional using>
%
% where <filteritems> is:
% ALL
%
%. * (same as ALL)
%
% <dataitem 1> <dataitem 2> ...
%
% ALL EXCEPT <dataitem 1> <dataitem 2> ...
%
% <vf 1>: <dataitem 1> <dataitem 2> ...
% <vf 2>: <dataitem 3> <dataitem 4> ...
% ELSE: * (or NONE or ALL)
% ... (for variable format datasets)
%
% Dataitems can be GROUPs or elementary items. If the data item
% OCCURS, all occurrences will be selected.
%
% The <optional where> part has the following syntax:
% WHERE <booleanexpression>
% (if omitted, all records will be selected from the
% dataset)
%
% The <booleanexpression> can specify the type of update.
% Syntax:
%
% UPDATETYPE (<type>)
%
% where <type> is CREATE, MODIFY, or DELETE.
%
% Example:
% select * from ORDERS
% where UpdateType (CREATE)
% or UpdateType (MODIFY)
%
% The <optional using> part has the following syntax:
% USING <(sub)set>
%
% The <(sub)set> specifies the name of a set or subset that will
% be used to extract records during a clone. If the subset has a
% WHERE clause in the DASDL, GenFormat will automatically append
% that expression to the WHERE clause in the SELECT statement.
%
% Example:
% select * from ACCOUNTS
% where ACCT-TYPE = 1
% using ACTIVEACCTS % subset of ACCOUNTS
%
%
% Syntax for "DEFAULT" option:
%
% DEFAULT ALL (select all records for unSELECTed datasets)
% DEFAULT ANY (same as ALL)
% DEFAULT NONE (do not select any records for unSELECTed datasets)
% DEFAULT ALL EXCEPT datasetlist (exclude datasets in list)
% DEFAULT UPDATETYPE (<type>) [OR UPDATETYPE (<type>)]
%
% Relational
% Operator Means
% --------- -----------------------------------
% = Equal to
% ^= Not equal to
% > Greater than
% >= Greater than or equal to
% < Less than
% <= Less than or equal to
% EQL Equal to
% NEQ Not Equal to
% GTR Greater than
% GEQ Greater than or Equal
% LSS Less than
% LEQ Less than or Equal
% IS Bit-for-bit equal
% ISNT Not bit-for-bit equal
%
% "AND" and "OR" may be used to connect multiple expressions.
% "NOT" may be used to reverse the value of an expression.
filter DISCARDALL % discard every record
% ----------
default NONE
% ---------------------------------------------------------------------
filter EVERYTHING % keep every record
% ----------
default ALL
% ----- Examples ------
%* filter ONLYBANK1
% ---------
%* default NONE % return records only for the datasets specified in
% the SELECT statements
%* select * from BANK where BANK-ID = 1;
%* select * from BRANCH where BANK-ID = 1;
%* select * from CUSTOMER where BANK-ID = 1;
% ---------------------------------------------------------------------
%
%* filter EXAMPLEFILTER
% -------------
%* default ALL % return all records for datasets that do not have
%* % a SELECT statement
%* select * from BRANCH where BRANCH-ID = 2
%* and BRANCH-NAM = "SOUTH MANHATTAN";
%* select * from TELLER where BRANCH-ID = 2 and TL-CSH-OUT > 99.99;
%* select * from ACCOUNT where FALSE; % no records at all
%* select * from L1 where DS-NAME > "a" using L1-SS2;
% ---------------------------------------------------------------------
%
%* filter CERTAINFIELDS
% -------------
%* default NONE % don't return any records for datasets that do
%* % not have a SELECT statement
%* select BRANCH-ID BRANCH-AD1
%* from BRANCH
%* where BRANCH-ID > 1
%* and BRANCH-NAM = "SOUTH MANHATTAN"
%* and BRANCH-AD1 NEQ " ";
%* select FS-NAME from FUNNY-STUFF where FS-2; % FS-2 is a BOOLEAN
% ACCOUNT is a variable-format dataset
%* select 1: AC-TYPE AC-NUMBER CUST-ID AC-BALANCE
%* BRANCH-ID AC-HLD-AMT
%* 3: ac-number AC-TYPE % lowercase data item OK
%* 2: ALL
%* 4: ALL EXCEPT AC-BALANCE
%* 0: AC-NUMBER AC-DT-CLSE
%* else: none
%* from ACCOUNT where BANK-ID = 1;
%* select MONTH, BANK-ID from TRIALBALANCES;
% ---------------------------------------------------------------------
%
%* filter WAREHOUSE
% ---------
% Discard any deletes, but keep creates and modifies
%* select * from HISTORY
%* where PROC-DATE >= 000101
%* and not UpdateType (Delete);
%* default all except TRIALBALANCES, FUNNY-STUFF, SHORT-VF
% ---------------------------------------------------------------------
%
%* filter SeparateAddress
% ---------------
% Use this filter in conjunction with COBOLTRANSFORM to take address
% lines out of the BANK and CUSTOMER datasets and put them in the
% ADDRESS virtual dataset.
%
%* default all
%* select all except BANK-ADDR1 BANK-ADDR2 BR-CITY BR-STATE BR-ZIP
%* from BANK;
%* select all except CUST-LINES CUST-ADDR from CUSTOMER;
%
% ---------------------------------------------------------------------
%
% Put additional filters here ...
%
% ---------------------------------------------------------------------
%
% External filters
% ================
%
% EXTERNAL FILTER <filtername> IN "<librarytitle>"
%
% The <librarytitle> is the title of an ALGOL library codefile
% containing an EXPORTed filtering procedure called <filtername>.
% The user must write the library program. Example:
%
%% external filter CUSTOMFILTER in "OBJECT/LOCAL/FILTERLIB"
%
% ---------------------------------------------------------------------
%
% Internal filters
% ================
%
% INTERNAL FILTER <filtername> IN "<patchfiletitle>"
%
% The <patchfiletitle> is the title of an ALGOL source file
% containing a patch for Support that declares a filtering
% routine whose name is <filtername>. Example:
%
%% internal filter CustomSelection
%% in "PATCH/DATABRIDGE/SUPPORT/LOCALFILTERING"
%
% ---------------------------------------------------------------------
%
% Error Manager
% =============
%
% ERROR MANAGER <errormanagername> IN "<patchfiletitle>"
%
% The <patchfiletitle> is the title of an ALGOL source file containing
% an error handling entry point called <errormanagername> that will
% replace the DBErrorManager entry point in Support. This entry point
% can analyze an error and log it, display it, etc., and its return
% value indicates whether the Accessory should continue processing or
% terminate.
%
% The entry point can be declared with the DBErrorManagerHead define
% declared in DBInterface. The patch file can contain declarations
% global to the error manager procedure that will persist until
% Support terminates. Example:
%
%* Error Manager ErrorHandler
%* in "PATCH/DATABRIDGE/SAMPLE/SUPPORT/ERRORHANDLER"
%
% ---------------------------------------------------------------------
%
% Startup
% =======
%
% STARTUP IN "<patchfiletitle>"
%
% The <patchfiletitle> is the title of an ALGOL source file
% containing a patch for Support that contains user-written code that
% is to be executed when the Support library is initializing *before*
% it freezes. The contents of the patchfile is inserted into a
% procedure called CustomStartup. It may contain declarations as well
% as statements. Any variables declared in the patchfile will be
% discarded when CustomStartup exits unless they are declared OWN.
% Example:
%
%* Startup in "PATCH/DATABRIDGE/SAMPLE/SUPPORT/STARTUP"
%
% ---------------------------------------------------------------------
%
% Shutdown
% ========
%
% SHUTDOWN IN "<patchfiletitle>"
%
% The <patchfiletitle> is the title of an ALGOL source file
% containing a patch for Support that contains user-written code that
% is to be executed after the Support library thaws. The contents of
% the patchfile is inserted into a procedure called CustomShutdown. It
% may contain declarations as well as statements. Example:
%
%* Shutdown in "PATCH/DATABRIDGE/SAMPLE/SUPPORT/SHUTDOWN"
%
% =================== End of GenFormat input ==========================
|