Transforming Legacy Code: The Pitfalls of Automation

Size: px
Start display at page:

Download "Transforming Legacy Code: The Pitfalls of Automation"

Transcription

1 Transforming Legacy Code: The Pitfalls of Automation By William Calcagni and Robert Camacho

2 Code Transformation Once the decision has been made to undertake an automated migration, a variety of options are available for how the code transformation takes place. The method used by each service provider may be slightly different but, essentially, there are two basic categories of code transformation conversion to native types and operations on those types and conversion using classes and methods that mimic the behavior of COBOL types and verbs. Which of these code transformation techniques a service provider uses can have a profound impact on the cost, complexity, future maintainability and, ultimately, the success of the migration. Conversion to Native Types Under this option a service provider chooses to convert all COBOL data items to native types. Typically a table of correspondences is developed based on the closest native type in the target language and an automated mapping is built into the migration tool. A typical example of this would see COBOL alphanumeric items mapped to strings, COBOL numeric items mapped to int, float, decimal, etc. and COBOL 88 level items mapped to booleans. While this may seem a conceptually solid and appealing choice for data transformation there are a number of pitfalls that can cause severe problems in the migrated applications. Some of these potential pitfalls include: 1. Poor correspondence between the COBOL data type and the native type 2. Lack of a native type equivalent to the COBOL data type 3. Differences in implicit operation between the COBOL data type and the native type Each of these pitfalls must be dealt with in some manner or another and how each is dealt with can have important consequences for the overall migration. Some of these consequences can result in significant manual effort being required to complete the migration effort as well as the potential for injecting numerous difficult-to-find errors in the migrated code that will result in maintenance issues long after the migration is completed. We will now take a look at each of these pitfalls. Poor Correspondence One of the main problems with choosing to migrate COBOL data types to native types is that there is generally a poor correspondence between the two. COBOL data types were designed at a time when the use of computers by business was in its infancy and

3 most applications were accounting functions that relied on batch updates and printed reports. As such, COBOL data types are heavily geared towards titles, financial computations and report presentations. Over time, as COBOL applications grew in complexity and came to include online as well as batch functions, additional COBOL data types were added but the basic nature of data in COBOL remains. By contrast, native types in a language like C# were designed in the modern era of object oriented design and GUI or web based software. Languages like C# are strongly typed and therefore data types are not as interchangeable as they are in COBOL. An example of this type of problem is the COBOL Conditional. At first look a COBOL 88 level conditional seems like a direct correspondence to a boolean item in C#. However, COBOL 88 levels can have symbolic values such as Y or NONE or ranges of values. These indicate a true condition. Boolean items are either true or false and must be set based on the values or ranges in a condition. Since COBOL conditionals have names for each value or range and a different name for the variable that is set, it is not a direct transformation to a Boolean item. For example: 01 COST-CATEGORY PIC LOW-COST VALUE 5 THRU MEDIUM-COST VALUE 26 THRU HIGH-COST VALUE 301 THRU MOVE 175 TO COST-CATEGORY. IF LOW-COST IF MEDIUM-COST These operations have no direct equivalent in native C# types and require substantial code modification in order to attempt to replicate the functionality of COBOL. This makes the resulting C# more difficult to maintain and can lead to code bloat the phenomenon whereby a 5,000 line COBOL program turns into a 20,000 line C# program. Lack of Equivalents Several COBOL data constructs lack any equivalent type in C#. For example, COBOL contains a type of data items known as numeric edited. These are used to format numbers using character insertion rules, substitution rules and zero or space suppression rules. This cannot be directly represented by native types.

4 For example: 01 ACCT-DATA. 05 ACCT-NUMBER PIC 9(9). 05 ACCT-TOTAL PIC S9(6)V99 COMP TOTAL-LINE. 05 TOTAL-DESCRIPTION PIC X(27) VALUE TOTALS FOR ACCOUNT NUMBER:. 05 TOTAL-ACCT-NO PIC 999B99B FILLER PIC X(10) VALUE SPACES. 05 TOTAL-ACCT-TOTAL PIC $ZZZ,ZZ The data elements TOTAL-ACCT-NO and TOTAL-ACCT-TOTAL are numeric edited items that cannot be translated directly into C# native types. Likewise, COBOL pointers at first look seem equivalent to references in C#. However, because COBOL has the capability to look at the same area of memory in two different ways, it is possible to treat a pointer as a binary number and perform arithmetic on it then use it as a pointer. That is not possible with references. For Example: 01 INDEX-BASE PIC S9(9) BINARY. 01 INDEX-PTR USAGE POINTER REDEFINES INDEX-BASE. 01 DATA-TABLE PIC X OCCURS 20. SET INDEX-PTR TO ADDRESS OF DATA-TABLE. ADD 2 TO INDEX-BASE. IF INDEX-PTR EQUAL Q The above cannot be represented by C# reference variables. Differences in Implicit Operation In COBOL, each type of data item has a specific length associated with it. Thus it is possible to describe an alphanumeric data item that will contain a maximum of 8 characters or a decimal number field that will contain a maximum of 4 significant digits to the left of the decimal and 2 to the right. Any actual data that exceeds those limits will be truncated according to the rules of COBOL and any data less than those limits will be aligned and filled according to those same rules. Native types either have no such limitations or operate with different rules.

