COBOL 128 Software System - VTDA

Transcription

COBOL 128 Software SystemBy K. A. AlexanderPublished byAbacus ;mHHHI Software

Copyright NoticeAbacus Software makes this package available for use on a singlecomputer only. It is unlawful to copy any portion of this softwarepackage onto any medium for any purpose other than backup. It isunlawful to give away or resell copies of this package. Anyunauthorized distribution of this product deprives the authors oftheir deserved royalties. For use on single-site multiple computers,please contact Abacus Software to make arrangements.WanantyAbacus Software makes no warnings, expressed or implied, as tothe fitness of this software package for any particular purpose. Inno event will Abacus Software be liable for consequential damages.Abacus Software will replace any copy of this software which isunreadable, if returned within 30 days of purchase. Thereafter,there will be a nominal charge for replacement.First printingPrinted in U.S.A.Copyright 1984Copyright 1986ISBN#July 1986K.A. Alexander, Visionary SoftwareAbacus Software, Inc.P.O. BOX 7219Grand Rapids, MI. 495100-916439-78-X

( COBOL 128 Supplement )

COBOL 128Abacus SoftwareICOBOL 64 AND COBOL 128 - DIFFERENCESThe manuals for COBOL 64 and COBOL 128 are the same. Thereare a few minor differences in the two versions:COBOL64CORD program overlayCOEDIT program overlayCOSYN program overlayCOSYNP program overlayload proceduremonitor or televisionCOBOL128in memoryin memoryin memoryin memoryRUN "VSLOADER"40 or 80 column monitor/TVAny references to COBOL 64 throughout this manual also apply toCOBOL 128.IICONVERTING COBOL 64 CODE TO COBOL 128To convert a COBOL 64 programs to run on the Commodore 128using COBOL 128, follow the procedures listed below.1. With COBOL 64 on a C-64 (C-128 in C-64 mode), createa sequential file of the program by using the CRUNCHoption from the MAIN MENU. The filename is prefixed bythe letters cs (for COBOL Sequential).2. Load and run COBOL 128. Replace the COBOL 128distribution diskette with a diskette containing thesequential file.3. Enter CRIP RETURN (for CRUNCH input).4. Now enter the filename without the cs prefix followed by RETURN .

Abacus SoftwareCOBOL 1285. The crunched file is then converted to a format compatibleto COBOL 128.IIICONVERTING COBOL 128 CODE TO COBOL 64To convert a COBOL 128 programs to run on the Commodore 64using COBOL 64, follow the procedures listed below.1. With COBOL 128 on a C-128, create a sequential file ofthe program by using the CRUNCH option from the MAINMENU. The filename is prefixed by the letters cs (forCOBOL Sequential).2. Load and run COBOL 64. Replace the COBOL 64distribution diskette with a diskette containing thesequential file.3. Enter CRIP RETURN (for CRUNCH input).4. Now enter the filename without the cs prefix followed by RETURN .5. The vs ED IT program overlay will now run. WhenVSEDIT is done, press any key to continue.6. The crunched file is then converted to a format compatibletoCOBOL64.

PREFACEIt is assumed that the readers of this manual are familiar with theCommodore 64 computer and general programming techniques.The names used in this publication are not of individuals living orotherwise. Any similarity or likeness of the names used in thispublication with the names of any individuals, living or otherwise,is purely coincidental and not intentional.Abacus Software believes that the information described in thismanual is accurate and reliable, and much care has been taken in itspreparation. However, no responsibility, financial or otherwise, isaccepted for any consequences arising out of the use of thismaterial. The information contained herein is subject to change.ACKNOWLEDGEMENTCOBOL is an industry language and is not the property of anycompany or group of companies, or of any organization or groupof organizations.No warranty, expressed or implied, is made by any contributor orby the CODASYL Programming Language Committee as to theaccuracy and functioning of the programming system and language.Moreover, no responsibility is assumed by any contributor, or bythe committee, in connection therewith.The authors and copyright holders of the copyrighted material usedherein,Flow-matic (trademark of Sperry Rand Corporation).Programming for the UNIVAC I and II, Data Automation Systemscopyrighted 1958, 1959, by Sperry Rand Corporation; IBMCommercial Translator Form Number F 28-8013, copyrighted1959 by IBM;FACT, DSI 27A5260-2760, copyrighted 1960 byMinneapolis-Honeywell,have specifically authorized the use of this material in whole or inpart, in the COBOL specifications. Such authorization extends tothe reproduction and use of COBOL specifications in programmingmanuals or similar publications.

