Folgende Syntax wird für das WRITE Statement erkannt:
>>-WRITE--record-name-1--+------------------------+-------------> | (1) | '-FROM--identifier-1-----' >--+-+------------------------------------------------------------+--| phrase 1 |-+--> | '-+-BEFORE-+--+-----------+--+-+-identifier-2-+--+-------+-+-' | | '-AFTER--' '-ADVANCING-' | '-integer-1----' +-LINE--+ | | | | '-LINES-' | | | +-mnemonic-name-1-------------+ | | '-PAGE------------------------' | '-| invalid_key |--| not_invalid_key |-----------------------------------------' >--+-----------+----------------------------------------------->< '-END-WRITE-' phrase 1 |--+-------------------------------------------------+----------> '-+----+--+-END-OF-PAGE-+--imperative-statement-3-' '-AT-' '-EOP---------' >--+------------------------------------------------------+-----| '-NOT--+----+--+-END-OF-PAGE-+--imperative-statement-4-' '-AT-' '-EOP---------' invalid_key |--+------------------------------------------+-----------------| '-INVALID--+-----+--imperative-statement-1-' '-KEY-' not_invalid_key |--+----------------------------------------------+-------------| '-NOT INVALID--+-----+--imperative-statement-2-' '-KEY-'
Format 2: WRITE statement for indexed and relative files
>>-WRITE--record-name-1--+----------------------+--+-------------------------------------------+--> |--FROM--identifier-1--| |--INVALID--+-----+-imperative-statement-1-| |-KEY-| >--+----------------------------------------------+--+-------------+-->< |--NOT INVALID--+-----+--imperative-statement-2--| |--END-WRITE--| |-KEY-|
Format 3: WRITE statement for line-sequential files
>>-WRITE--record-name-1--+----------------------+-> |--FROM--identifier-1--| >-+---------------------------------------------------------------+--+-------------+--> |--AFTER--+-------------+--+--+--identifier-2-+--+---------+-+--| |--END-WRITE--| |--ADVANCING--| | |--integer-1----| |--LINE---| | | |--LINES--| | |---------PAGE--------------------|