RECORD

Synopsis

HELP:   Read records from a file
TYPE:   OBJECT
SYNTAX: RECORD(NET.{},FILE['str'/STREAM/DUMMY...],RECMODE=STOP/CUT/WRAP/SKIP,PRNCONTROL=DETACH/RETAIN/ERASE/REPLACE,RPLFFD[=num],SUPPADDING,PADCHARACTER='bin'/BINARY-ZERO/ASCII-BLANK/EBCDIC-BLANK/UTF08-BLANK/UTF16BE-BLANK/UTF16LE-BLANK/UTF32BE-BLANK/UTF32LE-BLANK,ORGANIZATION=SEQ/PS/LIB/PDS/USS/EDS/ESDS/KDS/KSDS/RDS/RRDS,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,RECDELIM='bin'/CR-ASCII/LF-ASCII/NL-ASCII/CRLF-ASCII/CR-EBCDIC/LF-EBCDIC/NL-EBCDIC/CRLF-EBCDIC/CR-UTF08/LF-UTF08/NL-UTF08/CRLF-UTF08/CR-UTF16BE/LF-UTF16BE/NL-UTF16BE/CRLF-UTF16BE/CR-UTF16LE/LF-UTF16LE/NL-UTF16LE/CRLF-UTF16LE/CR-UTF32BE/LF-UTF32BE/NL-UTF32BE/CRLF-UTF32BE/CR-UTF32LE/LF-UTF32LE/NL-UTF32LE/CRLF-UTF32LE,RECCOUNT=num,LENFORMAT.{},KEYPOSITION=num,KEYLENGTH=num,NOSPANNED,REGEXP(),DECODE[=NONE/ARCHIVE/DECOMP/RECORD/CMPDEC/ALWAYS],DECRYPT[{}...],FDECODE/COD.{},CCSID='str'/DEFAULT/ASCII/EBCDIC/BOMUTF/BOMUCS/SYSTEM/LOCAL,CHRMODE=STOP/IGNORE/SUBSTITUTE/IDENTITY/TRANSLIT,SKIPEQUAL,USRTABLE='str'/NPAS/SEPA/DELA/DLAX,ONEMAP,COMBINED=NFD/NFC/AUTO/ON/OFF,BOM,KEEPBOM,SUBSYSTEM(),REMOVE,LANG='str',PLATFORM=WIN/UNX/ZOS/USS/VSE/BS2/MAC,OWNER='str',ENVID='str',HASH(),SIGNATURE.{},CHECK,TABLE(),AVSCAN(),NOARCH,PREPROCESS[()...],POSTPROCESS/PSTPRO[()...])

Description

Read record provides a list of records from a host-like data set format or from a member in an archive file.

If a record contains text data, you can mark it by defining the correct CCSID. This will result in character set conversion from the provided CCSID to UTF-8 for each record. If the CCSID is not provided, the record is handled as binary data.

The following options are supported:

If decryption parameters or a member name are specified, transparent reading of FLAM4FILEs is activated automatically. You can enforce or prevent this by setting the DECODE parameter accordingly.

Archives, decryption and decompression are supported for different types of files when writing. FLAM4 archives support storing records, but you can also use ZIP archives, GZIP or ASCII armored files to archive host record datasets. This solution uses FLAM specific extensions of the respective formats. Therefore, you must use FLCL to recreate the correct host data set by activating the decode switch. This works for all kinds of datasets (PS, PO, VSAM) except load libraries, which cannot be recreated with loadable modules.

Decoding of FLAMFILEs or other supported formats can be enforced with the keyword 'DECODE' (default is the level 'RECORD'). If the DECODE parameter is not specified, the raw record will be processed.

The DECODE switch also enables support for reading different archive formats, automatic decryption and decompression, followed by a final record conversion based on length fields or a binary delimiter, if one was used to store the record-oriented dataset. Auto-decoding capabilities can be limited by assigning one of the defined levels to the DECODE parameter.

If DECODE is not specified (read records from dataset), but a binary record delimiter is set, the default record format is DLM and does not have to be assigned explicitly.

If no length fields or binary delimiters are detected and the original record length is known, the data is wrapped into records of this length by default, which is useful if fixed record length dataset formats are exchanged.

For not cataloged data sets or record-oriented file formats on non record-oriented platforms (WIN, UNIX, ...), you can define file organization, block size, record format and record length. If you work with cataloged files or FLAMFILEs, these parameters are not required.

For non-record-oriented platforms, you can define a lot of different length formats. If you don't specify a length format at read and a 4 byte record length format is detected (a FILEDATA=RECORD file is allocated with FILEDATA=BINARY), the length fields in the data are used to build the records.

If you provide row specifications through the table object, each record is split into neutral FL5 table elements.

Arguments