TABLE OF CONTENTSChapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 -IntroductionThe Nature of COBOL IN GENERALCOBOL AdvantagesCOBOL 64 Implementation NotesHardware ConsiderationCOBOL 64 Source LanguageSection 1--Program OrganizationSection 2--Language ConceptsSection 3--Editing FormatSection 4--IDENTIFICATION DIVISIONSection 5--ENVIRONMENT DIVISIONSection 6--DATA DIVISIONSection 7--PROCEDURE MERICGOTOIFMOVEMULTIPLYOPENPERFORMREADSETSTOP RUNSUBTRACTWRITEChapter 7 -- Start Up/Operating 93959698102103105108110112113115119

Chapter 8 -- Main E-OFFEXITBREAK TCOBOL 64 INT-ONPRINT-OFFRUNSAVEAPPENDIX A - Sample Program/ExercisesAPPENDIX B - Reserved WordsAPPENDIX C - Language SummaryAPPENDIX D - Sample 3134134134135135135136137143144146"""'.,,,""""

COBOL 64Abacus SoftwareCHAPTE RlINTRODUCTIONThis manual provides a complete description of the COBOL 64System as implemented for use on the Commodore 64 computer orequivalent. The COBOL 64 programming language is designedalong the guidelines of the American National Standards Institute(ANSI) X3.23-1974.The language is an easy to learn subset of the ANSI 1974 standardLevel 1 with appropriate extensions to utilize COMMODORE 64features as well as providing high level program debuggingcapabilities. With COBOL 64 there is no need for the user to beconcerned with machine language, memory addressing orhexadecimal notation. All debugging is performed at the sourcelanguage (symbolic) level as opposed to the machine languagelevel.The COBOL 64 software system is a combination of an Editor,Compiler, Interpreter and Symbolic Debugger. These features havebeen designed with ease of learning and ease of use in mind toprovide a powerful programming development tool for generalbusiness applications.Commodore 64 is a registered trademark of Commodore BusinessMachines, Inc.1

Abacus SoftwareCOBOL 64CHAP TER2THE NATURE OF COBOL IN GENERALCOBOL is the most widespread commercial programming languagein use today. The reasons for its vast success will be discussedbelow.The word COBOL is an abbreviation for .Common B.usinessQriented Language. It is a Business Oriented computer languagedesigned for commercial applications. The rules governing the useof the language make it applicable for commercial problems.COBOL is a comput er languag e that is common to manycomputers. That is most computers can process a COBOL programwith minor variations.The universality of COBOL, therefore, allows computer usersgreater flexibility. A company is free to use computers of differentmanufacturers while retaining a single programming language.Similarly, convers ion from one model compute r to a moreadvanced or newer one presents no great problem. Computers of afuture generation will also be equipped to use COBOL.Since its creation in 1959, the COBOL language has undergoneextensive refinement in an effort to make it more standardized TheAmerican National Standards Institute (ANSI), an association ofcomputer manufacturers and users, has developed an industry-widestandard COBOL.Thus the meaning of the word COBOL suggests two of its basicadvantages. It is common to most compute rs, and it iscommercially oriented. There are, however, additional reasonswhy it is such a popular language.COBOL is an English-like language. All instructions are codedusing English words rather than complex codes. To add twonumbers together, for example, we use the word ADD. Anotherexample of a COBOL statement is:2"'111

COBOL 64Abacus SoftwareMULTIPLY HOURS-WORKED BY HOURLY-WAGE GIVING GROSS-WAGES The rules for programming in COBOL conform to many of therules for writing in English, making it a relatively simple languageto learn. It, therefore, becomes significantly easier to trainprogrammers. In addition, COBOL programs are written andtested in far less time than programs written in other computerlanguages.Thus the English-like quality of COBOL makes it easy to writeprograms. Similarly, this quality makes COBOL programs easierto read. Such programs can generally be understood by non-dataprocessing personnel. The business executive who knows littleabout computers can better understand the nature of a programmingjob simply by reading a COBOL program.3

Abacus SoftwareCOBOL 64CHA PTER 3COBO L ADVA NTAG ESThe long list of COBO L advantages is derived chiefly from itsintrinsic quality of permitting the programmer to state the problemsolution in English prose, and thus provide automatic program andsystem documentation. When users adopt well-chosen data-namesbefore attempting to program a system, maximum documentationaladvantages of the language described herein are obtained.To a compu ter user, COBO L 64 offers the following majoradvantages:1. Expeditious means of program implementation providing ahigh degree of programmer productivity.2. Accelerated programmer training and simplified retrainingrequirements.3. Reduced conversion costs when changing from a computerof one manufacturer to that of another.4. Significant ease of program modification/enhancementsdue to the high level of readability.5. Documentation which facilitates nontechnical managementparticipation in data processing activities.6. A comprehensive source program diagnostic capabilitywhich includ es tracing, break points and single stepfeatures.4

