HELP: Write records to memory
TYPE: OBJECT
SYNTAX: RECORD(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,PADCHAR='bin'/BINARY-ZERO/ASCII-BLANK/EBCDIC-BLANK/UTF08-BLANK/UTF16BE-BLANK/UTF16LE-BLANK/UTF32BE-BLANK/UTF32LE-BLANK,CCSID='str'/DEFAULT/ASCII/EBCDIC/SYSTEM/LOCAL,CASE=UPPER/LOWER/FOLD/SUPPER/SLOWER/USRTAB,BOM,KEPBOM,CHRMODE=STOP/IGNORE/SUBSTITUTE/IDENTITY/TRANSLIT,SUBCHAR[num/SYSTEM...],SYSTABLE=ICONV,USRTABLE='str'/NPAS/SEPA/DELA/DLAX,ONEMAP,COMBINED=NFD/NFC/AUTO/ON/OFF,REPORTFILE='str'/STDOUT/STDERR,BLK2REC,REGEXP(),COMPRESS/CMP.{},ENCRYPT/ENC.{},ENCODE/COD.{},INDSIZ=num,INDCHR=SPACE/TABULATOR,NOCMNT,TABLE(),AVSCAN())
Format record formats the list of elements in records. Each read operation writes only one record into memory.
Format record supports:
If such a record is marked as text record, character conversion from UTF-8 to a defined CCSID is performed.
Character conversion supports:
If the input was read as XML, record formatting turns it into a human- readable XML document using pretty printing, i.e. with proper indentation. You can set the indentation character, the number of indentation characters printed for each indentation level and whether to suppress XML comments.
If the table object is used, then the corresponding method is set to 'record' as default and no explicit character conversion is done. The character conversion settings are used as defaults for table formatting. The table formatting allows, for example, to read a fixed length structure (copybook of an FB dataset) as record with EBCDIC strings, BCD numbers and so on, and write a CSV file in UTF-8.
To get padded fixed-length records or valid ASA or MCC bytes (FIX or VAR) in front of each record, you must specify the record format. For fixed- length formats the record length must be given. If no record length is provided, then 80 will be the default for fixed-length records. If you only set the record length, then fixed-length record format is assumed. If a fixed record format is used, the padding character can be set. If no padding character is set, binary zero is used for binary records or the whitespace character in the current character set is used for text records. A record is not truncated if it is longer than the provided record length. A relative record dataset format (VSAM-RRDS) can also be used. In this case, (FIX-REL(-ASA/MCC), FR(A/M)) the slot number is prefixed as 8 bytes integer in local endianness. If no slot number is known (records not read from an RRDS) then a sequential number (1,2,3,...) is generated.
NUMBER: 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 - Record format for read operation [catalog/VAR]
NONE - No format definedBIN - Open - Binary (undefined) data (only the last record are shorter then record length)TXT - Open - Text data with standard delimiter (result is a stripped variable length records)TXT-ASA - Open - Text data with standard delimiter and ASA byte in front (result variable length records with ASA attribute)TXT-MCC - Open - Text data with standard delimiter and MCC byte in front (result variable length records with MCC attribute)DLM - Open - Records separated by a special delimiter with the result of variable length recordsDLM-ASA - Open - ASA records separated by a special delimiter with the result of variable length recordsDLM-MCC - Open - MCC records separated by a special delimiter with the result of variable length recordsVAR - Open - Variable length record (if necessary define length format)VAR-ASA - Open - Variable length record with ASA print control character (if necessary define length format)VAR-MCC - Open - Variable length record with machine print control codes (if necessary define length format)FIX - Open - Fixed-length record (file size = N * record length)FIX-ASA - Open - Fixed-length record with ASA print control character (file size = N * (record length + 1))FIX-MCC - Open - Fixed-length record with machine print control codes (file size = N * (record length + 1))VAR-REL - Open - Variable relative record (if necessary define length format)VAR-REL-ASA - Open - Variable relative record with ASA print control character (if necessary define length format)VAR-REL-MCC - Open - Variable relative record with machine print control codes (if necessary define length format)FIX-REL - Open - Fix relative record (file size = N * (record length + 8))FIX-REL-ASA - Open - Fix relative record with ASA print control character (file size = N * (record length + 9))FIX-REL-MCC - Open - Fix relative record with machine print control codes (file size = N * (record length + 9))F - Host - Fixed-length, unblockedFA - Host - Fixed-length, unblocked, ASA print control charactersFM - Host - Fixed-length, unblocked, machine print control codesFS - Host - Fixed-length, standardFSA - Host - Fixed-length, standard, ASA print control charactersFSM - Host - Fixed-length, standard, machine print control codesFB - Host - Fixed-length, blockedFBA - Host - Fixed-length, blocked, ASA print control charactersFBM - Host - Fixed-length, blocked, machine print control codesFBS - Host - Fixed-length, blocked, standardFBSA - Host - Fixed-length, blocked, standard, ASA print control charactersFBSM - Host - Fixed-length, blocked, standard, machine print control codesFE - Host - Fixed-length, ESDSFEA - Host - Fixed-length, ESDS, ASA print control charactersFEM - Host - Fixed-length, ESDS, machine print control codesFK - Host - Fixed-length, KSDSFKA - Host - Fixed-length, KSDS, ASA print control charactersFKM - Host - Fixed-length, KSDS, machine print control codesFR - Host - Fixed-length, RRDSFRA - Host - Fixed-length, RRDS, ASA print control charactersFRM - Host - Fixed-length, RRDS, machine print control codesU - Host - Undefined-lengthUA - Host - Undefined-length, ASA print control charactersUM - Host - Undefined-length, machine print control codesV - Host - VariableVA - Host - Variable, ASA print control charactersVM - Host - Variable, machine print control codesVS - Host - Variable, spannedVSA - Host - Variable, spanned, ASA print control charactersVSM - Host - Variable, spanned, machine print control codesVB - Host - Variable, blockedVBA - Host - Variable, blocked, ASA print control charactersVBM - Host - Variable, blocked, machine print control codesVBS - Host - Variable, blocked, spannedVBSA - Host - Variable, blocked, spanned, ASA print control charactersVBSM - Host - Variable, blocked, spanned, machine print control codesVE - Host - Variable, ESDSVEA - Host - Variable, ESDS, ASA print control charactersVEM - Host - Variable, ESDS, machine print control codesVK - Host - Variable, KSDSVKA - Host - Variable, KSDS, ASA print control charactersVKM - Host - Variable, KSDS, machine print control codesVR - Host - Variable, RRDSVRA - Host - Variable, RRDS, ASA print control charactersVRM - Host - Variable, RRDS, machine print control codesORG - Use original record format as default (like none)NUMBER: RECLENGTH=num - Maximum record length for read operation [catalog/512]STRING: PADCHAR='bin'/BINARY-ZERO/ASCII-BLANK/EBCDIC-BLANK/UTF08-BLANK/UTF16BE-BLANK/UTF16LE-BLANK/UTF32BE-BLANK/UTF32LE-BLANK - Character to pad records to a fixed length [system] or used for empty variable length records [NONE]
BINARY-ZERO - Padding with 0x00ASCII-BLANK - Padding with 0x20EBCDIC-BLANK - Padding with 0x40UTF08-BLANK - Padding with 0x20UTF16BE-BLANK - Padding with 0x0020UTF16LE-BLANK - Padding with 0x2000UTF32BE-BLANK - Padding with 0x00000020UTF32LE-BLANK - Padding with 0x20000000SWITCH: KEPBOM - Keep byte order mark for faster conversionSWITCH: BLK2REC - Convert block with delimiter to records (including suppression of trailing whitespaceNUMBER: INDSIZ=num - Number of XML indentation characters per indentation level [2 (SPACE) or 1 (TAB)]NUMBER: INDCHR=SPACE/TABULATOR - Indentation character used to indent XML tags [SPACE]
SPACE - Use the space character as indentation characterTABULATOR - Use the tabulator character as indentation characterSWITCH: NOCMNT - Do not write out XML comments [FALSE]