RM/COBOL Syntax Summary (Second Edition)
Total Page:16
File Type:pdf, Size:1020Kb
Liant Software Corporation RM/COBOL ® Syntax Summary Second Edition This document provides complete syntax for all RM/COBOL commands, divisions, entries, statements, and other general formats. Use this pamphlet in conjunction with the RM/COBOL Language Reference Manual and the RM/COBOL User's Guide. The RM/COBOL Syntax Summary has been prepared for all implementations of RM/COBOL. Consult the RM/COBOL User's Guide for all appropriate operating system rules and conventions (such as command line invocation). No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, photocopied, recorded, or otherwise, without prior written permission of Liant Software Corporation. The information in this document is subject to change without prior notice. Liant Software Corporation assumes no responsibility for any errors that may appear in this document. Liant reserves the right to make improvements and/or changes in the products and programs described in this guide at any time without notice. Companies, names, and data used in examples herein are fictitious unless otherwise noted. The software described in this document is furnished to the user under a license for a specific number of uses and may be copied (with inclusion of the copyright notice) only in accordance with the terms of such license. Copyright © 1985-2008 by Liant Software Corporation. All rights reserved. Printed in U.S.A. Liant Software Corporation 5914 West Courtyard Dr., Suite 100 Austin, TX 78730-4911 U.S.A. Phone (512) 343-1010 (800) 762-6265 Fax (512) 343-9487 Web site http://www.liant.com RM, RM/COBOL, RM/COBOL-85, Relativity, Enterprise CodeBench, RM/InfoExpress, RM/Panels, VanGui Interface Builder, CodeWatch, CodeBridge, Cobol-WOW, WOW Extensions, InstantSQL, Xcentrisity, XML Extensions, Liant, and the Liant logo are trademarks or registered trademarks of Liant Software Corporation. IBM and Macro Assembler/2 are trademarks or registered trademarks of International Business Machines Corporation. Microsoft, MS, MS-DOS, Windows 98, Windows Me, Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, and Visual Basic are trademarks or registered trademarks of Microsoft Corporation in the USA and other countries. Novell and NetWare are trademarks or registered trademarks of Novell, Incorporated. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd. All other products, brand, or trade names used in this publication are the trademarks or registered trademarks of their respective trademark holders, and are used only for explanation purposes. Documentation Release History for the RM/COBOL Syntax Summary: Document Edition Number Applies To Product Version Publication Date Second RM/COBOL version 12 and later October 2008 First RM/COBOL version 9 January 2005 Important Liant documentation is provided in Adobe PDF. All manuals are distributed in Adobe Acrobat (.PDF) format and require the Adobe Acrobat Reader, 6.0 or higher, in order to display them. The installation program for the Adobe Acrobat Reader is available from the Adobe web site at: www.adobe.com. Contents Contents RM/COBOL Commands........................................................................... 1 Compile Command....................................................................................................................1 Runtime Command....................................................................................................................3 Debug Command .......................................................................................................................5 RM/COBOL Language Syntax................................................................. 8 Source Program General Format................................................................................................8 Identification Division General Format .....................................................................................8 Environment Division General Format......................................................................................9 File Control Entry General Formats .................................................................................12 Data Division General Format .................................................................................................14 file-description-entry ........................................................................................................15 sort-merge-file-description-entry......................................................................................16 record-description-entry....................................................................................................16 77-level-description-entry.................................................................................................16 data-description-entry.......................................................................................................16 communication-description-entry.....................................................................................19 screen-description-entry....................................................................................................20 Procedure Division General Formats.......................................................................................23 Procedure Division Verbs........................................................................................................24 ACCEPT Statement..........................................................................................................24 ADD Statement.................................................................................................................27 ALTER Statement ............................................................................................................28 CALL Statement...............................................................................................................28 CALL PROGRAM Statement ..........................................................................................29 CANCEL Statement .........................................................................................................29 CLOSE Statement.............................................................................................................30 COMPUTE Statement ......................................................................................................30 CONTINUE Statement.....................................................................................................30 DELETE Statement ..........................................................................................................31 DELETE FILE Statement.................................................................................................31 DISABLE Statement ........................................................................................................31 DISPLAY Statement ........................................................................................................31 DIVIDE Statement............................................................................................................33 ENABLE Statement..........................................................................................................34 ENTER Statement ............................................................................................................34 EVALUATE Statement ....................................................................................................35 EXIT Statement ................................................................................................................36 GOBACK Statement ........................................................................................................36 GO TO Statement .............................................................................................................37 IF Statement......................................................................................................................37 INITIALIZE Statement.....................................................................................................38 INSPECT Statement .........................................................................................................38 RM/COBOL Syntax Summary v Second Edition Contents MERGE Statement ...........................................................................................................40 MOVE Statement..............................................................................................................40 MULTIPLY Statement .....................................................................................................41 OPEN Statement...............................................................................................................41 PERFORM Statement.......................................................................................................42 PURGE Statement ............................................................................................................43 READ Statement ..............................................................................................................44 RECEIVE Statement ........................................................................................................44 RELEASE Statement........................................................................................................45