COBOL 64Abacus SoftwareCHAPT ER4COBOL 64 IMPLEM ENTATI ON NOTESA program written in COBOL 64, called a source program, isaccepted as input by the COBOL 64 software system. The systemverifies that each source statement is syntactically correct, and thenconverts them into an intermediate condensed representation.The intermediate program can then be executed on the Commodore64 System using the COBOL 64 Interpreter. The interpreter causesthe system hardware to perform the operations specified by theintermediate program and thus the source program.5

Abacus SoftwareCOBOL 64CHAPTER SHARDWAR E CONSIDERA TIONSCOMMODORE 64 Computer or equivalent (BASIC V2)One to four Commodore 1541 disk drives or equivalentOne optional Commodore 1525 printer or equivalent6

COBOL 64Abacus SoftwareCHAP TER6SECTION 1 PROGRAM ORGANIZATIONCOBOL 64 SOURCE PROGRAM DIVISIONSEvery COBOL 64 source program must contain these fourdivisions in the following order:IDENTI FICATI ONENVIRONMENTDATAPROCED UREThe IDENTI FICATI ON DIVISI ON identifies the program. Inaddition to required information, the programmer may include suchoptional pieces of information as the date written and programmer'sname for documentation purposes. This division is completelymachine-independent.The ENVIRO NMENT DIVISI ON specifies the equipment beingused. It contains computer descriptions and some informationabout the files the program will use.The DATA DIVISI ON contains not only file and recorddescriptions describing the data files that the program manipulatesor creates, but also the individual logical records which comprisethese files. The characteristics or properties of the data aredescribed in relation to a standard data format rather than anequipment-oriented format. Therefore, this division is to a largeextent, comput er-indep endent. While compati bility amongcomputers cannot be absolutely assured, careful planning in thedata layout will permit the same data descriptions, with minormodification, to apply to more than one computer.The PROCED URE DIVISI ON specifies user-supplied steps forcomput er execution. These steps are express ed in terms ofmeaningful English words, statements, sentences, and paragraphs.This division of a COBOL 64 program is often referred to as the7

Abacus SoftwareCOBOL 64"program". In reality, it is only part of the total program, and aloneis insufficient to describe the entire program. This is true becauserepeated references must be made (either explicitly or implicitly) toinformation appearing in the other divisions. This division, morethan any other, allows the user to express thoughts in meaningfulEnglish. Concepts of verbs to denote actions, and sentences todescri be proced ures are basic, as is the use of condit ionalstatements to provide alternative paths of action.REQU IRED HEADERSThe standard for COBO L 64 requires that a program consist ofcertain divisions, sections, and fixed paragraph names known asheaders.The following elements are the minimum required for a COBOL 64program:IDENT IFICA TION DIVIS ION.PROGRAM-ID. MINIMUM.ENVIRONMENT DIVIS ION.CONFIGURATION SECTI ON.SOURCE-COMPUTER C64.OBJECT-COMPUTER C64.DATA DIVIS ION.PROCEDURE DIVIS ION.STARTUP.STOP RUN.8

