Please enable JavaScript to view this site.

The BRECLEN function returns the length of a binary record description for a given record layout. Binary record descriptions are typically COBOL and are used for IMS segments, VSAM and flat file records. The length returned represents the maximum length of the description which may be different from the record length of an individual record if the record is variable length in which case the record may contain an OCCURS clause to facilitate processing.

Category

Byte

Syntax

BRECLEN(<source_datastore> , <record_description_alias> | <variable> | 'literal')

 

Parameter Descriptions

source_datastore  -  Name of the datastore that references the record description.

<record_description_alias> | <variable> | 'literal' - Must resolve at runtime to the alias of a record DESCRIPTION alias.

 

Example

Control the processing of changed IMS Segment data by first  determining the maximum length of a binary record description.

PROCESS INTO TARGET

SELECT

{

   V_MAX_RECLEN = BRECLIN(CDCIN, RECNAME(CDCIN))

 

   case

   when RECNAME(CDCIN) = 'SEGEMPL1'

       CALLPROC(M_SEGEMPL1

   when RECNAME(CDCIN) =  'SEGDEPT1'

       CALLPROC(M_SEGDEPT1)

}

FROM CDCIN;