5 For example: 77 ITEM-1 PIC S9999 VALUE ITEM-2 PIC 999. MOVE ITEM-1 TO ITEM-2. In COBOL, ITEM-2 will contain the value 234 after completion of this assignment. Translating this example to native C# ints and a simple assignment would not produce the same results. Likewise, C# has no native mechanism for replicating the implicit operation of numeric edited items nor does it have a mechanism for implicit type conversion of COBOL types. Using the data descriptions from the previous numeric edited example, consider the following: MOVE ACCT-NUMBER TO TOTAL-ACCT-NO. MOVE ACCT-TOTAL TO TOTAL-ACCT-TOTAL. In COBOL this will result in an implicit conversion of ACCT-NUMBER from COBOL packed decimal to display format as well as the application of the numeric editing formats to the respective data elements. No such facility exists in C#. Why does data type selection matter? Experience has shown that in code transformations, the accuracy and maintainability of the migrated system is critically dependent on the way that the basic data structures and memory mapping in the source language are replicated in the target language. Because of the myriad of possible interactions between data elements in a program, it is not possible to test every possible combination of source statements that might be used in conjunction with any given data element. Therefore it is vital that the data in the migrated system behave exactly as the data in the original system did. The further the data structures and memory mapping in the target language vary from that of the original source language the more errors will be introduced into the converted code and the more difficult it will be to maintain. The reason for this lies in the way that data and program logic interact. In writing program logic, a developer chooses language constructs based on how they interact with the data elements defined for the application. When the data types of those

6 elements no longer behave in the same way as the original data types, the transformed program logic has to be adjusted to try to accommodate those differences. For example, in COBOL a developer knows that if he makes a computation that results in a 4 digit number and stores that result in a 3 digit number truncation will occur because of the way that COBOL enforces size rules (as illustrated in a previous example). The same is not true with native types in C#. As long as the result of the computation is within the range of possible values for the data type, the computation will not truncate. In some cases, data structures cannot be mapped at all to native types. Consider COBOL group items that are REDEFINEd and contain elementary items with OCCURs clauses. These items can be referenced by the group name, the occurring item name, the REDEFINE group name or the elementary item in the REDEFINE group whose position corresponds to the original OCCURing item. This type of structure cannot be replicated accurately using native types. Therefore, some type of logic modification will be necessary to achieve the desired result. Once manual logic modification occurs, the migration moves further up the cost/risk curve since manual coding is inherently more error prone than automated code transformation. What are the implications of data type selection? If a code transformation attempts to convert all COBOL items to native types either one of two things will happen: Either the automated code transformation will be a partially automated transformation or an attempt will be made to try to force the native types to behave like COBOL types through code additions or modifications. In the case of a partially automated transformation the most obvious and direct mappings are done automatically while the more problematic mappings are flagged for manual intervention. This can significantly increase the amount of time associated with the migration due to the additional personnel resources needed to carry out the manual intervention. Since these resources have a cost associated with them this ultimately increases the cost of the migration, often by a significant amount. In the case of forcing behavior through additional or modified code, the potential for introducing data dependent errors increases significantly. This is because it is virtually impossible to ensure that native types can be coerced into behaving like COBOL types under all possible conditions that could be encountered in the application. Because these are often data dependent errors, they may or may not be found during system testing resulting in potential future maintenance problems. Moreover, the additional coding is often done by a team comprised of numerous different individuals. Each individual developer usually has his or her on coding style that is often slightly different

