ZFIELD image detail as of Model 204 V7.5

From m204wiki
Revision as of 17:03, 11 October 2013 by JDamon (talk | contribs)
Jump to navigation Jump to search
IMAGE ZFIELD
*********************************************************************
* The ZFIELD image contains the following sections:                 *
* - NAME:    fieldname (255 bytes, left justified, blank filled)    *
* - FDEF1:   first set of field attributes (67 bytes)               *
* - LOOPVAR: loop control item for $LSTFLD (16 bytes)               *
* - FDEF2:   second set of field attributes (152 bytes)             *
*                                                                   *
* FDEF is an item which overlays FDEF1, LOOPVAR, and FDEF2, so that *
* you can do some thing such as the following:                      *
*                                                                   *
* %ZFIELD:FDEF = $LSTFLD(fileName,fieldName)                        *
* IF %ZFIELD:DEFAULT.VALUE.LENGTH GT 0 THEN                         *
*    PRINT 'Default value:' AND -                                   *
*          $SUBSTR(%ZFIELD:DEFAULT.VALUE,1, -                       *
*          %ZFIELD:DEFAULT.VALUE.LENGTH)                            *
* END IF                                                            *
*...other references to items in ZFIELD                             *
*********************************************************************

    NAME                  IS STRING LEN 255
    DEFER.Y_N             IS STRING LEN 1
    FRV.Y_N               IS STRING LEN 1
    KEY.Y_N               IS STRING LEN 1
    MANY.VALUED.Y_N       IS STRING LEN 1
    CODED.Y_N             IS STRING LEN 1
    STRING.Y_N            IS STRING LEN 1
    NUMERIC.RANGE.Y_N     IS STRING LEN 1
    INVISIBLE.Y_N         IS STRING LEN 1
    SECURED.Y_N           IS STRING LEN 1
    UPDATE.IN.PLACE.Y_N   IS STRING LEN 1
    OCCURS.Y_N            IS STRING LEN 1
    FLOAT.Y_N             IS STRING LEN 1
    ORD.NUM.Y_N           IS STRING LEN 1
    ORD.CHAR.Y_N          IS STRING LEN 1
    PURE.DBCS.Y_N         IS STRING LEN 1
    MIXED.DBCS.Y_N        IS STRING LEN 1
    UNIQUE.Y_N            IS STRING LEN 1
    AT.MOST.ONE.Y_N       IS STRING LEN 1
    OCCURS.ONCE.Y_N       IS STRING LEN 1 AT AT.MOST.ONE.Y_N
* It is recommended that you do not use OCCURS.ONCE.Y_N,but use
* AT.MOST.ONE.Y_N instead, to avoid confusion with EXACTLY.ONE.Y_N
    CLOB.Y_N              IS STRING LEN 1
    BLOB.Y_N              IS STRING LEN 1
    FIELDGROUP.Y_N        IS STRING LEN 1
    IN.FIELDGROUP.Y_N     IS STRING LEN 1
    EXACTLY.ONE.Y_N       IS STRING LEN 1
********* Following items are blank if FILEORG X'100' is off ******
********* or for a fieldgroup:                               ******
*N(one),A(ll),L(it):
    STORE.DEFAULT         IS STRING LEN 1
*N(one),A(ll),L(it):
    STORE.NULL            IS STRING LEN 1
********* End of blanked items for some cases **********************
    DATETIME.Y_N          IS STRING LEN 1
    UTF.8.Y_N             IS STRING LEN 1
    LENGTH.CONSTRAINT.Y_N IS STRING LEN 1
* Following two fields are meaningful only
* if LENGTH.CONSTRAINT.Y_N EQ 'Y':
    LENGTH.GE             IS BINARY LEN 1 UNSIGNED
    LENGTH.LE             IS BINARY LEN 1 UNSIGNED
    MINLOBE               IS BINARY LEN 1 UNSIGNED
*****The following 2 items contain M204 internals information: *****
    DICTIONARY.CODE       IS STRING LEN 2 NOSTRIP
