MARK.MAPPING

MARK.MAPPING

Top  Previous  Next

 

The MARK.MAPPING statement determines how field marks are handled when reading or writing from a directory file.

 

 

Format

 

MARK.MAPPING file.var, OFF

MARK.MAPPING file.var, ON

MARK.MAPPING file.var, expr

 

where

 

file.varis the file variable for a previously opened file.

 

exprevaluates to a number.

 

 

Data written to directory files usually has field marks translated to newlines. On reading, the reverse translation is performed to recover the original data. Records storing binary information may contain bytes that appear to be field marks and these will be translated, possibly causing data corruption.

 

Use of MARK.MAPPING file.var, OFF will suppress this mark mapping process until a subsequent MARK.MAPPING file.var, ON statement or the file is closed.

 

The MARK.MAPPING file.var, expr format of this statement is equivalent to MARK.MAPPING file.var, ON if the value of expr is non-zero and MARK.MAPPING file.var, OFF if expr is zero.

 

 

Example

 

MARK.MAPPING FILE.VAR, OFF

READ REC FROM FILE.VAR, ID ELSE STOP 'NOT FOUND'

 

This program fragment reads a record with mark translation suppressed.