Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

6.1.7.1 Imperative Statements



An imperative statement either specifies an unconditional action to be taken by the program, or is a conditional statement terminated by its explicit scope terminator (see "Delimited Scope Statements" in topic 6.1.7.3). A series of imperative statements can be specified whenever an imperative statement is allowed. A conditional statement that is terminated by its explicit scope terminator is also classified as an imperative statement (see "Delimited Scope Statements" in topic 6.1.7.3). Table 32 lists COBOL imperative statements.


 Table 32. Imperative Statements                                           
 Arithmetic                                                                
           ADD(1)                                                          
           COMPUTE(1)                                                      
           DIVIDE(1)                                                       
           MULTIPLY(1)                                                     
           SUBTRACT(1)                                                     
 Data Movement                                                             
           ACCEPT (DATE,DAY,DAY-OF-WEEK,TIME)                              
           INITIALIZE                                                      
           INSPECT                                                         
           MOVE                                                            
           SET                                                             
           STRING(2)                                                       
           UNSTRING(2)                                                     
 Ending                                                                    
           STOP RUN                                                        
           EXIT PROGRAM                                                    
RevisionX            EXIT METHOD                                                     
RevisionX            GOBACK                                                          
 Input-Output                                                              
           ACCEPT identifier                                               
           CLOSE                                                           
           DELETE(3)                                                       
           DISPLAY                                                         
           OPEN                                                            
           READ(4)                                                         
           REWRITE(3)                                                      
           START(3)                                                        
           STOP literal                                                    
           WRITE(5)                                                        
 Ordering                                                                  
           MERGE                                                           
           RELEASE                                                         
           RETURN(6)                                                       
           SORT                                                            
 Procedure Branching                                                       
           ALTER                                                           
           EXIT                                                            
           GO TO                                                           
           PERFORM                                                         
 Program  or Method  Linkage                                               
           CALL(7)                                                         
           CANCEL                                                          
RevisionX            INVOKE                                                          
 Table Handling                                                            
           SET                                                             
 Note:                                                                     
                                                                           
 (1) Without the ON SIZE ERROR and/or the NOT ON SIZE ERROR phrase.        
 (2) Without the ON OVERFLOW and/or the NOT ON OVERFLOW phrase.            
 (3) Without the INVALID KEY and/or the NOT INVALID KEY phrase.            
 (4) Without the AT END, NOT AT END, INVALID KEY, and/or  NOT INVALID KEY  
     phrases.                                                              
 (5) Without the INVALID KEY, NOT INVALID KEY, END-OF-PAGE, and/or NOT     
     END-OF-PAGE phrases.                                                  
 (6) Without the AT END and/or NOT AT END phrase.                          
 (7) Without the ON OVERFLOW phrase, and without the ON EXCEPTION and/or   
     NOT ON EXCEPTION phrase.                                              




Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.