* Previous item is the table A locator value
    DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED AT DICTIONARY.CODE
* To display in hex:      PRINT $C2X(%ZFIELD:DICTIONARY.CODE)
* To display in decimal:  PRINT %ZFIELD:DICTIONARY.CODE.BINARY
***** The following 2 items contain M204 internals information: *****
    FIELDGROUP.DICTIONARY.CODE IS STRING LEN 2 NOSTRIP
* Previous item is the dictionary code of containing fieldgroup
    FIELDGROUP.DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED - 
      AT FIELDGROUP.DICTIONARY.CODE
* To display in hex:     PRINT $C2X(%ZFIELD:FIELDGROUP.DICTIONARY.CODE)
* To display in decimal: PRINT %ZFIELD:FIELDGROUP.DICTIONARY
     UTF.16.Y_N            IS STRING LEN 1                
     OICHUNK.Y_N           IS STRING LEN 1                
     OICHUNK.TARGET.DICT.CODE IS BINARY LEN  2 UNSIGNED   
     OICHUNK.SIZE             IS BINARY LEN  4 UNSIGNED   
     FUTURE.EXPANSION         IS STRING LEN 11 NOSTRIP    

*****The following 2 items contain M204 internals information: *****
    FIELD.CODE            IS STRING LEN 4 NOSTRIP
* In the previous item, an OCCURS field has the locator for the
* fixed-length field description and a non-OCCURS field has the
* table A locator value (high order zeroes followed by two bytes
* which are the same as DICTIONARY.CODE):
    FIELD.CODE.BINARY     IS BINARY LEN 4 UNSIGNED AT FIELD.CODE
* To display in hex:     PRINT $C2X(%ZFIELD:FIELD.CODE)
* To display in decimal: PRINT %ZFIELD:FIELD.CODE.BINARY
 
    ORDERED.Y_N           IS STRING LEN 1
    LENGTH                IS BINARY LEN 1 UNSIGNED
    LEVEL                 IS BINARY LEN 1 UNSIGNED
    LRESERVE              IS BINARY LEN 1 UNSIGNED
    NRESERVE              IS BINARY LEN 1 UNSIGNED
    SPLITPCT              IS BINARY LEN 1 UNSIGNED
    NO.OF.IMMEDIATES      IS BINARY LEN 1 UNSIGNED
    OCCURS                IS BINARY LEN 1 UNSIGNED
    PAD.CHAR              IS STRING LEN 1
*********************************************************************
* End of FDEF1 section                                              *
*********************************************************************
    FDEF1                 IS STRING LEN 67 AT DEFER.Y_N NOSTRIP
    BIN1                  IS BINARY LEN 4 UNSIGNED
    BIN2                  IS BINARY LEN 4 UNSIGNED
    BIN3                  IS BINARY LEN 4 UNSIGNED
    BIN4                  IS BINARY LEN 4 UNSIGNED
    LOOPVAR               IS STRING LEN 16 AT BIN1 NOSTRIP
*********************************************************************
* Start of FDEF2 section*********************************************
    DEFAULT.VALUE.LENGTH  IS BINARY LEN 1 UNSIGNED
    DEFAULT.VALUE         IS STRING LEN 31 NOSTRIP PAD X'00'
    RANGE.CONSTRAINT.TYPE IS STRING LEN 1
* Previous item is: I(nteger), F(loat), D(atetime), or blank
    RANGE.CONSTRAINT.MINIMUM.FLAG     IS STRING LEN 2 NOSTRIP
