Graphic Art

Cobol Tables Introduction

beloved language cobol for pure cinnamon only
of 23
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
  Tables 1 TABLES () ã  group of storage locations (i.e. elements) with the same name ã  accessed by name and subscript ex. var-name (sub) ã  similar to arrays in other languages  Tables 2 ã Integer values from 1 to occurs clause value (specifies maximum value) ã Up to 7 subscripts are permitted in COBOL ã Subscripts are listed in parenthesis following the table name ã Each time the value of a subscript changes, data-name (sub) refers to a different element in the array ã Using a data-name as a subscript enables its contents to be varied ã Relative subscripting is used when what is in parenthesis can be an arithmetic expression ã if using subscript constants (named or literal) compiler will detect error ã if using subscript variables, error won't be detected until run-time ã Defines the number of elements in the table for each level ã Defines the maximum subscript for each level ã Up to seven levels of OCCURS permitted in COBOL ã Can not be used on 01 level item OCCURS Clause SUBSCRIPTS  Tables 3 TABLE examples If item defined by OCCURS has PIC clause, it defines a series of elementary items 01 Totals. 05 Month-Totals Occurs 12 Times Pic 9(5)V99. For your information When a variable name has an OCCURS clause on it or above it with a smaller level number, it must have one subscript when referencing that memory location for each OCCURS.  Tables 4 TABLE examples Identifier used with OCCURS may also be group item 01 Tax-Table. 05 Group-X Occurs 20 Times. 10 City Pic X(6). 10 Tax-Rate Pic V999.
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks