IB Statements/rewrite
From CometWiki
(Difference between revisions)
Badge (Talk | contribs)
(New page: '''REWRITE statement''' '''Syntax:''' REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label] '''Discussion:''' The REWRITE statement functions just like the WRITE s...)
Newer edit →
(New page: '''REWRITE statement''' '''Syntax:''' REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label] '''Discussion:''' The REWRITE statement functions just like the WRITE s...)
Newer edit →
Revision as of 10:33, 20 May 2009
REWRITE statement
Syntax: REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label]
Discussion: The REWRITE statement functions just like the WRITE statement, except that an exception is reported if the record does not already exist. REWRITE can be used only on keyed files.
Example: REWRITE (1,400) KEY=KEYNO$,EXCP=1600
In this example, the REWRITE statement is used to rewrite the data record defined in format-statement-label 400. If the record does not already exist, the exception branch is taken.