COBOL 64Abacus SoftwareSECTIO N 2LANGUAGE CONCEPTSGENER ALAs stated in Section 1, COBOL 64 is a language based on Englishand is composed of words, statements, sentences, and paragraphs.The following paragraphs define the rules to be followed in thecreation of this language. The use of the different constructsformed from the created words is covered in subsequent sections ofthis document.LANGUAGE DESCR IPTION NOTATIONA nearly universal form of notation exists for COBOL referencemanuals. This manual uses that notation as described in theparagraphs that follow.The apostrophe ( ' ) is used to delimit characters with specificmeaning. Other than its use in this manual as a delimiter, it has nospecific use in the COBOL language.KEYWORDSAll underlined upper-case words are key words and arerequired when utilizing related functions. Omissions ofkey words will cause error conditions at compilation time.An example of key words follows:IFdata-nameIS[NOT] {NUMERIC}ALPHABETICThe key words are I F , N o T , N u ME R I c , andALPHAB ETIC.9

Abacus SoftwareCOBOL 64OPTIONAL WORDSAll upper case words not underlined are optional wordsincluded for readability only and may be included orexcluded in the source program. In the preceding example,the optional word is IS. .,,GENER IC TERMSAll lower-case words represent generic terms which areused to represent COBOL w rds, literals, PI CT UREcharact er-strin gs, commen t-entrie s, or a comple tesyntactical entry that must be supplied in that formatposition by the programmer. Where generic terms arerepeated in a general format, a number or letter appendageto the term serves to identify that term for explanation ordiscussion.Identifier-1 and identifier-2 are generic terms in thisexample:MOVE identi fier-1 TO identi f ier-2BRACE SThe following symbols are braces: { } . When words orphrases are enclosed in braces, a choice of one of theentries must be made. In the previous example in thesubsect ion titled Keywor ds, either NUMER I c orALPHAB ETIC must be included in the statement.BRACK ETSThe following symbols are brackets: [ ] . Words andphrases enclosed in brackets represent optional portions ofa statement. A programmer wishing to include the optionalfeature may do so by including the entry shown betweenbrackets. Otherwise, the optional portion may be omitted.[NOT J in the example titled Keywords, is optional.10"""'11

COBOL 64Abacus SoftwareLEVEL-NUMBERSWhen specific level-numbers appear in data descriptionentry formats those specific level-numbers are requiredwhen such entries are used in a COBO L 64 program. Inthis docum ent, the form O1, O2, . , O 9 is used toindicate level-numbers 1 through 9.ELLIP SISThe presen ce of the ellipsis (three consec utiveperiods ( . ) within any format indicates the position atwhich repetition may occur at the programmer's option.The portion of the format that may be repeated is defined inthe following paragraph.The ellipsis applies to the words between the determinedpair of delimiters. Given the ellipsis in a clause orstatement format, scanning right to left, determine the rightbracke t or right brace immediately to the left of the . ;continue scanning right to left and determine the logicallymatching left bracket or left brace.11

Abacus SoftwareCOBOL 64CHARACTER SETThe COBOL 64 character set for the COBOL 64 Systemconsists of the following 46 characters:O through 9A through Zblank or space plus sign- minus sign or hyphen* asteriskI slash currency sign. period or decimal point" quotation mark( left parenthesis) right parenthesisCHARACTERS USED FOR WORDSThe character set for words consists of the following 3 7characters:0 through 9through z- (hyphen)APUNCTUATION CHARACTERSThe following characters may be used for programpunctuation:" quotation mark( left parenthesis) right parenthesisspace or blank. period12

COBOL 64Abacus SoftwareEDITING CHARAC TERSThe COBOL 64 System accepts the following characters inediting:currency sign* asterisk (check protect)comma'I slashB space or blank insert0 zero insert plus signminus signCR creditDB debitz zero suppressperiod LANGUA GE STRUCTU REThe individual characters of the language are concatenatedto form character-strings and separators. A separator maybe concatenat ed with another separator or with acharacter-string.A character-s tring may only be concatenat ed with aseparator. The concatenat ion of character-s trings andseparators forms the text of a source program.SEPARAT ORSA separator is a string of one or more punctuatio ncharacters. The rules for formation of separators are:1.The punctuation character space is a separator. Anywherea space is used as a separator, more than one space may beused.2. The punctuatio n character period is a separator whenimmediately followed by a space.13

Abacus SoftwareCOBOL 643. The punctuation character quotation mark is a separator.An opening quotation mark must be immediately precededby the separator space, a closing quotation mark must beimmediately followed by one of the separators space orperiod followed by a space. Quotation marks may appearonly in balanced pairs delimiting nonnumeric literals exceptwhen the literal is continued.4. The punctuation characters right and left parentheses areseparators. Parentheses may appear only in balanced pairsof left and right parenthe ses delimiti ng subscripts orindices. The right parentheses must be followed by aspace.5. The separator space may optionally immediately follow anyseparator except the opening quotation mark. In this case,a following space is considered as part of the nonnumericliteral and not as a separator.Any punctuation character which appears as part of thespecification of a PI CT URE character-string or numericliteral is not considered as a punctuation character, butrather as a symbol used in the specific ation of thatPICTUR E character-string or numeric literal. PICTUR Echaracter-strings are delimited only by the separators spaceor period followed by a space.The rules established for the formation of separators do notapply to the characters which compris e the contents ofnonnumeric literals, comment-entries, or comment lines.CHARA CTER- STRIN GSA character-string is a character of sequence of contiguouscharacte rs which forms a COBOL 64 word, literal,PICTU RE characte r-string , or commen t-entry. Acharacter-string is delimited by separators.14"'11111

COBOL 64Abacus SoftwareDEFINITION OF WORDSA COBOL 64 word is created from a combination of notmore than 30 characters, selected from the following:O through 9through z- (hyphen)AA word is ended by a valid separator. A word may notbegin or end with a hyphen. (A literal constitutes anexception to these rules, as explained in a paragraphentitled Literals in this section.) A word must begin withan alphabetic character.A user-defined word is a COBOL 64 word that must besupplied by the user to satisfy the format of a clause orstatementTYPES OF WORDSCOBOL 64 contains the following word types:nouns (user-defined words)verbsreserved words.15

Abacus SoftwareCOBOL 64NOUN SNouns are divided into special meIndex-nameParagraph-nameThe length of a noun must not exceed 30 characters. Forpurposes of readability, a noun may contain one or morehyphens. However, the hyphen must neither begin norend the noun (this does not apply to literals).All nouns within a given category must be unique, becauseno other noun in the same source program has identicalspelling or punctuation. All user-defined words mustbegin with an alphabetic character.File-N ameA file-name is a noun assigned to designate a set of dataitems. The contents of a file are divided into logicalrecords made up of any consecutive set of data items.Record -NameA record-name is a noun assigned to identify a logicalrecord. A record can be subdivided into a set of dataitems, each distinguishable by a data-name.Data-N ameA data-name is a noun assigned to identify elements withina record or work area and is used in COBOL 64 to refer toan element of data, or to a defined data area containing dataelements.16'tfllll

COBOL 64Abacus SoftwareIndex-NameAn index-name is a word that names an index associatedwith a specific table (refer to Indexing in this section). Anindex is a register, the contents of which represent thecharacter position of the first character of an element of atable with respect to the beginning of the table.Paragraph-NameA paragraph-name is a word which names a paragraph inthe PROCEDURE DIVISION.VerbsA verb in COBOL 64 is a single word that denotes action,such as ADD, WRITE, or MOVE. All allowable verbs inCOBOL 64, with the exception of the word IF, are Englishverbs. The usage of the COBOL 64 verbs takes placewithin the PROCEDURE DIVISION.17

Abacus SoftwareCOBOL 64RESERVED WORDSA reserved word is a COBOL 64 word that is one of aspecified list of words which may be used in COBOL 64source programs, but must not appear in the programs asuser-defined words. Refer to Appendix B, ReservedWords.These rules apply to the entire COBOL 64 source program;no exceptions exist for specific divisions or statements.There are two types of reserved words:Key wordsOptional wordsKEY WORDSA key word is a word whose presence is required in asource program. Within each format, such words areupper-case and underlined.Key words are of three types:1.Verbs such as ADD and READ.2. Required words which appear in statement and entryformats.3. Words which have a specific functional meaning suchas SECTION.OPTIONAL WORDSOptional words are included in the COBOL 64 language toimprove the readability of the statement formats. Theseoptional words may be included or omitted. For example,IF A IS GREATER THAN B . is equivalent to IF AGREATER B ; the inclusion or omission of the wordsIs and THAN does not influence the logic of the statement.18

COBOL 64Abacus SoftwareLITERALSA literal is an item of data whose value is implied by anordered set of characters of which the literal is composed.There are two classes of a literal: numeric andnonnumeric.NUMERIC LITERALA numeric literal is a character-string whose characters areselected from the digits O through 9, the plus sign ( ),theminus sign (-), and/or the decimal point. Numeric literalsmay be from 1 to 18 digits in length. The rules for theformation of numeric literals are as follows:1. A numeric literal must contain at least one digit2. A numeric literal must not contain more than one signcharacter. If a sign is used, it must appear as theleftmost character of the literal. If the literal isunsigned, the literal is positive.3. A numeric literal must not contain more than onedecimal point. The decimal point is treated as anassumed decimal point, and may appear anywherewithin the literal except as the rightmost character. Ifthe literal contains no decimal point, the literal is aninteger. An integer is a numeric literal which containsno decimal point.If a literal conforms to the rules of the formation ofnumeric literals, but is enclosed in quotation marks, itis a nonnumeric literal and is treated as such by thesystem.4. The value of a numeric literal is the algebraic quantifyrepresented by the characters in the numeric literal.Every numeric literal belongs to category numeric.Refer to the P I c Tu RE clause in Section 6 foradditional information. The size of a numeric literal instandard data format characters is equal to the number19

Abacus SoftwareCOBOL 64of digits specified by the user. The following areexamples of numeric literals:51678.005 2.629-.84796287.92NONNUM ERIC LITERALA nonnumeric literal may be composed of any allowablecharacter. The beginning and ending of a nonnumericliteral are both denoted by a quotation mark. Any characterenclosed within quotation marks is part of the nonnumericliteral. Subsequen tly, all spaces enclosed within thequotation marks are considered part of the literal. Twoconsecutive quotation marks within a nonnumeric literalcause a single quotation mark to be inserted into the literalstring.All other punctuation characters are part of the value of thenonnumeric literal rather than separators; all nonnumericliterals belong to category alphanumeric. Refer to thePICTURE clause in Section 6.A nonnumeri c literal cannot exceed 120 characters.Examples of nonnumeric literals are:Literal on Source Program Level Literal Stored by System"THE TOTAL PRICE""-2080.4 79"THE TOTAL PRICE-2080.47 9"A""B"A"BLiterals that are used for arithmetic computation must beexpressed as numeric literals and must not be enclosed inquotation marks as nonnumeric literals. For example," 4 . 4 " and 4 . 4 are not equivalent. The system stores thenonnumeric literal as 4 . 4, whereas the numeric literalwould be stored as 0044 ifthe PICTURE were 999V9,20. ,,

Abacus SoftwareCOBOL 64with the assumed decimal point located between the twofours.'-"LOGICAL RECORD AND FILE CONCEPTSThe purpose of defining file information is to distinguishbetween the physical aspects of the file and the conceptualcharacteristics of the data contained within the file.PHYSICAL ASPECTS OF A FILEThe physical aspects of a file describe the data as it appearson the input or output media and include such features as:1. The grouping of logical records within the physicallimitations of the file medium.2. The means by which the file can be identified.CONCEPTUAL CHARACTERISTICS OF A FILEThe conceptual characteristics of a file are the explicitdefinition of each logical entity within the file itself. In aCOBOL 64 program, the input or output statements refer toone logical record.It is important to distinguish between a physical record anda logical record. A COBOL 64 logical record is a group ofrelated information, uniquely identifiable, and treated as aunit.A physical record is a physical unit of information whosesize and recording mode are adapted to a particularcomputer for the storage of data on a input or outputdevice. The size of a physical record is hardwaredependent and has no direct relationship to the size of thefile of information contained on a device.The concept of a logical record is not restricted to file databut is carried over into the definition of working storage.21

Abacus SoftwareCOBOL 64Working storage may be grouped into logical records anddefined by a series of record description entries.RECORD CONCEPTSThe record description consists of a set of data descriptionentries which describe the characteristics of a particularrecord. Each data description entry consists of alevel-number followed by a data-name, if required,followed by a series of independent clauses, as required.CONCEPT OF LEVELSA level concept is inherent in the structure of a logicalrecord. This concept arises from the need to specifysubdivisions of a record for the purpose of data reference.Once a subdivision has been specified, it may be furthersubdivided to permit more detailed data referral.DATA DESCRIPTION CONCEPTSThe most basic subdivisions of a record, those not furthersubdivided, are called elementary items; consequently, arecord is said to consist of a sequence of elementary items,or the record itself may be an elementary item.In order to refer to a set of elementary items, theelementary items are combined into groups. Each groupconsists of a named sequence of one or more elementaryitems. Groups, in tum, may be combined into groups oftwo or more groups. An elementary item may belong tomore than one group.22

COBOL 64Abacus SoftwareLEVEL -NUMB ERSA system of level-numbers shows the organization ofelementary items and group items. Since records are themost inclusive data items, level-numbers for records startat 01. Less inclusive data items are assigned higher (notnecessarily successive) level-numbers not greater in valuethan 10. There is a special level-number 77 which is anexception to this rule. Separate entries are written in thesource program for each level-number used.A group includes all group and elementary items followingit until a level-nu mber less than or equal to thelevel-number of that group is encountered. All itemswhich are immediately subordinate to a given group itemmust be described using identical level-numbers greaterthan the level-number used to describe that

To convert a COBOL 128 programs to run on the Commodore 64 using COBOL 64, follow the procedures listed below. 1. With COBOL 128 on a C-128, create sequential file of the program by using CRUNCH option from MAIN MENU. The filename is prefixed by the letters cs (for COBOL Sequential). 2. Load and run COBOL 64.