7 from that of other developers. When numerous manual changes are required, the same logical function in COBOL is often recoded slightly differently by each member of the migration team. This makes the resulting migrated code more difficult to maintain because of these different coding styles. For example, a table lookup in COBOL that occurs in many places could end up being coded in different ways whereas before there was only one coding technique. The alternative approach The alternative approach is to recognize that the only successful way to migrate a system from one language to another is to develop a set of classes that can be extensively tested to ensure that they accurately and consistently map the critical data structures of COBOL to C#. These classes will ensure that data types behave in C# exactly as they did in COBOL. This is the key to ensuring the accuracy and reliability of an automated code transformation the new system works exactly like the original system because the data behaves in exactly the same way. Doing this requires developing a set of classes and methods that enforce the critical rules of COBOL in the C# application environment. Proponents of transforming all COBOL data types to native types point out that this allows the most complete transformation of a COBOL system to the closest approximation of a native object oriented system. However, the price of this is a higher cost, more manual intervention and a greater potential for maintenance problems long into the future. By the same token, great care must be taken in designing the classes and methods that will enforce the critical rules of COBOL to ensure that they are efficient and consistent, to the maximum extent possible, with normal object oriented design standards. Otherwise, a program can suffer from performance issues or end up looking like COBOL written in C#. The reward for success, however, is that after automated transformation the application will function exactly as the original COBOL system did while taking on the character of an object oriented application in C# that will be understandable and maintainable by C# developers without an extensive COBOL background. It is our view that this represents the most effective compromise that meets the goals of accuracy, reliability, maximum automation, minimum cost and future maintainability.

The Migration/Modernization Dilemma

The Migration/Modernization Dilemma The Migration/Modernization Dilemma By William Calcagni www.languageportability.com 866.731.9977 Approaches to Legacy Conversion For many years businesses have sought to reduce costs by moving their legacy

More information

Copyright Network Management Forum

Copyright Network Management Forum SPIRIT Platform Blueprint SPIRIT COBOL Language Portability Guide (SPIRIT Issue 3.0) Network Management Forum Copyright December 1995, Network Management Forum All rights reserved. No part of this publication

More information

Cloud Security Gaps. Cloud-Native Security.

Cloud Security Gaps. Cloud-Native Security. Cloud Security Gaps Cloud-Native Security www.aporeto.com Why Network Segmentation is Failing Your Cloud Application Security How to Achieve Effective Application Segmentation By now it s obvious to security-minded

More information

Normalized Relational Database Implementation of VSAM Indexed Files

Normalized Relational Database Implementation of VSAM Indexed Files Normalized Relational Database Implementation of VSAM Indexed Files Note: this discussion applies to Microsoft SQL Server, Oracle Database and IBM DB2 LUW. Impediments to a Normalized VSAM Emulation Database

More information

Question 1: What is a code walk-through, and how is it performed?

Question 1: What is a code walk-through, and how is it performed? Question 1: What is a code walk-through, and how is it performed? Response: Code walk-throughs have traditionally been viewed as informal evaluations of code, but more attention is being given to this

More information

Creating a procedural computer program using COBOL Level 2 Notes for City & Guilds 7540 Unit 005

Creating a procedural computer program using COBOL Level 2 Notes for City & Guilds 7540 Unit 005 Creating a procedural computer program using COBOL Level 2 Notes for City & Guilds 7540 Unit 005 Compatible with Micro Focus Net Express 5.0 COBOL compiler Version 1 Tench Computing Ltd Pines Glendale

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

COMPUTER EDUCATION TECHNIQUES, INC. (COBOL_QUIZ- 4.8) SA:

COMPUTER EDUCATION TECHNIQUES, INC. (COBOL_QUIZ- 4.8) SA: In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions. 3. Send this assessment with the answers via: a. FAX to (212) 967-3498. Or b. Mail the answers

More information

RM/COBOL to RM/COBOL-85

RM/COBOL to RM/COBOL-85 Liant Software Corporation RM/COBOL to RM/COBOL-85 Conversion Guide Copyright 1989 2003. Liant Software Corporation. All rights reserved. No part of this publication may be reproduced, stored in a retrieval

More information

ASG-Rochade SCANCOB Release Notes

ASG-Rochade SCANCOB Release Notes ASG-Rochade SCANCOB Release Notes Version 3.10.007 March 8, 2007 CO31100-310 This publication contains information about all modifications made to ASG-Rochade SCANCOB (herein called SCANCOB) since Version

More information