* Previous item is: GE, GT,or blank
    RANGE.CONSTRAINT.MINIMUM.INTEGER  IS BINARY LEN 4
    RANGE.CONSTRAINT.MINIMUM.FLOAT    IS FLOAT  LEN 8 - 
      AT RANGE.CONSTRAINT.MINIMUM.INTEGER
    RANGE.CONSTRAINT.MINIMUM.DATETIME IS STRING LEN 20 -
      AT RANGE.CONSTRAINT.MINIMUM.INTEGER
    RANGE.CONSTRAINT.MAXIMUM.FLAG     IS STRING LEN 2 NOSTRIP
    RANGE.CONSTRAINT.MAXIMUM.INTEGER  IS BINARY LEN 4
    RANGE.CONSTRAINT.MAXIMUM.FLOAT    IS FLOAT  LEN 8 -
      AT RANGE.CONSTRAINT.MAXIMUM.INTEGER
    RANGE.CONSTRAINT.MAXIMUM.DATETIME IS STRING LEN 20 -
      AT RANGE.CONSTRAINT.MAXIMUM.INTEGER
    LIKE.LENGTH           IS BINARY LEN 1 UNSIGNED
    LIKE                  IS STRING LEN 47 NOSTRIP
    AUTOMATIC.TYPE        IS STRING LEN 6
* AUTOMATIC.TYPE values (left justified, blank padded):
* 'CTO'   - A count occurrences field
* 'CRDT'  - A creation date/time field
* 'CRUS'  - A creation user field
* 'UPDT'  - An update date/time field
* 'UPUS'  - An update user field
* 'CRDTU' - A creation UTC date/time field
* 'UPDTU' - An update UTC date/time field
* 'CAT'   - A concatenated field
* 'OICHNK'- An OI chunk field
* Otherwise, AUTOMATIC.TYPE is all blanks
    AUTOMATIC.VALUE       IS STRING LEN 21
*********************************************************************
* The image area starting with item AUTOMATIC.VALUE is redefined    *
* below as needed, based on the value of AUTOMATIC.TYPE:            *
*********************************************************************
***** The following 2 items contain M204 internals information: *****
    COUNTED.FIELD.DICTIONARY.CODE           IS STRING LEN 2 NOSTRIP -
      AT AUTOMATIC.VALUE
* Previous item is dictionary code of field which is counted for CTO
    COUNTED.FIELD.DICTIONARY.CODE.BINARY    IS BINARY LEN 2 UNSIGNED -
      AT COUNTED.FIELD.DICTIONARY.CODE
* To display in hex:     
* PRINT $C2X(%ZFIELD:COUNTED.FIELD.DICTIONARY.CODE)
* To display in decimal: 
* PRINT %ZFIELD:COUNTED.FIELD.DICTIONARY.CODE.BINARY 

* Rest of automatic field info is for CONCAT fields: 
    ESCAPE.CANCEL.Y_N                       IS STRING LEN 1 -
      AT AUTOMATIC.VALUE
    SEPARATOR.NONE.Y_N                      IS STRING LEN 1
    SEPARATOR                               IS STRING LEN 1 NOSTRIP
    ESCAPE                                  IS STRING LEN 1 NOSTRIP
    NUMBER.OF.CONCATENATED.FIELDS           IS BINARY LEN 1 UNSIGNED
*****The following 2 items contain M204 internals information:   *****
    CONCATENATED.FIELD.DICTIONARY.CODES     IS STRING LEN 2 NOSTRIP -
      OCCURS 8
    CONCATENATED.FIELD.DICTIONARY.CODES.BINARY  IS BINARY LEN 2 -
      UNSIGNED OCCURS 8 AFTER NUMBER.OF.CONCATENATED.FIELDS
* To display in hex:     
* PRINT $C2X(%ZFIELD:CONCATENATED.FIELD.DICTIONARY.CODES(%I))
* To display in decimal: 
* PRINT %ZFIELD:CONCATENATED.FIELD.DICTIONARY.CODES.BINARY(%I)
*********************************************************************
* End of automatic field info                                       *
*********************************************************************
*********************************************************************
* End of FDEF2 section                                              *
*********************************************************************
    FDEF2                 IS STRING LEN 152 AT DEFAULT.VALUE.LENGTH
    FDEF                  IS STRING LEN 235 AT FDEF1
END IMAGE