IB Statements/rewrite

From CometWiki

< IB Statements(Difference between revisions)
Jump to: navigation, search
(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...)
 
Line 1: Line 1:
'''REWRITE statement'''  
'''REWRITE statement'''  
-
'''Syntax:'''  REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label]   
+
'''Syntax:'''  REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label | NOEXCP]   
'''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.   
'''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.   

Latest revision as of 22:21, 28 May 2009

REWRITE statement

Syntax: REWRITE (lun, format-statement-label) KEY=index [,EXCP=statement-label | NOEXCP]

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.

Personal tools