STATE

Synopsis

HELP:   State string for FLUC byte, stream and record interfaces
TYPE:   OBJECT
SYNTAX: > flcbyt STATE(ORGF='str'/STREAM/DUMMY,FILE='str'/STREAM/DUMMY,MEMBER='str',COMMENT='str',CHRSET=NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL,CCSID='str',SPACE=num,BLKSIZE=num,RECFORMAT=NONE/BIN/TXT/TXT-ASA/TXT-MCC/DLM/DLM-ASA/DLM-MCC/VAR/VAR-ASA/VAR-MCC/FIX/FIX-ASA/FIX-MCC/VAR-REL/VAR-REL-ASA/VAR-REL-MCC/FIX-REL/FIX-REL-ASA/FIX-REL-MCC/F/FA/FM/FS/FSA/FSM/FB/FBA/FBM/FBS/FBSA/FBSM/FE/FEA/FEM/FK/FKA/FKM/FR/FRA/FRM/U/UA/UM/V/VA/VM/VS/VSA/VSM/VB/VBA/VBM/VBS/VBSA/VBSM/VE/VEA/VEM/VK/VKA/VKM/VR/VRA/VRM/ORG,RECLENGTH=num,KEYPOSITION=num,KEYLENGTH=num,DATFMT=NONE/BLOCK/RECORD/ELEMENT,DATTYP=NONE/BINARY/RECORD/RECTXT/CHAR/TEXT/XML/TABLE,MATRIX=NONE/DATBLK/STDREC/STDASAREC/STDMCCREC/RELREC/RELASAREC/RELMCCREC/TXTREC/TXTDLM/TXTRST/XMLELM,REDUNDANT,NOTREDUNDANT,ATTRIB())

Description

The state string contains some metadata representing the internal state of FLUC. When opening a file for reading (fcbopen2("read."/"input()")), this state string is returned. It can be passed to a successive file open call for writing (fcbopen2("write."/"output()") or FCROPN("write."/"output()")) to give FLUC additional hints about the data that is to be written. The state string contains mainly file attributes which must be known to fill header information for archives (GZIP, FLAM) correctly, but also some information about elements when working in element formatting mode.

On C/C++ interfaces, the parameter is a pointer to a pointer to a string. In read mode, if you pass a non-null pointer, the pointer target will be a pointer to a null-terminated string dynamically allocated in heap memory (i.e. you must free() it!) containing the state string after the opening function returns. In write mode, if you pass a non-null pointer to a pointer to a state string, this state string is used to set the internal state. Otherwise, the state is initialized with default values.

On the record interface, the application must provide the memory and a length error is returned if the buffer is too small.

Example:

   "state(member='test.txt' recf=FBA recl=120)"

The state mainly contains file attributes which describe the source. This information is important for example to store the right values in GZIP or FLAM headers. The status object can be used to pass the source's characteristics to the write operation.

Arguments