COBOL Programming O Palgrave Master Series

Total Page:16

File Type:pdf, Size:1020Kb

COBOL Programming O Palgrave Master Series Mastering COBOL Programming o Palgrave Master Series Accounting Geography Accounting Skills German Advanced English Language Global Information Systems Advanced English Literature Human Resource Management Advanced Pure Mathematics Information Technology Arabic Internet Basic Management Italian Biology Java British Politics Management Skills BusinessCommunication Marketing Management Business Environment Mathematics C Programming Microsoft Office C++ Programming Microsoft Windows, Novell Chemistry NetWare and UNIX COBOL Programming Modern British History Communication Modern European History Modern United States History Computing Modern World History Counselling Skills Networks Counselling Theory Organisational Behaviour Customer Relations Pascaland Delphi Programming Database Design Philosophy Delphi Programming Physics Desktop Publishing Practical Criticism Economic and Social History Psychology Economics Shakespeare Electrical Engineering Social Welfare Electronic and Electrical Calculations Sociology Electronics Spanish Employee Development Statistics English Grammar Strategic Management English Language Systems Analysis and Design English Literature Team Leadership Fashion Buying and Merchandising Theology Management Twentieth Century Russian History Fashion Styling Visual Basic French World Religions www.palgravemasterseries.com Pa(grave MasterSeries SerIesStandln. Order ISBN 978-0-333-69343-4 (outsideNorth America only) Youcan receivefuture titles in this series as they are published by placinga standing order. Pleasecontact your bookselleror, in case of difficulty, write to us at the address below with your name and address, the title of the series and the ISBN quoted above. Customer ServicesDepartment, Macmillan DistributionLtd Houndmills, Basingstoke, Hampshire RG21 6XS, England Mastering COBOL o Progra......ing Second edition Roger Hutty Head ofComputer Science Department School ofComputing Sciences De Montfort University Leicester and Mary Spence Senior Lecturer Department ofInformation Systems School ofComputing Sciences De Montfort University Leicester Series Editor Timothy Davies Computer Consultant palgrave e Roger Hutty 1990. Roger Hutty and Mary Spence 1997 All rights reserved. No reproduction, copy or transmission of this publication may be made without writt",n permission. No paragraph of this publication may be reproduced, copied or transmitted save with written permission or in accordance with * the provisions of the Copyright, Des igns and Patents Act 1988, or under the terms of any licence permitting limited copying issued by the Copyright licensing Agency, 90 Tottenham Court Road. London wn 4LP. Any person who does any unauthorised act in relation to this publication may be liable to criminal prose<:ution and civil claims for damages. The authon hav!! asserted their rights to be identified as the authors of this work in accordance with the Copyright, Designs and Patents Act 1988. First edifion 1983 Reprinted five times Second edition 1997 Publisned by PALGRAVE Houndmills, 8asingstoke, Hampmire RG21 6XS and 175 Fifth Avenue, New York. N. Y. 10010 Companies and representatives throughout the world PALGRAVE is the new global academic imprint of St. Martin's Press LLC Scholarly and Reference Division and Palgrave Publishers Ltd (formerly Macmillan Press ltd). ISBN 978-0-333-68106-0 ISBN 978-1-349-14327-6 (eBook) 001 10.1057/9781349143276 This book Is printed on paper suitable for recycling and made from fully managed and sustained forest sources. A catalogue record for this book is available from the 8ritish Library. " 10 9 8 7 6 5 4 3 10 09 08 07 06 05 04 03 02 oContents Preface to the Second Edition xiii Acknowledgements xv List ofFigures xvi Part I NUCLEUS and SOURCE TEXT MANIPUlATION modules 1 COBOL programming fundamentals 1 1.1 COBOL computer systems 1 1.2 COBOL 85 programs 5 1.2.1 A simple COBOL program 5 1.2.2 General structure of a COBOL program 5 1.2.3 General structure of a line of COBOL code 7 1.2.4 Use of upper or lower case for code 8 1.2.5 Use of the full stop (or period) 8 1.3 Program development 9 1.4 The IDENTIFICAnON DIVISION 13 1.5 The ENVIRONMENT DIVISION 14 1.6 Chapter summary 15 1.7 Practical 16 2 DATA and PROCEDURE DIVISION fundamentals 17 2.1 The DATA DIVISION 17 2.2 Data item descriptions 18 2.2.1 Data names 18 2.2.2 The PICTURE clause 19 2.2.3 Data item level numbers 20 2.2.4 Data name qualification 22 2.2.5 The VALUE clause 23 2.2.6 Level 88 condit ion names 24 2.2.7 The USAGE clause 25 2.2.8 FILLER data names 26 2.2.9 Reference modification 26 2.2.10 The REDEFINES clause 27 2.3 The PROCEDURE DIVISION 28 2.4 Literals and figurative constants 30 2.5 The DISPLAY statement 31 Contents V 2.6 COBOL syntax format 33 2.7 The MOVE statement 33 2.7.1 To set a data item to a value 33 2.7.2 To copy one data item to another 35 2.7.3 To edit and unedit data 36 2.7.4 To copy many items at a time 36 2.7.5 To change between USAGEs 37 2.8 The INmALIZE statement 37 2.9 Chapter summary 38 2.10 Practical 39 3 Numbers and the SUBTRACT statement 42 3.1 ADD statement variations 42 3.1.1 ADDing several numbers 42 3.1.2 The GIVING option 44 3.2 Fractional numbers 46 3.2.1 The V PICTURE 46 3.2.2 The P PICTURE 47 3.2.3 The . PICTURE 48 3.3 Signed numbers 50 3.3.1 The S PICTURE 50 3.3.2 The + and - PICTUREs 52 3.3.3 The CR and DB PICTUREs 53 3.4 The SUBTRACT statement 54 3.5 The ROUNDED option 56 3.6 The SIZE ERROR option 57 3.7 Chapter summary 61 3.8 Practical 62 4 The MULTIPLY, DIVIDE and COMPUTE statements, further data editing 64 4.1 The MULTIPLY statement 64 4.2 The DIVIDE statement 65 4.2.1 The basic DIVIDE statement 66 4.2.2 The REMAINDER option 66 4.3 The arithmetic statements together 67 4.4 The COMPUTE statement 70 4.4.1 The basic COMPUTE statement and arithmetic operators 70 4.4.2 Order of precedence of the arithmetic operators 71 4.4.3 The ROUNDED and SIZE ERROR options 72 4.4.4 Example program, using exponentiation 72 4.5 Zero suppression using Z and * 74 4.6 Insertion pictures , B 0 / and $ 75 4.7 Floating pictures $ + - 76 4.8 The currency symbol and the decimal point 77 4.9 Chapter summary 78 4.10 Practical 79 5 The IF, GO TO and EVALUATE statements 81 5.1 The IF statement 81 5.2 Simple conditions 84 5.2.1 Relation conditions 84 vi Contents 5.2.2 Sign conditions 85 5.2.3 Class conditions 86 5.2.4 Condition name conditions 87 5.3 Nested IF statements 88 5.4 The NEXT SENTENCE and CONTINUE phrases 91 5.5 Complex conditions 92 5.5.1 Conditions with OR 92 5.5.2 Conditions with AND 93 5.5.3 Conditions with NOT 94 5.5.4 Abbreviated conditions 94 5.5.5 Conditions with both AND and OR 95 5.5.6 Conditions with level 88s 95 5.5.7 General rules when mixing AND, OR, NOT 96 5.6 The GO TO statement 96 5.7 The EVALUATE statement 97 5.7.1 Simple EVALUATE 98 5.7.2 Extended EVALUATE 99 5.7.3 Use of TRUE, FALSE and level88s 102 5.8 Statements and sentences 104 5.9 Collating sequences 105 5.10 Date and time 106 5.10.1 ACCEPTing the date and time 107 5.10.2 Determining the century 109 5.10.3 Date comparisons, age calculations. etc 109 5.10.4 Leap year checks 110 5.10.5 Converting day of week and month to words 111 5.10.6 Converting to a 12-hour clock 111 5.11 Chapter summary III 5.12 Practical 112 6 PERFORMing 114 6.1 Modular programming 114 6.1.1 Using the PERFORM statement to organise a program 114 6.1.2 Using the PERFORM statement to reduce duplication of code 116 6.2 PERFORM ... TIMES 117 6.2.1 The basic statement 117 6.2.2 The statement with in-line coding 119 6.2.3 The statement with out-of-line coding 120 6.3 PERFORM ... UNTIL 121 6.3.1 The statement with in-line and out-of-line coding 121 6.3.2 The WITH TEST BEFOREIAFfER options 123 6.4 PERFORM ... VARYING 124 6.4.1 The basic statement 124 6.4.2 The WITH TEST BEFORE!AFfER options 126 6.4.3 Using the loop data item in the loop 126 6.4.4 Using a condition that does not reference the loop data item 128 6.5 The PERFORM stack 129 6.6 PERFORM ... THRU and EXIT 131 6.7 Data validation 133 6.7.1 Validation of data type 133 6.7.2 Validation of ranges or specific values 135 Contents vii 6.7.3 Complex validations 137 6.8 The PERFORM procedure structure 138 6.9 Debugging 140 6.10 Chapter summary 141 6.11 Practical 142 7 Lists 144 7.1 List definition 144 7.2 List input and output 146 7.3 List calculations 148 7.3.1 Calculating the average of a list of numbers 148 7.3.2 Calculating the standard deviation 149 7.3.3 Finding the highest and lowest entries 151 7.4 Sorting 152 7.5 Lists of lists 154 7.6 INDEXED BY 156 7.7 The AFTER phrase 158 7.8 Lists with VALUEs 158 7.9 Chapter summary 160 7.10 Practical 161 8 Tables 164 8.1 Table definition 164 8.2 Table searching 166 8.2.1 Searching for a unique entry 166 8.2.2 Searching for non-unique entries 168 8.3 Sorting tables 169 8.4 Look-up tables 171 8.5 The SEARCH statement 174 8.5.1 Searching for a unique entry 174 8.5.2 Searching for non-unique entries 175 8.5.3 SEARCH ALL and ordered tables 177 8.6 A table example 178 8.7 Initialising tables 183 8.8 Chapter summary 184 8.9 Practical 184 9 String manipulation 186 9.1 The STRING statement 186 9.1.1 Eliminating spare characters 187 9.1.2 The OVERFLOW phrase 189 9.1.3 The POINTER phrase 190 9.2 The UNSTRING statement 191 9.2.1 Dividing a simple string 192 9.2.2 The DELIMITED BY phrase 192 9.2.3 The DELIMITER, COUNT, POINTER, TALLYING and OVERFLOW phrases 193 9.3 The INSPECT statement 196 9.3.1 The TALLYING phrase 196 9.3.2 The REPLACING phrase 199 9.3.3 Using TALLYING and REPLACING together 200 9.3.4 The CONVERTING phrase 200 viii Contents 9.4 Chapter summary 202 9.5
Recommended publications
  • Cobol/Cobol Database Interface.Htm Copyright © Tutorialspoint.Com
    CCOOBBOOLL -- DDAATTAABBAASSEE IINNTTEERRFFAACCEE http://www.tutorialspoint.com/cobol/cobol_database_interface.htm Copyright © tutorialspoint.com As of now, we have learnt the use of files in COBOL. Now, we will discuss how a COBOL program interacts with DB2. It involves the following terms: Embedded SQL DB2 Application Programming Host Variables SQLCA SQL Queries Cursors Embedded SQL Embedded SQL statements are used in COBOL programs to perform standard SQL operations. Embedded SQL statements are preprocessed by SQL processor before the application program is compiled. COBOL is known as the Host Language. COBOL-DB2 applications are those applications that include both COBOL and DB2. Embedded SQL statements work like normal SQL statements with some minor changes. For example, that output of a query is directed to a predefined set of variables which are referred as Host Variables. An additional INTO clause is placed in the SELECT statement. DB2 Application Programming Following are rules to be followed while coding a COBOL-DB2 program: All the SQL statements must be delimited between EXEC SQL and END-EXEC. SQL statements must be coded in Area B. All the tables that are used in a program must be declared in the Working-Storage Section. This is done by using the INCLUDE statement. All SQL statements other than INCLUDE and DECLARE TABLE must appear in the Procedure Division. Host Variables Host variables are used for receiving data from a table or inserting data in a table. Host variables must be declared for all values that are to be passed between the program and the DB2. They are declared in the Working-Storage Section.
    [Show full text]
  • Modern Programming Languages CS508 Virtual University of Pakistan
    Modern Programming Languages (CS508) VU Modern Programming Languages CS508 Virtual University of Pakistan Leaders in Education Technology 1 © Copyright Virtual University of Pakistan Modern Programming Languages (CS508) VU TABLE of CONTENTS Course Objectives...........................................................................................................................4 Introduction and Historical Background (Lecture 1-8)..............................................................5 Language Evaluation Criterion.....................................................................................................6 Language Evaluation Criterion...................................................................................................15 An Introduction to SNOBOL (Lecture 9-12).............................................................................32 Ada Programming Language: An Introduction (Lecture 13-17).............................................45 LISP Programming Language: An Introduction (Lecture 18-21)...........................................63 PROLOG - Programming in Logic (Lecture 22-26) .................................................................77 Java Programming Language (Lecture 27-30)..........................................................................92 C# Programming Language (Lecture 31-34) ...........................................................................111 PHP – Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37)........................129 Modern Programming Languages-JavaScript
    [Show full text]
  • 10 Programming Languages You Should Learn Right Now by Deborah Rothberg September 15, 2006 8 Comments Posted Add Your Opinion
    10 Programming Languages You Should Learn Right Now By Deborah Rothberg September 15, 2006 8 comments posted Add your opinion Knowing a handful of programming languages is seen by many as a harbor in a job market storm, solid skills that will be marketable as long as the languages are. Yet, there is beauty in numbers. While there may be developers who have had riches heaped on them by knowing the right programming language at the right time in the right place, most longtime coders will tell you that periodically learning a new language is an essential part of being a good and successful Web developer. "One of my mentors once told me that a programming language is just a programming language. It doesn't matter if you're a good programmer, it's the syntax that matters," Tim Huckaby, CEO of San Diego-based software engineering company CEO Interknowlogy.com, told eWEEK. However, Huckaby said that while his company is "swimmi ng" in work, he's having a nearly impossible time finding recruits, even on the entry level, that know specific programming languages. "We're hiring like crazy, but we're not having an easy time. We're just looking for attitude and aptitude, kids right out of school that know .Net, or even Java, because with that we can train them on .Net," said Huckaby. "Don't get fixated on one or two languages. When I started in 1969, FORTRAN, COBOL and S/360 Assembler were the big tickets. Today, Java, C and Visual Basic are. In 10 years time, some new set of languages will be the 'in thing.' …At last count, I knew/have learned over 24 different languages in over 30 years," Wayne Duqaine, director of Software Development at Grandview Systems, of Sebastopol, Calif., told eWEEK.
    [Show full text]
  • GNU Cobol FAQ
    GNU Cobol FAQ | Status This is a 2.1 work in progress release of the GNU Cobol FAQ. Sourced at gcfaqrrst. Courtesty of ReStructuredText, Sphinx and Pygments. GNU Cobol 2.1 is not currently rolled out, but is available for testing. GNUCobolFAQppdf is also available, but broken, as a work in progress, with no work done yet, using Texlive and Sphinx. This FAQ is more than a FAQ and less than a FAQ. Someday that will change and this document will be split into a GNU Cobol manual and a simplified Frequently Asked Questions file. Website favicon by Mark James, help.png from the FAMFAMFAM Silk icon set. http://creativecommons.org/licenses/by/2.5/ Banner courtesy of the GIMP, Copyright © 2008-2014 Brian Tif- fin licensed under Creative Commons Attribution-Share Alike 2.0 Generic License http://creativecommons.org/licenses/by-sa/2.0/ Authors Brian Tiffin [btiffin]_ Answers, quotes and contributions: John Ellis [jrls_swla]_, Vincent Coen, Jim Currey, Bill Klein [wmk- lein]_, Ganymede, Simon Sobisch [human]_, Rildo Pragana, Sergey Kashyrin, Federico Priolo, Frank Swarbrick, Angus, DamonH, Parhs, Gerald Chudyk Compiler by: *Roger While* [Roger]_, *Keisuke Nishida* [Keisuke]_, *Ron Norman* [Ron]_, *Sergey Kashyrin* [Sergey]_, (with the invaluable assistance of many others) Special credits to *Gary Cutler* author of the GNU Cobol Programmers Guide Joseph James Frantz for hosting and advocacy [aoirthoir]_ 1 Version 2.1.17, May 24th, 2014 Status never complete; like a limit, limaq→0 f(aq) = 42 Copyright Copyright © 2008-2014 Brian Tiffin ChangeLog ChangeLog_ note Regarding COBOL Standards, Official COBOL Standards: There are many references to standards in this document.
    [Show full text]
  • CITA 385 COBOL for Business and Accounting
    STATE UNIVERSITY OF NEW YORK COLLEGE OF TECHNOLOGY CANTON, NEW YORK MASTER SYLLABUS CITA 385 – COBOL for Business and Accounting Created by: Robert House Updated by: Minhua Wang CANINO SCHOOL OF ENGINEERING TECHNOLOGY DECISION SYSTEMS FALL 2018 A. TITLE: Visual Programming and Development Tools B. COURSE NUMBER: CITA 385 C. CREDIT HOURS: (Hours of Lecture, Laboratory, Recitation, Tutorial, Activity) # Credit Hours: 3 # Lecture Hours: 2 per week # Lab Hours: 1 (two-hour lab) per week Other: per week Course Length: 15 Weeks D. WRITING INTENSIVE COURSE: No E. GER CATEGORY: None F. SEMESTER(S) OFFERED: As required G. COURSE DESCRIPTION: This course provides students with the knowledge and experience to write and modify programs written in the COBOL programming language. Classroom exercises use real world scenarios so students will gain an understanding of where COBOL fits in the business world. H. PRE-REQUISITES/CO-REQUISITES: a. Pre-requisite(s): CITA 152 Computer Logic b. Co-requisite(s): none c. Pre- or co-requisite(s): none I. STUDENT LEARNING OUTCOMES: By the end of this course, the student will be able to: Course Student Learning Outcome PSLO ISLO [SLO] a. Design algorithms to solve 3. Demonstrate a solid understanding of 5 application problems the methodologies and foundations of IT b. Compile, test, and debug COBOL 3. Demonstrate a solid understanding of 5 programs the methodologies and foundations of IT c. Define data elements used in a 3. Demonstrate a solid understanding of 5 COBOL program the methodologies and foundations of IT d. Create procedures using COBOL 3. Demonstrate a solid understanding of 5 statements the methodologies and foundations of IT e.
    [Show full text]
  • The Latest IBM Z COBOL Compiler: Enterprise COBOL V6.2!
    The latest IBM Z COBOL compiler: Enterprise COBOL V6.2! Tom Ross Captain COBOL SHARE Providence August 7,2017 1 COBOL V6.2 ? YES! • The 4 th release of the new generation of IBM Z COBOL compilers • Announced: July 17, 2017 • The same day as IBM z14 hardware…coincidence? • GA: September 8, 2017 • Compiler support for the new IBM z14 hardware and IBM z/OS V2.3 • Ability to exploit the new Vector Packed Decimal Facility of z14 • ‘OLD’ news: • COBOL V5 EOM Sept 11, 2017 (announced Dec 6, 2016) • EOS for COBOL V4 ‘might’ be earlier than 2020, still discussing 2 COBOL V6.2 ? What else does it have? • New and changed COBOL statements, such as the new JSON PARSE statement • Support of COBOL 2002/2014 standards with the addition of the COBOL Conditional Compilation language feature • New and changed COBOL options for increased flexibility • Improved compiler listings with compiler messages at the end of the listing as in previous releases of the compiler • Improved interfaces to optional products and tools such as IBM Debug for z Systems (formerly Debug Tool for z/OS) and IBM Application Discovery and Delivery Intelligence (formerly EzSource) • Compile-time and runtime performance enhancements • Improved usability of the compiler in the z/OS UNIX System Services environment 3 Vector Packed Decimal Facility of z14 • Enterprise COBOL V6.2 adds support for exploiting the new Vector Packed Decimal Facility in z14 through the ARCH(12) compiler option. • The Vector Packed Decimal Facility allows the dominant COBOL data types, packed and zoned decimal, to be handled in wide 16-byte vector registers instead of in memory.
    [Show full text]
  • JTC1 and SC22 - Terminology
    JTC1 AD Hoc Terminology, August 2005 1 JTC1 and SC22 - Terminology Background Following my offer to collect together the definitions from SC22 standards, SC22 accepted my offer and appointed me as its terminology representative (I was later also asked to represent UK and BSI) on the JTC1 ad hoc group on terminology. These notes summarise the results of collecting the SC22 definitions, and my impressions of the JTC1 ad hoc group. Roger Scowen August 2005 A collection of definitions from SC22 standards SC22 asked me to prepare a collected terminology for SC22 containing the definitions from standards for which SC22 is responsible, and asked the project editors to send me the definitions in text form. Many, but not all, project editors did so. However there are sufficient for SC22 to judge whether to complete the list or abandon it as an interesting but unprofitable exercise. Adding definitions to the database The project editor of a standard typically sends the definitions from the standard as a Word file, but it may be plain text or in Latex or nroff format. These definitions are transformed into a uniform format by a series of global ‘find & replace’ operations to produce a Word file where each definition is represented as a row of a table with three columns: the term, its definition, and any notes and/or examples. It is often easier to check this has been accomplished by copying and pasting successive attempts into Excel than examining the Word file itself. Sometimes there are special cases such as exotic characters (for example Greek or mathematical characters), special fonts, illustrations, diagrams, or tables.
    [Show full text]
  • Programming Language "EASY"
    Programming Language "EASY" Rahul Kumar IIT Kanpur Outline • What is "EASY"? • Why use "EASY"? • Basic idea taken from NLP • Programming with NLP • How it works... • Example • Why can't computers be designed in "EASY" • Future Goals • References What is "EASY"? • A programming language • A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. • The term programming language usually refers to high-level languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and Pascal. • Each language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions. Why use "EASY"? • Textbooks and scientific publications related to computer science and numerical computation can use English sentences in description of algorithms, so that all programmers can understand them. • A programmer who needs to implement a specific algorithm, especially an unfamiliar one, will often start with a pseudocode description, and then "translate" that description into the target programming language and modify it to interact correctly with the rest of the program. However, this won't be needed while using "EASY". • It can also be used in schools to teach programming to kids as they can use the words and syntax freely. Natural Language Programming • Natural language programming (NLP) is an ontology-assisted way of programming in terms of natural language sentences, e.g. English. A structured document with Content, sections and subsections for explanations of sentences forms a NLP document, which is actually a computer program. Programming with NLP • Do we really need computer languages to tell our computers what to do? Why can’t we just use natural human languages, like English, instead? • So the first question is: how might we represent these programs? • In principle we could use pretty much any programming language.
    [Show full text]
  • International Standard ISO/IEC 14977
    ISO/IEC 14977 : 1996(E) Contents Page Foreword ................................................ iii Introduction .............................................. iv 1Scope:::::::::::::::::::::::::::::::::::::::::::::: 1 2 Normative references :::::::::::::::::::::::::::::::::: 1 3 Definitions :::::::::::::::::::::::::::::::::::::::::: 1 4 The form of each syntactic element of Extended BNF :::::::::: 1 4.1 General........................................... 2 4.2 Syntax............................................ 2 4.3 Syntax-rule........................................ 2 4.4 Definitions-list...................................... 2 4.5 Single-definition . 2 4.6 Syntactic-term...................................... 2 4.7 Syntacticexception.................................. 2 4.8 Syntactic-factor..................................... 2 4.9 Integer............................................ 2 4.10 Syntactic-primary.................................... 2 4.11 Optional-sequence................................... 3 4.12 Repeatedsequence................................... 3 4.13 Grouped sequence . 3 4.14 Meta-identifier...................................... 3 4.15 Meta-identifier-character............................... 3 4.16 Terminal-string...................................... 3 4.17 First-terminal-character................................ 3 4.18 Second-terminal-character . 3 4.19 Special-sequence.................................... 3 4.20 Special-sequence-character............................. 3 4.21 Empty-sequence....................................
    [Show full text]
  • Embedded SQL Guide for RM/Cobol
    Firebird Embedded SQL Guide for RM/Cobol Embedded SQL Guide for RM/Cobol 3 Table of Contents 1. Program Structure...............................................................................................................................6 1.1. General...........................................................................................................................................6 1.2. Reading this Guide.........................................................................................................................6 1.3. Definition of Terms........................................................................................................................6 1.4. Declaring Host Variables...............................................................................................................7 1.5. Declaring and Accessing Databases...............................................................................................7 1.6. Transactions....................................................................................................................................7 1.7. SQL Statements..............................................................................................................................8 1.8. Statement Handles..........................................................................................................................8 1.9. Dynamic SQL (DSQL)...................................................................................................................8 1.10. Error
    [Show full text]
  • The Pascal Programming Language
    The Pascal Programming Language http://pascal-central.com/ppl/index.html The Pascal Programming Language Bill Catambay, Pascal Developer Updated: 9-5-01 The Pascal Programming Language by Bill Catambay Table of Contents I. Introduction About the Author Origins of Pascal II. The Pascal Architecture Block Structure Style Manageability III. Pascal Standards Unextended Pascal Extended Pascal Object Pascal IV. Myths Uncovered Myth 1: C and Pascal Are Basically the Same Language Myth 2: Pascal is Limited in Power Myth 3: Pascal Has Weak String Handling Capabilities Myth 4: Pascal Does Not Support Object Oriented Programming Myth 5: Pascal is Only an Instructional Language Myth 6: Pascal is Not For Serious Programmers V. Pascal Today Platforms Compilers Internet VI. Summary VII. Bibliography I. Introduction This paper is a review of the Pascal programming language. I will address the origin of the language, discuss the architecture, and talk about the language standards for unextended Pascal and Extended Pascal. I will confront the major criticisms of the language, explaining the origin and inaccuracy of the many myths about Pascal. Finally, I will address the Pascal implementations available today, comparing the 1 of 5 11/9/07 11:42 AM The Pascal Programming Language http://pascal-central.com/ppl/index.html different compilers and the different platforms on which Pascal is currently available. My experience with Pascal dates back to the PDP-11, the system used at Santa Clara University where I received my Bachelor of Science in Computer Science in 1984. During my college years, I learned and worked with several languages on campus, ranging from FORTRAN to Pascal, COBOL to Assembly.
    [Show full text]
  • CMSC 330: Organization of Programming Languages
    CMSC 330: Organization of Programming Languages Administrivia CMSC330 Spring 2020 1 Course Goals Understand why there are so many languages Describe and compare their main features Choose the right language for the job Write better code • Code that is shorter, more efficient, with fewer bugs In short: • Become a better programmer with a better understanding of your tools. CMSC330 Spring 2020 2 Course Activities Learn different types of languages Learn different language features and tradeoffs • Programming patterns repeat between languages Study how languages are specified • Syntax, Semantics — mathematical formalisms Study how languages are implemented • Parsing via regular expressions (automata theory) and context free grammars • Mechanisms such as closures, tail recursion, lazy evaluation, garbage collection, … Language impact on computer security CMSC330 Spring 2020 3 Syllabus Dynamic/ Scripting languages (Ruby) Functional programming (OCaml) Regular expressions & finite automata Context-free grammars & parsing Lambda Calculus Safe, “zero-cost abstraction” programming (Rust) Secure programming Scoping, type systems, parameter passing, Comparing language styles; other topics CMSC330 Spring 2020 4 Calendar / Course Overview Tests • 4 quizzes, 2 midterm exams, 1 final exam • Do not schedule your interviews on exam dates Clicker quizzes • In class, graded, during the lectures Projects • Project 1 – Ruby • Project 2-5 – OCaml (and parsing, automata) Ø P2 and P4 are split in two parts • Project 6 – Security CMSC330 Spring 2020 5 Clickers Turning Technology subscription is free. Physical clicker is preferred. • Clicker device: any of LCD, NXT, or QT2 models • Phone App: needs wifi CMSC330 Spring 2020 6 Quiz time! According to IEEE Spectrum Magazine which is the “top” programming language of 2018? A.
    [Show full text]