COBOL Unbounded Loops A Diatribe On Their Omission From the COBOL Standard (and a Plea for Understanding)
|
|
- Iris Simpson
- 6 years ago
- Views:
Transcription
1 COBOL Unbounded Loops A Diatribe On Their Omission From the COBOL Standard (and a Plea for Understanding) August 11, 2016 Frank Swarbrick Principal Analyst Mainframe Applications Development FirstBank Lakewood, CO USA Introduction The COBOL standard (as of 2014), and thus IBM Enterprise COBOL, do not support a natural syntax for an unbounded loop via the native looping mechanisms. Several other COBOL implementations have extended the language to provide this missing support. 1. Micro Focus and GnuCOBOL support a PERFORM FOREVER inline perform loop. 2. GnuCOBOL supports PERFORM UNTIL EXIT as well, with the same behavior. 3. Fujitsu COBOL supports PERFORM WITH NO LIMIT syntax with the same behavior. The Fujitsu Software NetCOBOL V11.0 User s Guide has this to say: WITH NO LIMIT must be specified for the PERFORM statement to prevent the system generating code to determine the at end condition. When PERFORM WITH NO LIMIT is specified, the group of statements is executed repeatedly until an explicit exit or transfer of control is encountered. When you use the NO LIMIT phrase you must include statements in the performed code to determine when the iteration should end, and to exit the repeated processing. If you do not specify a statement to exit the repeat processing, processing continues indefinitely (in an infinite loop). Obviously several COBOL vendors and their customers have recognized that the lack of this feature is detrimental to desired coding practices. Shouldn t IBM Enterprise COBOL also support this feature as an extension. And shouldn t the COBOL standards committee (if one still exists!) provide this as a standard feature within the language? (Though now that there are at least three different syntaxes the question would be how do decide which syntax should be standard!) I write this document because IBM has already rejected my RFE requesting that Enterprise COBOL support some method of defining an unbounded loop, with their reasons being because it is not in the standard (*) and there are alternative methods of performing this facility. (*) Not in the standard hasn t stopped them from implementing many useful IBM extensions to COBOL, with one of the most recent being unbounded tables.
2 A Brief History of Loops in COBOL Genesis In the beginning there was the simple loop provided with the use of the GO TO statement. MAIN SECTION. PERFORM STOP RUN. PROCESS-MY-FILE SECTION. READ-MY-FILE. GO TO MY-FILE-AT-END. PROCESS-MY-RECORD. DISPLAY MY-RECORD. NEXT-RECORD. GO TO READ-MY-FILE. MY-FILE-AT-END. EXIT. Exodus Next there was the recommendation against the use of GO TO (in general), as well as some recommendation against use of procedure division sections. MAIN. PERFORM STOP RUN. PERFORM READ-MY-FILE. PERFORM UNTIL MY-FILE-AT-END PERFORM READ-MY-FILE READ-MY-FILE. SET MY-FILE-AT-END TO TRUE END-READ. PROCESS-MY-RECORD. DISPLAY MY-RECORD. So, what has been gained? And what has been lost?
3 The Good: - No use of GO TO. - No use of procedure division sections. - Continued use of separate paragraphs for discrete functions. The Bad: - Two different places where READ-MY-FILE is invoked. o Slightly confusing (though so prevalent you get used to it). o Bad for optimization. The optimizer either in-lines the READ logic in to two different places, or it does not inline it at all. - The addition of a variable to keep track of the at end condition. Leviticus (Yeah, my clever titling falls apart a bit here ) As an option to the above one could do the following instead. MAIN. PERFORM STOP RUN. PERFORM UNTIL MY-FILE-AT-END PERFORM READ-MY-FILE IF NOT MY-FILE-AT-END END-IF READ-MY-FILE. SET MY-FILE-AT-END TO TRUE END-READ. PROCESS-MY-RECORD. DISPLAY MY-RECORD. The Good: - Back to a single place where the record is read, allowing the optimizer to place it inline inside the loop. The Bad: - Continued need for the variable to keep track of the at end condition. - Redundant checking of the at end condition. The New Testament As of the 2002 COBOL standard there is now support for enhanced EXIT statements. This includes, which allows for early termination of a PERFORM loop. How might we make use of this for the above type of processing? MAIN. PERFORM
4 STOP RUN. PERFORM UNTIL MY-FILE-AT-END PERFORM READ-MY-FILE IF MY-FILE-AT-END ELSE END-IF READ-MY-FILE. SET MY-FILE-AT-END TO TRUE END-READ. PROCESS-MY-RECORD. DISPLAY MY-RECORD. Hmm, now that is interesting. We now exit the loop as soon as we know that - we want to terminate the loop - we don t want to do the process record logic prior to terminating the loop. But we still have: - Continued need for the variable to keep track of the at end condition. - Redundant checking of the at end condition. And in fact, there now will never be a case where the natural termination of the loop is reached, because we have explicitly terminated it with the so that any time the PERFORM loop itself checks for the at-end condition it will never be true. - So what is the point of even checking it there? Well, we have to check something! The COBOL standard does not allow an alternative. What if there were another way? MAIN. PERFORM STOP RUN. PERFORM UNTIL EXIT NOT END-READ The New Testament (Revised Edition)
5 PROCESS-MY-RECORD. DISPLAY MY-RECORD. Or a slight variation for the PROCESS-MY-FILE paragraph: PERFORM UNTIL EXIT END-READ The Good: - Both of these eliminate the need to set an at end variable only to check its value almost immediately afterward. - There is no need to perform the same paragraph in two different places. - No need for checking the truthness of a value that (at that point) can never be true. - It is still obvious (to me, anyway) what the condition is where the unbounded loop terminates. The Bad (?): - The read from file logic is no longer in its own paragraph, but is part of the inline perform. Since the processing of the record (PROCESS-MY-RECORD) is still out of line if feel having the inline READ in order to allow the to do the is a reasonable compromise. If you don t want to do that, you can always just use explicit FILE STATUS checking, as in the following example. PERFORM UNTIL EXIT PERFORM READ-MY-FILE IF MY-FILE-AT-END END-IF READ-MY-FILE. EVALUATE TRUE WHEN MY-FILE-SUCCESSFUL WHEN MY-FILE-AT-END CONTINUE WHEN OTHER PERFORM ERROR-WITH-MY-FILE END-EVALUATE. You could also use a DECLARATIVE section to handle unexpected I/O errors, which eliminates the need for the entire EVALUATE within READ-MY-FILE, which in turn makes READ-MY-FILE a single statement, so why have it in its on paragraph in the first place?
6 Of course there are other things loops are used for besides native COBOL I/O. In many of these cases there is a natural status code field (SQLCODE, IMS PCB status field, etc.) so there is not the issue with creating one only to be able to terminate the loop. Even in those cases I still think it makes sense to use an unbounded loop. PROCESS-MY-CURSOR. PERFORM UNTIL EXIT PERFORM FETCH-NEXT-RECORD IF SQLCODE = +100 END-IF FETCH-NEXT-RECORD. EXEC SQL FETCH MY-CURSOR INTO :MY-RECORD END-EXEC. EVALUATE SQLCODE WHEN ZERO WHEN 100 CONTINUE WHEN OTHER PERFORM ERROR-WITH-MY-CURSOR END-EVALUATE. (Not a Book in the Bible.) Reality So, the whole point to this is that neither the COBOL standard nor IBM Enterprise COBOL support the direct syntax for an unbounded loop. There are alternatives, are there not? Why don t you just use one of those? I will explain. The obvious alternative is to define a field that has a constant value, and then have your look check to make sure that the value is never some other value. 01 DUMMY-DONE-FLAG PIC X VALUE LOW-VALUES. 88 DONE VALUE HIGH-VALUES. PERFORM UNTIL DONE END-READ Does this work? Indeed, it does work, with several (important, at least to me) caveats.
7 You need to make sure you specify a VALUE for the field in its declaration. If you did not specify, for example, LOW-VALUES then there is the slight possibility that the field may coincidentally have a value of HIGH-VALUES already in it. In that case your loop would terminate immediately, having never performed any of the code inside it. Not good! OK, let s say you always remember to specify the VALUE clause. All is well, right? Not in my opinion. I have tested with COBOL 5.2 and several different values for the OPTIMIZE compile option. OPTIMIZE(0) Even though DONE is never true, the compiler still generates code to check to see if DUMMY-DONE-FLAG = HIGH-VALUES. So that s one instruction wasted. OPTIMIZE(1) and OPTIMIZE(2) Ah ha! The optimizer is doing its duty. It knows that DUMMY-DONE-FLAG can never be HIGH-VALUES, so it optimizes away the test. That s great! Well, except for the fact that this causes it does its duty so well that it eliminates the code in such a manner that it ends up causing a warning such as the following: IGYCB7300-W The code from lines ###.1 in program 'XXXX' can never be executed and was therefore discarded. So now a perfectly perfect (!) program results in warning and a Return code 4 condition!
8 Sidebar Although I am sure there are some obscure ones, I know of no major programming language other than COBOL that does not support unbounded loops. for (;;) {} while (1) {} C, C++, Java do forever; [ ] end; PL/I and REXX do loop; [ ] end; PL/I while true do [ ] Pascal, Delphi while 1: [ ] Python loop { } Ruby Perl 6 while true {} Groovy do [ ] loop Visual Basic while true {} Swift for { } Go LOOP [ ] END LOOP; Oracle PL/SQL and DB2 SQL PL WHILE 1=1 BEGIN [ ] END; Microsoft Transact-SQL Microsoft See the following link if you wish to know about more: Interestingly, that page includes the supposed COBOL option of PERFORM UNTIL 1 <> 1, which is not valid COBOL at all in that at least one side of a comparison expression must not be a literal. (I guess it might be supported by some other COBOL implementation.) Not to mention that Enterprise COBOL does not even support <> as an abbreviation for not equal (though it is part of the 2014 COBOL standard). All of these, of course, have their own method of prematurely terminating a loop, just as COBOL now has (and CYCLE to iterate a loop).
9 Revelation All is not lost. While writing this document I thought of one more thing to try. And while I will not make any guarantees about it, it seems to do all of the following, at least with the version of Enterprise COBOL (5.2) that I am using: - Allows syntax that makes it obvious that this is an unbounded loop. - Allows the optimizer (both at OPT(1) and OPT(2)) to eliminate the code that checks for the termination of the loop. - It does so in a way that it does not cause the optimizer to issue any warning. At least in all the cases I have tested so far. The solution is to use the WITH TEST AFTER clause of the PERFORM, rather than the (default) WITH TEST BEFORE. (Hmm, just thought of PERFORM WITH NO TEST as another possible syntax for this loop construct!) For whatever reason (likely coincidence) this does all of the above, so let s go with it. I created a copybook named UNBOUND with the following lines: 01 PIC X VALUE LOW-VALUES. 88 UNBOUNDED VALUE HIGH-VALUES. REPLACE ==PERFORM UNBOUNDED== BY ==PERFORM WITH TEST AFTER UNTIL UNBOUNDED==. I chose to use UNBOUND/UNBOUNDED because it already exists as a contextsensitive keyword in Enterprise COBOL. That is, it is a keyword that can also be used as a user defined word. If you want to make it look more like Micro Focus COBOL s solution you can change UNBOUND and UNBOUNDED to FOREVER. Usage example: WORKING-STORAGE SECTION. COPY UNBOUND. PROCEDURE DIVISION. [...] PERFORM UNBOUNDED END-READ The REPLACE statement (assuming you don t have a REPLACE OFF before you get to it!) causes the final source code (as seen by the compiler) to be: PERFORM WITH TEST AFTER UNTIL UNBOUNDED END-READ
10 The optimizer still eliminates any checking of the unnamed filler that UNBOUNDED is a condition of to see if it s a value of high-values. But in this case it (apparently) leaves enough in place so that the optimizer hasn t eliminated every single instruction, and thus no superfluous warning is issued. So far now I think this is the best that can be done. In the end I still believe that IBM Enterprise COBOL, and the COBOL standard itself, should support at least one of these methods to represent an unbounded.
Lesson 13 Transcript: User-Defined Functions
Lesson 13 Transcript: User-Defined Functions Slide 1: Cover Welcome to Lesson 13 of DB2 ON CAMPUS LECTURE SERIES. Today, we are going to talk about User-defined Functions. My name is Raul Chong, and I'm
More informationRepetition Structures
Repetition Structures Chapter 5 Fall 2016, CSUS Introduction to Repetition Structures Chapter 5.1 1 Introduction to Repetition Structures A repetition structure causes a statement or set of statements
More informationLecture Transcript While and Do While Statements in C++
Lecture Transcript While and Do While Statements in C++ Hello and welcome back. In this lecture we are going to look at the while and do...while iteration statements in C++. Here is a quick recap of some
More informationCondition-Controlled Loop. Condition-Controlled Loop. If Statement. Various Forms. Conditional-Controlled Loop. Loop Caution.
Repetition Structures Introduction to Repetition Structures Chapter 5 Spring 2016, CSUS Chapter 5.1 Introduction to Repetition Structures The Problems with Duplicate Code A repetition structure causes
More informationITCS Implementation. Jing Yang 2010 Fall. Class 14: Introduction to SQL Programming Techniques (Ch13) Outline
ITCS 3160 Data Base Design and Implementation Jing Yang 2010 Fall Class 14: Introduction to SQL Programming Techniques (Ch13) Outline Database Programming: Techniques and Issues Three approaches: Embedded
More informationAbout these Release Notes. This document contains important information about Pro*COBOL 12c Release 2 (12.2).
Pro*COBOL Release Notes 12c Release 2 (12.2) E85817-01 May 2017 Release Notes About these Release Notes This document contains important information about Pro*COBOL 12c Release 2 (12.2). It contains the
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Chapter 10 Outline Database Programming: Techniques and Issues Embedded SQL, Dynamic SQL, and SQLJ Database Programming with Function Calls: SQL/CLI and JDBC Database Stored Procedures and SQL/PSM Comparing
More informationSOME TYPES AND USES OF DATA MODELS
3 SOME TYPES AND USES OF DATA MODELS CHAPTER OUTLINE 3.1 Different Types of Data Models 23 3.1.1 Physical Data Model 24 3.1.2 Logical Data Model 24 3.1.3 Conceptual Data Model 25 3.1.4 Canonical Data Model
More informationCS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013
CS252 Advanced Programming Language Principles Prof. Tom Austin San José State University Fall 2013 What are some programming languages? Why are there so many? Different domains Mobile devices (Objective
More informationAPPENDIX B. Fortran Hints
APPENDIX B Fortran Hints This appix contains hints on how to find errors in your programs, and how to avoid some common Fortran errors in the first place. The basics on how to invoke the Fortran compiler
More informationQuestion Bank PL/SQL Fundamentals-I
Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL
More informationG Programming Languages - Fall 2012
G22.2110-003 Programming Languages - Fall 2012 Lecture 3 Thomas Wies New York University Review Last week Names and Bindings Lifetimes and Allocation Garbage Collection Scope Outline Control Flow Sequencing
More informationOracle SQL. murach s. and PL/SQL TRAINING & REFERENCE. (Chapter 2)
TRAINING & REFERENCE murach s Oracle SQL and PL/SQL (Chapter 2) works with all versions through 11g Thanks for reviewing this chapter from Murach s Oracle SQL and PL/SQL. To see the expanded table of contents
More informationIntroduction to Programming
CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed
More informationChapter 13 Introduction to SQL Programming Techniques
Chapter 13 Introduction to SQL Programming Techniques Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Outline Database Programming: Techniques and Issues Embedded
More informationWindows Script Host Fundamentals
O N E Windows Script Host Fundamentals 1 The Windows Script Host, or WSH for short, is one of the most powerful and useful parts of the Windows operating system. Strangely enough, it is also one of least
More informationAbout these Release Notes
Pro*COBOL Release Notes 18c E84345-01 February 2018 Release Notes About these Release Notes This document contains important information about Pro*COBOL release 18c, version 18.1. It contains the following
More informationDesign First ITS Instructor Tool
Design First ITS Instructor Tool The Instructor Tool allows instructors to enter problems into Design First ITS through a process that creates a solution for a textual problem description and allows for
More informationCOBOL - DATABASE INTERFACE
COBOL - DATABASE INTERFACE 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
More informationAn Incomplete Language Feature
N3139=10-0129 Bjarne Stroustrup 9/4/2010 An Incomplete Language Feature Abstract As the draft standard stands, we cannot use -style initialization in default arguments. This paper argues that this is a
More informationDatabase Applications. SQL/PSM Embedded SQL JDBC
Database Applications SQL/PSM Embedded SQL JDBC 1 Course Objectives Design Construction Applications Usage 2 Course Objectives Interfacing When the course is through, you should Know how to connect to
More informationLesson 17 Transcript: Troubleshooting
Lesson 17 Transcript: Troubleshooting Slide 1 - Cover Welcome to Lesson 17 of the DB2 on Campus lecture series. Today we're going to talk about troubleshooting. My name is Raul Chong, and I'm the DB2 on
More informationAnnotation Hammer Venkat Subramaniam (Also published at
Annotation Hammer Venkat Subramaniam venkats@agiledeveloper.com (Also published at http://www.infoq.com) Abstract Annotations in Java 5 provide a very powerful metadata mechanism. Yet, like anything else,
More informationCOSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22
COSC 2P91 Bringing it all together... Week 4b Brock University Brock University (Week 4b) Bringing it all together... 1 / 22 A note on practicality and program design... Writing a single, monolithic source
More informationThere are a number of ways of doing this, and we will examine two of them. Fig1. Circuit 3a Flash two LEDs.
Flashing LEDs We re going to experiment with flashing some LEDs in this chapter. First, we will just flash two alternate LEDs, and then make a simple set of traffic lights, finally a running pattern; you
More information1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL
CertBus.com 1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL Pass Oracle 1Z0-144 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: 100% Passing Guarantee 100%
More informationProgramming the Database
Programming the Database Today s Lecture 1. Stored Procedures 2. Functions BBM471 Database Management Systems Dr. Fuat Akal akal@hacettepe.edu.tr 3. Cursors 4. Triggers 5. Dynamic SQL 2 Stored Procedures
More informationProgramming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102
Programming Languages and Program Development Life Cycle Fall 2016 Introduction to Information and Communication Technologies CSD 102 Outline The most common approaches to program design and development
More informationMainframe Tutorials Cobol Db2 Jcl Cics Tutorials
Mainframe Tutorials Cobol Db2 Jcl Cics Tutorials 1 / 6 2 / 6 3 / 6 Mainframe Tutorials Cobol Db2 Jcl MAINFRAME TUTORIALS COBOL DB2 JCL CICS TUTORIALS ibm manuals MATERIALS MAINFRAME JOBS interview questions.
More informationIntroduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement
Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #17 Loops: Break Statement (Refer Slide Time: 00:07) In this session we will see one more feature that is present
More informationJava Programming Fundamentals - Day Instructor: Jason Yoon Website:
Java Programming Fundamentals - Day 1 07.09.2016 Instructor: Jason Yoon Website: http://mryoon.weebly.com Quick Advice Before We Get Started Java is not the same as javascript! Don t get them confused
More information6.001 Notes: Section 17.5
6.001 Notes: Section 17.5 Slide 17.5.1 Now, let's look at one example in which changing the evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how
More informationOracle PLSQL. Course Summary. Duration. Objectives
Oracle PLSQL Course Summary Use conditional compilation to customize the functionality in a PL/SQL application without removing any source code Design PL/SQL packages to group related constructs Create
More informationLecture 01 & 02 Computer Programming
Lecture 01 & 02 Computer Programming 15 Computer Systems Engineering Second Semester By: Mr. Ali Asghar Manjotho, Lecturer, CSE-MUET Contents Computer programming (LL 02) Why programming? (LL 02) Instructions
More informationRead & Download (PDF Kindle) Programming: C ++ Programming : Programming Language For Beginners: LEARN IN A DAY! (C++, Javascript, PHP, Python, Sql,
Read & Download (PDF Kindle) Programming: C ++ Programming : Programming Language For Beginners: LEARN IN A DAY! (C++, Javascript, PHP, Python, Sql, HTML, Swift) Start Learning to Program in the C++ Language
More informationIntroduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.
Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations
More informationIteration. # a and b are now equal # a and b are no longer equal Multiple assignment
Iteration 6.1. Multiple assignment As you may have discovered, it is legal to make more than one assignment to the same variable. A new assignment makes an existing variable refer to a new value (and stop
More informationthe Computability Hierarchy
2013 0 the Computability Hierarchy Eric Hehner Department of Computer Science, University of Toronto hehner@cs.utoronto.ca Abstract A computability hierarchy cannot be constructed by halting oracles. Introduction
More informationCursors Christian S. Jensen, Richard T. Snodgrass, and T. Y. Cliff Leung
17 Cursors Christian S. Jensen, Richard T. Snodgrass, and T. Y. Cliff Leung The cursor facility of SQL2, to be useful in TSQL2, must be revised. Essentially, revision is needed because tuples of TSQL2
More informationControl Structures. Control Structures 3-1
3 Control Structures One ship drives east and another drives west With the selfsame winds that blow. Tis the set of the sails and not the gales Which tells us the way to go. Ella Wheeler Wilcox This chapter
More informationGnuCOBOL Quick Reference
GnuCOBOL Quick Reference For Version 2.2 Final [7Sept2017] Gary L. Cutler (cutlergl@gmail.com). For updates Vincent B. Coen (vbcoen@gmail.com). This manual documents GnuCOBOL 2.2 Final, 7Sept2017 build.
More informationReview of the syntax and use of Arduino functions, with special attention to the setup and loop functions.
Living with the Lab Fall 2011 What s this void loop thing? Gerald Recktenwald v: October 31, 2011 gerry@me.pdx.edu 1 Overview This document aims to explain two kinds of loops: the loop function that is
More informationIntroduction. A. Bellaachia Page: 1
Introduction 1. Objectives... 2 2. Why are there so many programming languages?... 2 3. What makes a language successful?... 2 4. Programming Domains... 3 5. Language and Computer Architecture... 4 6.
More informationFull file at
ch02 True/False Indicate whether the statement is true or false. 1. The term anonymous blocks refers to blocks of code that are not stored for reuse and do not exist after being executed. 2. The only required
More informationPROCEDURAL DATABASE PROGRAMMING ( PL/SQL AND T-SQL)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Database Programming PROCEDURAL DATABASE PROGRAMMING ( PL/SQL AND T-SQL) AGENDA 6. Stored Functions Procedural Database Programming
More informationORACLE: PL/SQL Programming
%ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection
More informationIBM DB2 9.7 SQL Procedure Developer.
IBM 000-545 DB2 9.7 SQL Procedure Developer http://killexams.com/exam-detail/000-545 QUESTION: 105 Click the Exhibit button. Referring to the exhibit, which two statements are correct? (Choose two.) A.
More informationPerl Basics. Structure, Style, and Documentation
Perl Basics Structure, Style, and Documentation Copyright 2006 2009 Stewart Weiss Easy to read programs Your job as a programmer is to create programs that are: easy to read easy to understand, easy to
More informationCOBOL for AIX, Version 4.1
software Application development for today s changing marketplace COBOL for AIX, Version 4.1 To remain competitive, you need a complete business strategy to help you modernize, integrate, and manage existing
More informationWeek 2: The Clojure Language. Background Basic structure A few of the most useful facilities. A modernized Lisp. An insider's opinion
Week 2: The Clojure Language Background Basic structure A few of the most useful facilities A modernized Lisp Review of Lisp's origins and development Why did Lisp need to be modernized? Relationship to
More informationAn Alternative to Name Injection from Templates
Document Numbers: X3J16/95-0177 WG21/N0777 Date: September 26, 1995 Reply To: Bill Gibbons bgibbons@taligent.com An Alternative to Name Injection from Templates Introduction The current working paper specifies
More informationModule 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)
Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 10A Lecture - 20 What is a function?
More informationAbout these Release Notes. Documentation Accessibility. New Features in Pro*COBOL
Pro*COBOL Release Notes 12c Release 1 (12.1) E18407-06 April 2013 About these Release Notes This document contains important information about Pro*COBOL 12c Release 1 (12.1). It contains the following
More informationLanguage Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */
Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,
More informationPrinciple of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore
Principle of Complier Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 20 Intermediate code generation Part-4 Run-time environments
More information8. Control statements
8. Control statements A simple C++ statement is each of the individual instructions of a program, like the variable declarations and expressions seen in previous sections. They always end with a semicolon
More informationSQL-CMA SQL*XT for ORACLE
Database Products SQL-CMA SQL*XT for ORACLE GCOS 7 SQL Client Mode Access User's Guide GCOS 7 47 A2 01EL Rev 00 Database Products SQL-CMA SQL*XT for ORACLE GCOS 7 SQL Client Mode Access User's Guide GCOS
More informationContents I Introduction 1 Introduction to PL/SQL iii
Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL
More informationChapter 1 Introduction
Chapter 1 Introduction Why I Am Writing This: Why I am I writing a set of tutorials on compilers and how to build them? Well, the idea goes back several years ago when Rapid-Q, one of the best free BASIC
More informationProject 5 - The Meta-Circular Evaluator
MASSACHVSETTS INSTITVTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science 6.001 Structure and Interpretation of Computer Programs Fall Semester, 2005 Project 5 - The Meta-Circular
More informationIntroduction to Computer Science and Business
Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline
More informationThese are notes for the third lecture; if statements and loops.
These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern
More informationFor Loop Exit Strategies (Revision 3)
Document number: P0082R2 Date: 2017-02-06 Prior versions: N3587, P0082R0, P0082R1 Audience: Evolution Working Group Reply to: Alan Talbot cpp@alantalbot.com Abstract For Loop Exit Strategies (Revision
More informationSnowflake Numbers. A look at the Collatz Conjecture in a recreational manner. By Sir Charles W. Shults III
Snowflake Numbers A look at the Collatz Conjecture in a recreational manner By Sir Charles W. Shults III For many people, mathematics is something dry and of little interest. I ran across the mention of
More informationDatabase Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.
Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No. # 13 Constraints & Triggers Hello and welcome to another session
More informationHow to approach a computational problem
How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to
More informationT H E I N T E R A C T I V E S H E L L
3 T H E I N T E R A C T I V E S H E L L The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. Ada Lovelace, October 1842 Before
More informationViewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1.
Viewing the tm4c123gh6pm_startup_ccs.c file, the first piece of code we see after the comments is shown in Figure 1. Figure 1 Forward declaration for the default handlers These are the forward declarations,
More informationControl Structures. Important Semantic Difference
Control Structures Important Semantic Difference In all of these loops we are going to discuss, the braces are ALWAYS REQUIRED. Even if your loop/block only has one statement, you must include the braces.
More informationThe compiler is spewing error messages.
Appendix B Debugging There are a few different kinds of errors that can occur in a program, and it is useful to distinguish between them in order to track them down more quickly. Compile-time errors are
More information1Z Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions
1Z0-144 Oracle Database 11g - Program with PL/SQL Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-144 Exam on Oracle Database 11g - Program with PL/SQL... 2 Oracle 1Z0-144 Certification
More informationCOS 140: Foundations of Computer Science
COS 140: Foundations of Computer Science Variables and Primitive Data Types Fall 2017 Introduction 3 What is a variable?......................................................... 3 Variable attributes..........................................................
More information5. Control Statements
5. Control Statements This section of the course will introduce you to the major control statements in C++. These control statements are used to specify the branching in an algorithm/recipe. Control statements
More informationPROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between
MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query
More information(Refer Slide Time: 01:12)
Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #22 PERL Part II We continue with our discussion on the Perl
More informationSection 1. The essence of COBOL programming. Mike Murach & Associates
Chapter 1 Introduction to COBOL programming 1 Section 1 The essence of COBOL programming The best way to learn COBOL programming is to start doing it, and that s the approach the chapters in this section
More informationADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.
1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent
More information1 Overview. 2 Basic Program Structure. 2.1 Required and Optional Parts of Sketch
Living with the Lab Winter 2015 What s this void loop thing? Gerald Recktenwald v: February 7, 2015 gerry@me.pdx.edu 1 Overview This document aims to explain two kinds of loops: the loop function that
More informationPlease click double click on the icon labeled Internet Explorer, the picture is a blue letter E.
Introduction to the Internet Instructor: Jonathan Barkand (412-655-8447) How to get connected? First chose an Internet provider, they will probably have software they will need to send you. There are dial-up
More informationPost Experiment Interview Questions
Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid
More informationTo figure this out we need a more precise understanding of how ML works
Announcements: What are the following numbers: 74/2/70/17 (2:30,2:30,3:35,7:30) PS2 due Thursday 9/20 11:59PM Guest lecture on Tuesday 9/25 o No RDZ office hours next Friday, I am on travel A brief comment
More informationLesson 11 Transcript: Concurrency and locking
Lesson 11 Transcript: Concurrency and locking Slide 1: Cover Welcome to Lesson 11 of the DB2 on Campus Lecture Series. We are going to talk today about concurrency and locking. My name is Raul Chong and
More informationA3 Computer Architecture
Computer Architecture MT 2 A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2 / Computer Architecture
More informationdo fifty two: Language Reference Manual
do fifty two: Language Reference Manual Sinclair Target Jayson Ng Josephine Tirtanata Yichi Liu Yunfei Wang 1. Introduction We propose a card game language targeted not at proficient programmers but at
More informationPuppet Labs Modules - Feature #11050 firewall: RFE that ensure could support ignore.
Puppet Labs Modules - Feature #11050 firewall: RFE that ensure could support ignore. 11/28/2011 05:16 am - Steve Traylen Status: Closed Start date: 11/28/2011 Priority: Normal Due date: Assignee: % Done:
More informationLesson 3 Transcript: Part 2 of 2 Tools & Scripting
Lesson 3 Transcript: Part 2 of 2 Tools & Scripting Slide 1: Cover Welcome to lesson 3 of the DB2 on Campus Lecture Series. Today we are going to talk about tools and scripting. And this is part 2 of 2
More informationLN #3 (3 Hrs) Repetition, Computational state CTPS Department of CSE,Coimbatore
LN #3 (3 Hrs) Repetition, Computational state CTPS 2018 Objectives To understand repetition of statements. To comprehend the form of test and termination in looping. To study the form and function of elements
More informationCOBOL performance: Myths and Realities
COBOL performance: Myths and Realities Speaker Name: Tom Ross Speaker Company: IBM Date of Presentation: August 10, 2011 Session Number: 9655 Agenda Performance of COBOL compilers - myths and realities
More information(Refer Slide Time: 1:36)
Principles of Programming Languages Dr. S. Arun Kumar Department of Computer Science & Engineering Indian Institute of Technology, Delhi Lecture - 39 Parameters Welcome to lecture 39. So today we will
More informationExtending static_assert
Extending static_assert Document #: WG21 N3846 Date: 2014-01-01 Revises: None Project: JTC1.22.32 Programming Language C++ Reply to: Walter E. Brown Contents 1 Introduction. 1 2
More informationEvaluation of Visual Fabrique (VF)
Evaluation of Visual Fabrique (VF) Dr Peter Lappo www.smr.co.uk Scope and Method This is a review of Visual Fabrique (VF) V1.0.371 EAP Release. In order to conduct this evaluation I followed the tutorial
More informationRedvers Hashing Algorithm. User Guide. RCHASH Version 2.3
Redvers Consulting Ltd Redvers Hashing Algorithm User Guide RCHASH Version 2.3 Contents Preface... 3 Introduction... 4 Overview... 5 Installation... 6 Calling RCHASH... 7 Parameters... 7 COMMUNICATION-BLOCK...
More informationSQL STORED ROUTINES. CS121: Relational Databases Fall 2017 Lecture 9
SQL STORED ROUTINES CS121: Relational Databases Fall 2017 Lecture 9 SQL Functions 2 SQL queries can use sophisticated math operations and functions Can compute simple functions, aggregates Can compute
More informationUNIT I Programming Language Syntax and semantics. Kainjan Sanghavi
UNIT I Programming Language Syntax and semantics B y Kainjan Sanghavi Contents Bird s eye view of programming language concepts Syntax Semantics Pragmatics Programming Language Concepts A programming language
More informationUsing the PowerExchange CallProg Function to Call a User Exit Program
Using the PowerExchange CallProg Function to Call a User Exit Program 2010 Informatica Abstract This article describes how to use the PowerExchange CallProg function in an expression in a data map record
More informationProduct Review: James F. Koopmann Pine Horse, Inc. SoftTree s SQL Assistant. Product Review: SoftTree s SQL Assistant
Product Review: James F. Koopmann Pine Horse, Inc. SoftTree s SQL Assistant Introduction As much as database vendors would like us to believe that databases are easy to use, databases in fact become more
More informationDefinition: A data structure is a way of organizing data in a computer so that it can be used efficiently.
The Science of Computing I Lesson 4: Introduction to Data Structures Living with Cyber Pillar: Data Structures The need for data structures The algorithms we design to solve problems rarely do so without
More informationGetting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners
Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008
More informationCSE 142 Su 04 Computer Programming 1 - Java. Objects
Objects Objects have state and behavior. State is maintained in instance variables which live as long as the object does. Behavior is implemented in methods, which can be called by other objects to request
More informationSql Server Call Function Without Schema Name
Sql Server Call Function Without Schema Name But in the case of sql function query returns the first parameter name empty. t.user_type_id) LEFT JOIN sys.schemas s ON (t.schema_id = s.schema_id) SQL Server:
More information