1 class Lecture2 { 2 3 "Elementray Programming" / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch.

1 class Lecture2 { 2 3 Elementray Programming / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch. 1 class Lecture2 { 2 3 "Elementray Programming" 4 5 } 6 7 / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch. 2 in HS 11 / Zheng-Liang Lu Java Programming 41 / 68 Example Given the radius

More information

WR2QTP: Semantic Translator of WinRunner Scripts to QTP

WR2QTP: Semantic Translator of WinRunner Scripts to QTP WR2QTP: Semantic Translator of WinRunner Scripts to QTP BACKGROUND Automatic testing of Graphical User Interfaces (GUI) is critical, as software is increasingly becoming web-based and operated through

More information

unused unused unused unused unused unused

unused unused unused unused unused unused BCD numbers. In some applications, such as in the financial industry, the errors that can creep in due to converting numbers back and forth between decimal and binary is unacceptable. For these applications

More information

Request for Comments: 304 NIC: 9077 February 17, 1972 Categories: D3, D4, D7 Obsoletes: none Updates: none

Request for Comments: 304 NIC: 9077 February 17, 1972 Categories: D3, D4, D7 Obsoletes: none Updates: none Network Working Group D. B. McKay Request for Comments: 304 IBM NIC: 9077 February 17, 1972 Categories: D3, D4, D7 Obsoletes: none Updates: none Introduction A Data Management System Proposal for the ARPA

More information

false, import, new 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4

false, import, new 1 class Lecture2 { 2 3 Data types, Variables, and Operators 4 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4 5 } 6 7 // Keywords: 8 byte, short, int, long, char, float, double, boolean, true, false, import, new Zheng-Liang Lu Java Programming 44

More information

11. Architecture of Database Systems

11. Architecture of Database Systems 11. Architecture of Database Systems 11.1 Introduction Software systems generally have an architecture, ie. possessing of a structure (form) and organisation (function). The former describes identifiable

More information

Cursor Design Considerations For the Pointer-based Television

Cursor Design Considerations For the Pointer-based Television Hillcrest Labs Design Note Cursor Design Considerations For the Pointer-based Television Designing the cursor for a pointing-based television must consider factors that differ from the implementation of

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1

Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1 Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1 C is quirky, flawed, and an enormous success. While accidents of history surely helped,

More information

TABLE 1 HANDLING. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

TABLE 1 HANDLING. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. TABLE 1 HANDLING Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC Objectives You will learn: C C C C C C When to use a table How to allocate and initialize a table Differences between a subscripted and

More information

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

Just-In-Time Hypermedia

Just-In-Time Hypermedia A Journal of Software Engineering and Applications, 2013, 6, 32-36 doi:10.4236/jsea.2013.65b007 Published Online May 2013 (http://www.scirp.org/journal/jsea) Zong Chen 1, Li Zhang 2 1 School of Computer

More information

Expression Evaluation and Control Flow. Outline

Expression Evaluation and Control Flow. Outline Expression Evaluation and Control Flow In Text: Chapter 6 Outline Notation Operator Evaluation Order Operand Evaluation Order Overloaded operators Type conversions Short-circuit evaluation of conditions

More information

Section 1. The essence of COBOL programming. Mike Murach & Associates

Section 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 information

The New C Standard (Excerpted material)

The New C Standard (Excerpted material) The New C Standard (Excerpted material) An Economic and Cultural Derek M. Jones derek@knosof.co.uk Copyright 2002-2008 Derek M. Jones. All rights reserved. 1103 6.5.3.3 Unary arithmetic operators 6.5.3.3

More information

Data Types. (with Examples In Haskell) COMP 524: Programming Languages Srinivas Krishnan March 22, 2011

Data Types. (with Examples In Haskell) COMP 524: Programming Languages Srinivas Krishnan March 22, 2011 Data Types (with Examples In Haskell) COMP 524: Programming Languages Srinivas Krishnan March 22, 2011 Based in part on slides and notes by Bjoern 1 Brandenburg, S. Olivier and A. Block. 1 Data Types Hardware-level:

More information

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given MUHAMMAD FAISAL MIT 4 th Semester Al-Barq Campus (VGJW01) Gujranwala faisalgrw123@gmail.com MEGA File Solved MCQ s For Final TERM EXAMS CS508- Modern Programming Languages Question No: 1 ( Marks: 1 ) -

More information

Pagina 1 di 5 13.1.4. INSERT Syntax 13.1.4.1. INSERT... SELECT Syntax 13.1.4.2. INSERT DELAYED Syntax INSERT [LOW_PRIORITY DELAYED HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] VALUES ({expr

More information

Three things you should know about Automated Refactoring. When planning an application modernization strategy

Three things you should know about Automated Refactoring. When planning an application modernization strategy Three things you should know about Automated Refactoring When planning an application modernization strategy Three things you should know about Automated Refactoring when planning an application modernization

More information

CS112 Lecture: Primitive Types, Operators, Strings

CS112 Lecture: Primitive Types, Operators, Strings CS112 Lecture: Primitive Types, Operators, Strings Last revised 1/24/06 Objectives: 1. To explain the fundamental distinction between primitive types and reference types, and to introduce the Java primitive

More information

CSE 452: Programming Languages. Outline of Today s Lecture. Expressions. Expressions and Control Flow

CSE 452: Programming Languages. Outline of Today s Lecture. Expressions. Expressions and Control Flow CSE 452: Programming Languages Expressions and Control Flow Outline of Today s Lecture Expressions and Assignment Statements Arithmetic Expressions Overloaded Operators Type Conversions Relational and

More information

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning 4 Operations On Data 4.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three categories of operations performed on data.

More information

false, import, new 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4

false, import, new 1 class Lecture2 { 2 3 Data types, Variables, and Operators 4 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4 5 } 6 7 // Keywords: 8 byte, short, int, long, char, float, double, boolean, true, false, import, new Zheng-Liang Lu Java Programming 44

More information

LESSON 13: LANGUAGE TRANSLATION

LESSON 13: LANGUAGE TRANSLATION LESSON 13: LANGUAGE TRANSLATION Objective Interpreters and Compilers. Language Translation Phases. Interpreters and Compilers A COMPILER is a program that translates a complete source program into machine

More information

COBOL-SO: The new structured language

COBOL-SO: The new structured language COBOL-SO: The new structured language by JEROME GARFUNKEL Jerome Garfunkel Associates, Inc. Litchfield, Connecticut ABSTRACT This paper includes a presentation of the most important new features of COBOL-

More information

COBOL performance: Myths and Realities

COBOL 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

Part I Logic programming paradigm

Part I Logic programming paradigm Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two

More information

2/12/17. Goals of this Lecture. Historical context Princeton University Computer Science 217: Introduction to Programming Systems

2/12/17. Goals of this Lecture. Historical context Princeton University Computer Science 217: Introduction to Programming Systems Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1 For Your Amusement C is quirky, flawed, and an enormous success. While accidents of history

More information

Business Rules Extracted from Code

Business Rules Extracted from Code 1530 E. Dundee Rd., Suite 100 Palatine, Illinois 60074 United States of America Technical White Paper Version 2.2 1 Overview The purpose of this white paper is to describe the essential process for extracting

More information

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

CPS122 Lecture: From Python to Java last revised January 4, Objectives: Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

Software II: Principles of Programming Languages. Why Expressions?

Software II: Principles of Programming Languages. Why Expressions? Software II: Principles of Programming Languages Lecture 7 Expressions and Assignment Statements Why Expressions? Expressions are the fundamental means of specifying computations in a programming language

More information

Chapter 7. Expressions and Assignment Statements ISBN

Chapter 7. Expressions and Assignment Statements ISBN Chapter 7 Expressions and Assignment Statements ISBN 0-321-49362-1 Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit

More information

MACHINE INDEPENDENCE IN COMPILING*

MACHINE INDEPENDENCE IN COMPILING* MACHINE INDEPENDENCE IN COMPILING* Harry D. Huskey University of California Berkeley, California, USA Since 1958, there has been a substantial interest in the development of problem-oriented languages

More information

What do Compilers Produce?

What do Compilers Produce? What do Compilers Produce? Pure Machine Code Compilers may generate code for a particular machine, not assuming any operating system or library routines. This is pure code because it includes nothing beyond

More information

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for 1 Logistics Notes for 2016-09-07 1. We are still at 50. If you are still waiting and are not interested in knowing if a slot frees up, let me know. 2. There is a correction to HW 1, problem 4; the condition

More information

Chapter 7. Expressions and Assignment Statements

Chapter 7. Expressions and Assignment Statements Chapter 7 Expressions and Assignment Statements Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit Evaluation Assignment

More information

In the previous presentation, Erik Sintorn presented methods for practically constructing a DAG structure from a voxel data set.

In the previous presentation, Erik Sintorn presented methods for practically constructing a DAG structure from a voxel data set. 1 In the previous presentation, Erik Sintorn presented methods for practically constructing a DAG structure from a voxel data set. This presentation presents how such a DAG structure can be accessed immediately

More information

Model-Based Design for Large High Integrity Systems: A Discussion Regarding Model Architecture

Model-Based Design for Large High Integrity Systems: A Discussion Regarding Model Architecture Model-Based Design for Large High Integrity Systems: A Discussion Regarding Model Architecture By Mike Anthony and Jon Friedman MathWorks Inc, Natick, MA, 01760 INTRODUCTION From complex controls problems

More information

QIIBEE Security Audit

QIIBEE Security Audit PUBLIC QIIBEE Security Audit of QBX TOKEN Smart Contracts June 28, 2018 Produced for by Table Of Content Foreword...................................................... 1 Executive Summary................................................

More information

Legacy Metamorphosis. By Charles Finley, Transformix Computer Corporation

Legacy Metamorphosis. By Charles Finley, Transformix Computer Corporation Legacy Metamorphosis By Charles Finley, Transformix Computer Corporation Legacy Metamorphosis By Charles Finley, Transformix Computer Corporation Introduction A legacy application is any application based

More information

Programming Languages Third Edition. Chapter 7 Basic Semantics

Programming Languages Third Edition. Chapter 7 Basic Semantics Programming Languages Third Edition Chapter 7 Basic Semantics Objectives Understand attributes, binding, and semantic functions Understand declarations, blocks, and scope Learn how to construct a symbol

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Application generators: a case study

Application generators: a case study Application generators: a case study by JAMES H. WALDROP Hamilton Brothers Oil Company Denver, Colorado ABSTRACT Hamilton Brothers Oil Company recently implemented a complex accounting and finance system.

More information

Redvers Hashing Algorithm. User Guide. RCHASH Version 2.3

Redvers 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 information

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters. BLACK BOX SOFTWARE TESTING SPRING 2005 DOMAIN TESTING LAB PROJECT -- GRADING NOTES For all of the cases below, do the traditional equivalence class and boundary analysis. Draw one table and use a new line

More information

Chapter 7. Expressions and Assignment Statements

Chapter 7. Expressions and Assignment Statements Chapter 7 Expressions and Assignment Statements Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit Evaluation Assignment

More information

COBOL MOCK TEST COBOL MOCK TEST III

COBOL MOCK TEST COBOL MOCK TEST III http://www.tutorialspoint.com COBOL MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to COBOL Framework. You can download these sample mock tests at your

More information

The information contained in this manual is relevant to end-users, application programmers and system administrators.

The information contained in this manual is relevant to end-users, application programmers and system administrators. August 2002 2002 Preface Purpose This manual describes the GCOS 7 SQL CMA (Client Mode Access) product. This product is intended for anyone who wishes to perform networking operations with databases from

More information

COSC 243. Data Representation 3. Lecture 3 - Data Representation 3 1. COSC 243 (Computer Architecture)

COSC 243. Data Representation 3. Lecture 3 - Data Representation 3 1. COSC 243 (Computer Architecture) COSC 243 Data Representation 3 Lecture 3 - Data Representation 3 1 Data Representation Test Material Lectures 1, 2, and 3 Tutorials 1b, 2a, and 2b During Tutorial a Next Week 12 th and 13 th March If you

More information

2 nd Week Lecture Notes

2 nd Week Lecture Notes 2 nd Week Lecture Notes Scope of variables All the variables that we intend to use in a program must have been declared with its type specifier in an earlier point in the code, like we did in the previous

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language 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 information

UNIT-IV: MACRO PROCESSOR

UNIT-IV: MACRO PROCESSOR UNIT-IV: MACRO PROCESSOR A Macro represents a commonly used group of statements in the source programming language. A macro instruction (macro) is a notational convenience for the programmer o It allows

More information

CA-MetaCOBOL + Online Programming Language Guide. Release 1.1 R203M+11DRP

CA-MetaCOBOL + Online Programming Language Guide. Release 1.1 R203M+11DRP CA-MetaCOBOL + Online Programming Language Guide Release 1.1 R203M+11DRP -- PROPRIETARY AND CONFIDENTIAL INFORMATION -- This material contains, and is part of a computer software program which is, proprietary

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 08 Constants and Inline Functions Welcome to module 6 of Programming

More information

Explicit Conversion Operator Draft Working Paper

Explicit Conversion Operator Draft Working Paper Explicit Conversion Operator Draft Working Paper Lois Goldthwaite, Michael Wong IBM michaelw@ca.ibm.com ACCU Lois@LoisGoldthwaite.com Document number: N2223=07-0083 Date: 2007-03-11 Project: Programming

More information

Control Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003

Control Flow. COMS W1007 Introduction to Computer Science. Christopher Conway 3 June 2003 Control Flow COMS W1007 Introduction to Computer Science Christopher Conway 3 June 2003 Overflow from Last Time: Why Types? Assembly code is typeless. You can take any 32 bits in memory, say this is an

More information

Overview (4) CPE 101 mod/reusing slides from a UW course. Assignment Statement: Review. Why Study Expressions? D-1

Overview (4) CPE 101 mod/reusing slides from a UW course. Assignment Statement: Review. Why Study Expressions? D-1 CPE 101 mod/reusing slides from a UW course Overview (4) Lecture 4: Arithmetic Expressions Arithmetic expressions Integer and floating-point (double) types Unary and binary operators Precedence Associativity

More information

The type of all data used in a C (or C++) program must be specified

The type of all data used in a C (or C++) program must be specified The type of all data used in a C (or C++) program must be specified A data type is a description of the data being represented That is, a set of possible values and a set of operations on those values

More information

false, import, new 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4

false, import, new 1 class Lecture2 { 2 3 Data types, Variables, and Operators 4 1 class Lecture2 { 2 3 "Data types, Variables, and Operators" 4 5 } 6 7 // Keywords: 8 byte, short, int, long, char, float, double, boolean, true, false, import, new Zheng-Liang Lu Java Programming 44

More information

Annotation Annotation or block comments Provide high-level description and documentation of section of code More detail than simple comments

Annotation Annotation or block comments Provide high-level description and documentation of section of code More detail than simple comments Variables, Data Types, and More Introduction In this lesson will introduce and study C annotation and comments C variables Identifiers C data types First thoughts on good coding style Declarations vs.

More information

CS Programming In C

CS Programming In C CS 24000 - Programming In C Week Two: Basic C Program Organization and Data Types Zhiyuan Li Department of Computer Science Purdue University, USA 2 int main() { } return 0; The Simplest C Program C programs

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

Logic, Words, and Integers

Logic, Words, and Integers Computer Science 52 Logic, Words, and Integers 1 Words and Data The basic unit of information in a computer is the bit; it is simply a quantity that takes one of two values, 0 or 1. A sequence of k bits

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University CS 112 Introduction to Computing II Wayne Snyder Department Boston University Today: Java basics: Compilation vs Interpretation Program structure Statements Values Variables Types Operators and Expressions

More information

Moving Data and Printing Information. The Move Statement has The following Format: Move Identifier-1 To Identifier-2. Move Literal-1 To Identifier-2

Moving Data and Printing Information. The Move Statement has The following Format: Move Identifier-1 To Identifier-2. Move Literal-1 To Identifier-2 and Printing Information The Move Statement has The following Format: Format 1 Move Identifier-1 To Identifier-2 Format2 Move Literal-1 To Identifier-2 The Move Statement has the following components Sending

More information

SML Style Guide. Last Revised: 31st August 2011

SML Style Guide. Last Revised: 31st August 2011 SML Style Guide Last Revised: 31st August 2011 It is an old observation that the best writers sometimes disregard the rules of rhetoric. When they do so, however, the reader will usually find in the sentence

More information

Preface SCOPE AND OBJECTIVES INTENDED READERS

Preface SCOPE AND OBJECTIVES INTENDED READERS February 1992 Preface SCOPE AND OBJECTIVES This version of the Full IDS/II Reference Manual consists of two volumes containing information on the concepts, processors and languages necessary for the efficient

More information

INFS 214: Introduction to Computing

INFS 214: Introduction to Computing INFS 214: Introduction to Computing Session 11 Principles of Programming Lecturer: Dr. Ebenezer Ankrah, Dept. of Information Studies Contact Information: eankrah@ug.edu.gh College of Education School of

More information

Expressions and Assignment Statements

Expressions and Assignment Statements Expressions and Assignment Statements Introduction Expressions are the fundamental means of specifying computations in a programming language To understand expression evaluation, need to be familiar with

More information

Chapter 4. Operations on Data

Chapter 4. Operations on Data Chapter 4 Operations on Data 1 OBJECTIVES After reading this chapter, the reader should be able to: List the three categories of operations performed on data. Perform unary and binary logic operations

More information

Chapter 7. Expressions and Assignment Statements (updated edition 11) ISBN

Chapter 7. Expressions and Assignment Statements (updated edition 11) ISBN Chapter 7 Expressions and Assignment Statements (updated edition 11) ISBN 0-321-49362-1 Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean

More information

COMP2121: Microprocessors and Interfacing. Number Systems

COMP2121: Microprocessors and Interfacing. Number Systems COMP2121: Microprocessors and Interfacing Number Systems http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Overview Positional notation Decimal, hexadecimal, octal and binary Converting

More information

Modula-2 Legacy Code: Problems and Solutions. Excelsior, LLC

Modula-2 Legacy Code: Problems and Solutions. Excelsior, LLC Modula-2 Legacy Code: Problems and Solutions Excelsior, LLC April 28, 2000 Chapter 1 Introduction Back in 1980s, shortly after Modula-2 was introduced, is was called the programming language of the future.

More information

Adapter for Mainframe

Adapter for Mainframe BEA WebLogic Java Adapter for Mainframe Introduction Release 5.1 Document Date: August 2002 Copyright Copyright 2002 BEA Systems, Inc. All Rights Reserved. Restricted Rights Legend This software and documentation

More information

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS

APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 TRUE-FALSE FILL-IN-THE-BLANKS APPENDIX E SOLUTION TO CHAPTER SELF-TEST CHAPTER 1 2. F The AS/400 family of computers, as with all IBM midrange and mainframe computers, uses the EBCDIC coding system. 3. F Arrival sequence files do not

More information

Go Forth and Code. Jonathan Gertig. CSC 415: Programing Languages. Dr. Lyle

Go Forth and Code. Jonathan Gertig. CSC 415: Programing Languages. Dr. Lyle J o n a t h a n G e r t i g P a g e 1 Go Forth and Code Jonathan Gertig CSC 415: Programing Languages Dr. Lyle 2013 J o n a t h a n G e r t i g P a g e 2 Go dogs Go or A Brief History of Go 6 years ago

More information

LLVM code generation and implementation of nested functions for the SimpliC language

LLVM code generation and implementation of nested functions for the SimpliC language LLVM code generation and implementation of nested functions for the SimpliC language Oscar Legetth Lunds University dat12ole@student.lth.se Gustav Svensson Lunds University dat12gs1@student.lth.se Abstract

More information

COBOL for AIX, Version 4.1

COBOL 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 information

1.3b Type Conversion

1.3b Type Conversion 1.3b Type Conversion Type Conversion When we write expressions involved data that involves two different data types, such as multiplying an integer and floating point number, we need to perform a type

More information

Principles of Programming Languages. Lecture Outline

Principles of Programming Languages. Lecture Outline Principles of Programming Languages CS 492 Lecture 1 Based on Notes by William Albritton 1 Lecture Outline Reasons for studying concepts of programming languages Programming domains Language evaluation

More information

CPS122 Lecture: From Python to Java

CPS122 Lecture: From Python to Java Objectives: CPS122 Lecture: From Python to Java last revised January 7, 2013 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

Lambda Correctness and Usability Issues

Lambda Correctness and Usability Issues Doc No: WG21 N3424 =.16 12-0114 Date: 2012-09-23 Reply to: Herb Sutter (hsutter@microsoft.com) Subgroup: EWG Evolution Lambda Correctness and Usability Issues Herb Sutter Lambda functions are a hit they

More information

What Every Programmer Should Know About Floating-Point Arithmetic

What Every Programmer Should Know About Floating-Point Arithmetic What Every Programmer Should Know About Floating-Point Arithmetic Last updated: October 15, 2015 Contents 1 Why don t my numbers add up? 3 2 Basic Answers 3 2.1 Why don t my numbers, like 0.1 + 0.2 add

More information

Chapter 7: Statement Generator

Chapter 7: Statement Generator Chapter 7: Statement Generator CHAPTER 7: STATEMENT GENERATOR... 1 STATEMENT GENERATOR OVERVIEW... 1 PARAMETER FORMATS... 2 CONTROL (TYPE 3 PARAMETER)... 2 Type 3 Parameter Fields... 2 ADDITIONAL GROUPS

More information

Oracle Warehouse Builder 10g Release 2 Integrating COBOL Based Legacy Data

Oracle Warehouse Builder 10g Release 2 Integrating COBOL Based Legacy Data Oracle Warehouse Builder 10g Release 2 Integrating COBOL Based Legacy Data March 2007 Note: This document is for informational purposes. It is not a commitment to deliver any material, code, or functionality,

More information

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. [MS-GRVRDB]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,

More information

COBOL Unbounded Loops A Diatribe On Their Omission From the COBOL Standard (and a Plea for Understanding)

COBOL Unbounded Loops A Diatribe On Their Omission From the COBOL Standard (and a Plea for Understanding) 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

More information

Volume II, Section 5 Table of Contents

Volume II, Section 5 Table of Contents Volume II, Section 5 Table of Contents 5...5-1 5.1 Scope...5-1 5.2 Basis of...5-1 5.3 Initial Review of Documentation...5-2 5.4 Source Code Review...5-2 5.4.1 Control Constructs...5-3 5.4.1.1 Replacement

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

Chapter 7. Expressions and Assignment Statements ISBN

Chapter 7. Expressions and Assignment Statements ISBN Chapter 7 Expressions and Assignment Statements ISBN 0-321-33025-0 Chapter 7 Topics Introduction Arithmetic Expressions Overloaded Operators Type Conversions Relational and Boolean Expressions Short-Circuit

More information