ZFIELD image detail as of Model 204 V7.5: Difference between revisions
Jump to navigation
Jump to search
m (Dme moved page ZFIELD image detail V7R5 to ZFIELD Image detail V7R5) |
(Inserted UTF-16 and OICHUNK fields plus some minor cleanup. Made all lines LE 71 bytes for copy/paste into SOUL full-screen editor.) |
||
Line 14: | Line 14: | ||
* IF %ZFIELD:DEFAULT.VALUE.LENGTH GT 0 THEN * | * IF %ZFIELD:DEFAULT.VALUE.LENGTH GT 0 THEN * | ||
* PRINT 'Default value:' AND - * | * PRINT 'Default value:' AND - * | ||
* $SUBSTR(%ZFIELD | * $SUBSTR(%ZFIELD:DEFAULT.VALUE,1, - * | ||
* %ZFIELD | * %ZFIELD:DEFAULT.VALUE.LENGTH) * | ||
* END IF * | * END IF * | ||
*...other references to items in ZFIELD * | *...other references to items in ZFIELD * | ||
Line 53: | Line 53: | ||
*N(one),A(ll),L(it): | *N(one),A(ll),L(it): | ||
STORE.NULL IS STRING LEN 1 | STORE.NULL IS STRING LEN 1 | ||
********* End of blanked items for some cases ********************** | |||
DATETIME.Y_N IS STRING LEN 1 | DATETIME.Y_N IS STRING LEN 1 | ||
UTF.8.Y_N IS STRING LEN 1 | UTF.8.Y_N IS STRING LEN 1 | ||
LENGTH.CONSTRAINT.Y_N IS STRING LEN 1 | LENGTH.CONSTRAINT.Y_N IS STRING LEN 1 | ||
* Following two fields are meaningful only | * Following two fields are meaningful only | ||
* if LENGTH.CONSTRAINT.Y_N EQ 'Y': | * if LENGTH.CONSTRAINT.Y_N EQ 'Y': | ||
Line 64: | Line 64: | ||
*****The following 2 items contain M204 internals information: ***** | *****The following 2 items contain M204 internals information: ***** | ||
DICTIONARY.CODE IS STRING LEN 2 NOSTRIP | DICTIONARY.CODE IS STRING LEN 2 NOSTRIP | ||
* Previous item is the table | * Previous item is the table A locator value | ||
DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED AT DICTIONARY.CODE | DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED AT DICTIONARY.CODE | ||
* To display in hex: PRINT $C2X(%ZFIELD:DICTIONARY.CODE) | * To display in hex: PRINT $C2X(%ZFIELD:DICTIONARY.CODE) | ||
Line 71: | Line 71: | ||
FIELDGROUP.DICTIONARY.CODE IS STRING LEN 2 NOSTRIP | FIELDGROUP.DICTIONARY.CODE IS STRING LEN 2 NOSTRIP | ||
* Previous item is the dictionary code of containing fieldgroup | * Previous item is the dictionary code of containing fieldgroup | ||
FIELDGROUP.DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED AT FIELDGROUP.DICTIONARY.CODE | FIELDGROUP.DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED - | ||
* To display in hex: | AT FIELDGROUP.DICTIONARY.CODE | ||
* To display in decimal: | * 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: ***** | *****The following 2 items contain M204 internals information: ***** | ||
Line 80: | Line 85: | ||
* In the previous item, an OCCURS field has the locator for the | * In the previous item, an OCCURS field has the locator for the | ||
* fixed-length field description and a non-OCCURS field has the | * fixed-length field description and a non-OCCURS field has the | ||
* table | * table A locator value (high order zeroes followed by two bytes | ||
* which are the same as DICTIONARY.CODE): | * which are the same as DICTIONARY.CODE): | ||
FIELD.CODE.BINARY IS BINARY LEN 4 UNSIGNED AT FIELD.CODE | FIELD.CODE.BINARY IS BINARY LEN 4 UNSIGNED AT FIELD.CODE | ||
* To display in hex: PRINT $C2X(%ZFIELD:FIELD.CODE) | * To display in hex: PRINT $C2X(%ZFIELD:FIELD.CODE) | ||
* To display in decimal: PRINT %ZFIELD:FIELD.CODE.BINARY | * To display in decimal: PRINT %ZFIELD:FIELD.CODE.BINARY | ||
ORDERED.Y_N IS STRING LEN 1 | ORDERED.Y_N IS STRING LEN 1 | ||
LENGTH IS BINARY LEN 1 UNSIGNED | LENGTH IS BINARY LEN 1 UNSIGNED | ||
Line 113: | Line 118: | ||
* Previous item is: GE, GT,or blank | * Previous item is: GE, GT,or blank | ||
RANGE.CONSTRAINT.MINIMUM.INTEGER IS BINARY LEN 4 | RANGE.CONSTRAINT.MINIMUM.INTEGER IS BINARY LEN 4 | ||
RANGE.CONSTRAINT.MINIMUM.FLOAT IS FLOAT LEN 8 AT RANGE.CONSTRAINT.MINIMUM.INTEGER | RANGE.CONSTRAINT.MINIMUM.FLOAT IS FLOAT LEN 8 - | ||
RANGE.CONSTRAINT.MINIMUM.DATETIME IS STRING LEN 20 | 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.FLAG IS STRING LEN 2 NOSTRIP | ||
RANGE.CONSTRAINT.MAXIMUM.INTEGER IS BINARY LEN 4 | RANGE.CONSTRAINT.MAXIMUM.INTEGER IS BINARY LEN 4 | ||
RANGE.CONSTRAINT.MAXIMUM.FLOAT IS FLOAT LEN 8 AT RANGE.CONSTRAINT.MAXIMUM.INTEGER | RANGE.CONSTRAINT.MAXIMUM.FLOAT IS FLOAT LEN 8 - | ||
RANGE.CONSTRAINT.MAXIMUM.DATETIME IS STRING LEN 20 | 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.LENGTH IS BINARY LEN 1 UNSIGNED | ||
LIKE IS STRING LEN 47 NOSTRIP | LIKE IS STRING LEN 47 NOSTRIP | ||
Line 131: | Line 140: | ||
* 'UPDTU' - An update UTC date/time field | * 'UPDTU' - An update UTC date/time field | ||
* 'CAT' - A concatenated field | * 'CAT' - A concatenated field | ||
* 'OICHNK'- An OI chunk field | |||
* Otherwise, AUTOMATIC.TYPE is all blanks | * Otherwise, AUTOMATIC.TYPE is all blanks | ||
AUTOMATIC.VALUE IS STRING LEN 21 | AUTOMATIC.VALUE IS STRING LEN 21 | ||
Line 138: | Line 148: | ||
********************************************************************* | ********************************************************************* | ||
***** The following 2 items contain M204 internals information: ***** | ***** The following 2 items contain M204 internals information: ***** | ||
COUNTED.FIELD.DICTIONARY.CODE | COUNTED.FIELD.DICTIONARY.CODE IS STRING LEN 2 NOSTRIP - | ||
AT AUTOMATIC.VALUE | |||
* Previous item is dictionary code of field which is counted for CTO | * Previous item is dictionary code of field which is counted for CTO | ||
COUNTED.FIELD.DICTIONARY.CODE.BINARY | COUNTED.FIELD.DICTIONARY.CODE.BINARY IS BINARY LEN 2 UNSIGNED - | ||
* To display in hex: PRINT $C2X(%ZFIELD:COUNTED.FIELD.DICTIONARY.CODE) | AT COUNTED.FIELD.DICTIONARY.CODE | ||
* To display in decimal: PRINT %ZFIELD:COUNTED.FIELD.DICTIONARY.CODE.BINARY | * 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: | * Rest of automatic field info is for CONCAT fields: | ||
ESCAPE.CANCEL.Y_N | ESCAPE.CANCEL.Y_N IS STRING LEN 1 - | ||
SEPARATOR.NONE.Y_N | AT AUTOMATIC.VALUE | ||
SEPARATOR | SEPARATOR.NONE.Y_N IS STRING LEN 1 | ||
ESCAPE | SEPARATOR IS STRING LEN 1 NOSTRIP | ||
NUMBER.OF.CONCATENATED.FIELDS | ESCAPE IS STRING LEN 1 NOSTRIP | ||
NUMBER.OF.CONCATENATED.FIELDS IS BINARY LEN 1 UNSIGNED | |||
*****The following 2 items contain M204 internals information: ***** | *****The following 2 items contain M204 internals information: ***** | ||
CONCATENATED.FIELD.DICTIONARY.CODES | CONCATENATED.FIELD.DICTIONARY.CODES IS STRING LEN 2 NOSTRIP - | ||
CONCATENATED.FIELD.DICTIONARY.CODES.BINARY IS BINARY LEN 2 UNSIGNED OCCURS 8 AFTER NUMBER.OF.CONCATENATED.FIELDS | OCCURS 8 | ||
* To display in hex: PRINT $C2X(%ZFIELD:CONCATENATED.FIELD.DICTIONARY.CODES(%I)) | CONCATENATED.FIELD.DICTIONARY.CODES.BINARY IS BINARY LEN 2 - | ||
* To display in decimal: PRINT %ZFIELD:CONCATENATED.FIELD.DICTIONARY.CODES.BINARY(%I) | 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 automatic field info * |
Revision as of 16:54, 11 October 2013
IMAGE ZFIELD ********************************************************************* * The ZFIELD image contains the following sections: * * - NAME: fieldname (255bytes, 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