User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v8.0.x:manuals:mkfldhdr.8

mkfldhdr

Name

mkfldhdr — Generate C header files for UBF field definitions.

Synopsis

mkfldhdr [-D dbglev, legacy] [-d target directory] [field table …]

DESCRIPTION

Program generates C header files from field table declaration tables. Field tables are declared as macros which later are translated into C header files. Field tables also are used in runtime in boolean expressions and also in dumping the buffer.

There is special syntax within field tables.

  • Lines to be sent to C Header are declared as: $
  • The base number is declared as *base NUMBER. The number is logical field offset.
  • Empty lines are ignored.
  • # Is comment, which is ignored.
  • All other are treated as field name in start of the line.
  • Syntax for field definition is following: "FIELD_NAME ID TYPE FLAG DESCRIPTION" where

    FIELD_NAME
    Is field UBF field name.
    TYPE
    Field type, may be one of the following short, long, char, float, double string, carray, ptr, ubf (or fml32), view.
    ID
    Is relative field it within *base. *base+field ID must be bellow NDRX_UBFMAXFLDS number defined in environment. Max number is 33554432 (25 bit).
    FLAG
    Flags, RFU, use -. Historically 1 - single field. M - maybe be multiple fields. Values 1 and M are synonyms to -.
    DESCRIPTION
    Field description.

Example input (testws.fd file):

$/**
$ * Web service test ud file.
$ *
$ * @file       testws.fd
$ * @copyright  Mavimax, ltd
$ * @version    SVN: $Id$
$ */

$#ifndef __TEST_FD
$#define __TEST_FD

*base 1000

T_STATCODE      0       long            - Test field...
T_STATMSG       1       string          - Test field...
T_ITEMSTOT      2       long            - Test field...
T_AMTSTRTOT     3       string          - Test field...
T_PAGESTOT      4       long            - Test field...
T_SHORT         5       short           - Test field...
T_CHAR          6       char            - Test field...
T_FLOAT         7       float           - Test field...
T_DOUBLE        8       double          - Test field...
T_STRING        9       string          - Test field...
T_USERNAME      10      string          - Test field...
T_PAGENUM       11      long            - Test field...
T_ITEMSPP       12      long            - Test field...

T_SOMEDATE      13      long            - Test field...
T_SRCHDATE      14      long            - Test field...
T_SRCHPRM1      15      string          - Test field...
T_SRCHPRM2      16      string          - Test field...
T_MYFIELDS      17      string          - Test field...
SRVCNM          18      string          - Service name to call
T_CONSTFIELD    19      string          - This is constant.
T_MYLONGFLDS    20      long            - Long array test

$#endif

Example output after utility run (testws.fd.h):

/**
 * Web service test ud file.
 *
 * @file       testws.fd
 * @copyright  Mavimax, ltd
 * @version    SVN: $Id$
 */
#ifndef __TEST_FD
#define __TEST_FD
/*      fname   bfldid            */
/*      -----   -----            */
#define T_STATCODE      ((BFLDID32)33555432)    /* number: 1000  type: long */
#define T_STATMSG       ((BFLDID32)167773161)   /* number: 1001  type: string */
#define T_ITEMSTOT      ((BFLDID32)33555434)    /* number: 1002  type: long */
#define T_AMTSTRTOT     ((BFLDID32)167773163)   /* number: 1003  type: string */
#define T_PAGESTOT      ((BFLDID32)33555436)    /* number: 1004  type: long */
#define T_SHORT ((BFLDID32)1005)        /* number: 1005  type: short */
#define T_CHAR  ((BFLDID32)67109870)    /* number: 1006  type: char */
#define T_FLOAT ((BFLDID32)100664303)   /* number: 1007  type: float */
#define T_DOUBLE        ((BFLDID32)134218736)   /* number: 1008  type: double */
#define T_STRING        ((BFLDID32)167773169)   /* number: 1009  type: string */
#define T_USERNAME      ((BFLDID32)167773170)   /* number: 1010  type: string */
#define T_PAGENUM       ((BFLDID32)33555443)    /* number: 1011  type: long */
#define T_ITEMSPP       ((BFLDID32)33555444)    /* number: 1012  type: long */
#define T_SOMEDATE      ((BFLDID32)33555445)    /* number: 1013  type: long */
#define T_SRCHDATE      ((BFLDID32)33555446)    /* number: 1014  type: long */
#define T_SRCHPRM1      ((BFLDID32)167773175)   /* number: 1015  type: string */
#define T_SRCHPRM2      ((BFLDID32)167773176)   /* number: 1016  type: string */
#define T_MYFIELDS      ((BFLDID32)167773177)   /* number: 1017  type: string */
#define SRVCNM  ((BFLDID32)167773178)   /* number: 1018  type: string */
#define T_CONSTFIELD    ((BFLDID32)167773179)   /* number: 1019  type: string */
#define T_MYLONGFLDS    ((BFLDID32)33555452)    /* number: 1020  type: long */
#endif

ENVIRONMENT

FIELDTBLS
Comma separated list of field table file names.
FLDTBLDIR
Colon separated list of directories where field tables are located.

OPTIONS

-D DEBUG_LEVEL
Not used. Left for capability with Tuxedo.
-d OUTPUT_DIR
Directory where to dump the generated header files.
-m LANGUAGE_MODE
Language mode. Value 0 (default) for C language header. 1 for GO language constants file. 2 for Java constant classes. 3 for Python constants file.
-p LANG_PRIVATE_DATA
Private data for language module. For GO and Java languages it is used for package name.

NDRX_APIFLAGS

This section lists NDRX_APIFLAGS environment variable parameter special flags affecting work of the mkfldhdr:

  1. API flag ubf_dupfidok configures mkfldhdr to accept the duplicate field IDs. This matches Oracle Tuxedo logic.

EXIT STATUS

0
Success
NON_ZERO
Failure

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd