GNU COBOL Programmer's Guide

Total Page:16

File Type:pdf, Size:1020Kb

GNU COBOL Programmer's Guide GNU COBOL Programmer's Guide For Version 2.1 [23NOV2013] Gary L. Cutler ([email protected]). This manual documents GNU COBOL 2.1, 23NOV2013 build. GNU-COBOL Copyright 2002-2007 Keisuke Nishida Copyright 2007-2012 Roger While Copyright 2013-2013 Ron Norman (RWCS for GNU COBOL) Document Copyright 2009-2014 Gary L. Cutler Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License [FDL], Version 1.3 or any later version published by the Free Software Foundation; with Invariant Section "Introduction", no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". GNU COBOL 2.1 [23NOV2013] Programmer's Guide i Table of Contents 1. Introduction ::::::::::::::::::::::::::::::::::::: 1 1.1. Additional Reference Sources ::::::::::::::::::::::::::::::::::: 1 1.2. Introducing COBOL :::::::::::::::::::::::::::::::::::::::::::: 1 1.2.1. Why YOU Should Learn COBOL :::::::::::::::::::::::::: 2 1.2.2. Programmer Productivity :::::::::::::::::::::::::::::::::: 4 1.3. So What is GNU COBOL?:::::::::::::::::::::::::::::::::::::: 5 1.3.1. Language Reserved Words ::::::::::::::::::::::::::::::::: 6 1.3.2. User-Defined Words :::::::::::::::::::::::::::::::::::::::: 6 1.3.3. Case Insensitivity :::::::::::::::::::::::::::::::::::::::::: 7 1.3.4. Readability of Programs ::::::::::::::::::::::::::::::::::: 7 1.3.5. Divisions Organize Programs :::::::::::::::::::::::::::::: 10 1.3.6. Copybooks:::::::::::::::::::::::::::::::::::::::::::::::: 10 1.3.7. Structured Data :::::::::::::::::::::::::::::::::::::::::: 10 1.3.8. Files :::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 1.3.9. Table Handling ::::::::::::::::::::::::::::::::::::::::::: 15 1.3.10. Sorting and Merging Data ::::::::::::::::::::::::::::::: 15 1.3.11. String Manipulation Features :::::::::::::::::::::::::::: 16 1.3.12. Screen Formatting Features :::::::::::::::::::::::::::::: 18 1.3.12.1. A Sample Screen:::::::::::::::::::::::::::::::::::: 19 1.3.12.2. Color Palette and Video Attributes:::::::::::::::::: 20 1.3.13. Report Writer Features :::::::::::::::::::::::::::::::::: 22 1.3.14. Data Initialization ::::::::::::::::::::::::::::::::::::::: 23 1.3.15. Syntax Diagram Conventions :::::::::::::::::::::::::::: 24 1.3.16. Format of Program Source Lines ::::::::::::::::::::::::: 26 1.3.17. Program Structure::::::::::::::::::::::::::::::::::::::: 29 1.3.18. Comments ::::::::::::::::::::::::::::::::::::::::::::::: 31 1.3.19. Literals :::::::::::::::::::::::::::::::::::::::::::::::::: 32 1.3.19.1. Numeric Literals :::::::::::::::::::::::::::::::::::: 33 1.3.19.2. Alphanumeric Literals :::::::::::::::::::::::::::::: 33 1.3.19.3. Figurative Constants:::::::::::::::::::::::::::::::: 35 1.3.20. Punctuation ::::::::::::::::::::::::::::::::::::::::::::: 36 1.3.21. LENGTH OF:::::::::::::::::::::::::::::::::::::::::::: 36 1.3.22. Interfacing to Other Environments ::::::::::::::::::::::: 37 2. CDF - Compiler Directing Facility ::::::::::: 39 2.1. COPY::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 40 2.2. REPLACE :::::::::::::::::::::::::::::::::::::::::::::::::::: 42 2.3. >>DEFINE :::::::::::::::::::::::::::::::::::::::::::::::::::: 45 2.4. >>IF::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 46 2.5. >>SET :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 2.6. >>SOURCE ::::::::::::::::::::::::::::::::::::::::::::::::::: 50 2.7. >>TURN :::::::::::::::::::::::::::::::::::::::::::::::::::::: 51 3 June 2014 Contents ii GNU COBOL 2.1 [23NOV2013] Programmer's Guide 3. IDENTIFICATION DIVISION ::::::::::::::: 53 4. ENVIRONMENT DIVISION ::::::::::::::::: 55 4.1. CONFIGURATION SECTION :::::::::::::::::::::::::::::::: 56 4.1.1. SOURCE-COMPUTER::::::::::::::::::::::::::::::::::: 57 4.1.2. OBJECT-COMPUTER ::::::::::::::::::::::::::::::::::: 58 4.1.3. REPOSITORY ::::::::::::::::::::::::::::::::::::::::::: 60 4.1.4. SPECIAL-NAMES:::::::::::::::::::::::::::::::::::::::: 62 4.1.4.1. Alphabet-Name-Clause::::::::::::::::::::::::::::::: 67 4.1.4.2. Class-Definition-Clause::::::::::::::::::::::::::::::: 69 4.1.4.3. Switch-Definition-Clause ::::::::::::::::::::::::::::: 70 4.1.4.4. Symbolic-Characters-Clause :::::::::::::::::::::::::: 71 4.2. INPUT-OUTPUT SECTION :::::::::::::::::::::::::::::::::: 72 4.2.1. SELECT ::::::::::::::::::::::::::::::::::::::::::::::::: 73 4.2.1.1. ORGANIZATION SEQUENTIAL :::::::::::::::::::: 78 4.2.1.2. ORGANIZATION LINE SEQUENTIAL:::::::::::::: 80 4.2.1.3. ORGANIZATION RELATIVE ::::::::::::::::::::::: 82 4.2.1.4. ORGANIZATION INDEXED :::::::::::::::::::::::: 84 4.2.2. MULTIPLE FILE :::::::::::::::::::::::::::::::::::::::: 86 4.2.3. SAME RECORD AREA :::::::::::::::::::::::::::::::::: 87 5. DATA DIVISION :::::::::::::::::::::::::::::: 89 5.1. Data Definition Principles ::::::::::::::::::::::::::::::::::::: 90 5.2. FILE SECTION ::::::::::::::::::::::::::::::::::::::::::::::: 93 5.2.1. File/Sort-Description ::::::::::::::::::::::::::::::::::::: 94 5.2.2. FILE-SECTION-Data-Item ::::::::::::::::::::::::::::::: 98 5.3. WORKING-STORAGE SECTION ::::::::::::::::::::::::::: 100 5.4. LOCAL-STORAGE SECTION ::::::::::::::::::::::::::::::: 102 5.5. LINKAGE SECTION :::::::::::::::::::::::::::::::::::::::: 104 5.6. REPORT SECTION ::::::::::::::::::::::::::::::::::::::::: 107 5.6.1. Report Group Definitions :::::::::::::::::::::::::::::::: 111 5.6.2. REPORT SECTION Data Items ::::::::::::::::::::::::: 113 5.7. SCREEN SECTION :::::::::::::::::::::::::::::::::::::::::: 115 5.8. Special Data Items ::::::::::::::::::::::::::::::::::::::::::: 118 5.8.1. 01-Level Constants :::::::::::::::::::::::::::::::::::::: 118 5.8.2. 66-Level Data Items ::::::::::::::::::::::::::::::::::::: 121 5.8.3. 77-Level Data Items ::::::::::::::::::::::::::::::::::::: 122 5.8.4. 78-Level Data Items ::::::::::::::::::::::::::::::::::::: 123 5.8.5. 88-Level Data Items ::::::::::::::::::::::::::::::::::::: 124 5.9. Data Description Clauses ::::::::::::::::::::::::::::::::::::: 125 5.9.1. ANY LENGTH:::::::::::::::::::::::::::::::::::::::::: 125 5.9.2. AUTO::::::::::::::::::::::::::::::::::::::::::::::::::: 126 5.9.3. AUTO-SKIP :::::::::::::::::::::::::::::::::::::::::::: 127 5.9.4. AUTOTERMINATE :::::::::::::::::::::::::::::::::::: 128 5.9.5. BACKGROUND-COLOR:::::::::::::::::::::::::::::::: 129 5.9.6. BASED ::::::::::::::::::::::::::::::::::::::::::::::::: 130 Contents 3 June 2014 GNU COBOL 2.1 [23NOV2013] Programmer's Guide iii 5.9.7. BEEP ::::::::::::::::::::::::::::::::::::::::::::::::::: 131 5.9.8. BELL ::::::::::::::::::::::::::::::::::::::::::::::::::: 132 5.9.9. BLANK ::::::::::::::::::::::::::::::::::::::::::::::::: 133 5.9.10. BLANK WHEN ZERO ::::::::::::::::::::::::::::::::: 134 5.9.11. BLINK ::::::::::::::::::::::::::::::::::::::::::::::::: 135 5.9.12. COLUMN :::::::::::::::::::::::::::::::::::::::::::::: 136 5.9.13. CONSTANT ::::::::::::::::::::::::::::::::::::::::::: 138 5.9.14. EMPTY-CHECK::::::::::::::::::::::::::::::::::::::: 139 5.9.15. ERASE :::::::::::::::::::::::::::::::::::::::::::::::: 140 5.9.16. EXTERNAL ::::::::::::::::::::::::::::::::::::::::::: 141 5.9.17. FALSE ::::::::::::::::::::::::::::::::::::::::::::::::: 142 5.9.18. FOREGROUND-COLOR::::::::::::::::::::::::::::::: 143 5.9.19. FROM ::::::::::::::::::::::::::::::::::::::::::::::::: 144 5.9.20. FULL :::::::::::::::::::::::::::::::::::::::::::::::::: 145 5.9.21. GLOBAL :::::::::::::::::::::::::::::::::::::::::::::: 146 5.9.22. GROUP INDICATE:::::::::::::::::::::::::::::::::::: 147 5.9.23. HIGHLIGHT ::::::::::::::::::::::::::::::::::::::::::: 148 5.9.24. JUSTIFIED :::::::::::::::::::::::::::::::::::::::::::: 149 5.9.25. LEFTLINE::::::::::::::::::::::::::::::::::::::::::::: 151 5.9.26. LENGTH-CHECK ::::::::::::::::::::::::::::::::::::: 152 5.9.27. LINE::::::::::::::::::::::::::::::::::::::::::::::::::: 153 5.9.28. LOWLIGHT ::::::::::::::::::::::::::::::::::::::::::: 155 5.9.29. NEXT GROUP :::::::::::::::::::::::::::::::::::::::: 156 5.9.30. NO-ECHO ::::::::::::::::::::::::::::::::::::::::::::: 157 5.9.31. OCCURS :::::::::::::::::::::::::::::::::::::::::::::: 158 5.9.32. OVERLINE :::::::::::::::::::::::::::::::::::::::::::: 161 5.9.33. PICTURE:::::::::::::::::::::::::::::::::::::::::::::: 162 5.9.34. PRESENT WHEN ::::::::::::::::::::::::::::::::::::: 170 5.9.35. PROMPT :::::::::::::::::::::::::::::::::::::::::::::: 171 5.9.36. REDEFINES ::::::::::::::::::::::::::::::::::::::::::: 172 5.9.37. RENAMES::::::::::::::::::::::::::::::::::::::::::::: 173 5.9.38. REQUIRED :::::::::::::::::::::::::::::::::::::::::::: 174 5.9.39. REVERSE-VIDEO ::::::::::::::::::::::::::::::::::::: 175 5.9.40. SECURE ::::::::::::::::::::::::::::::::::::::::::::::: 176 5.9.41. SIGN IS :::::::::::::::::::::::::::::::::::::::::::::::: 177 5.9.42. SOURCE::::::::::::::::::::::::::::::::::::::::::::::: 178 5.9.43. SUM OF ::::::::::::::::::::::::::::::::::::::::::::::: 179 5.9.44. SYNCRONIZED ::::::::::::::::::::::::::::::::::::::: 181 5.9.45. TO ::::::::::::::::::::::::::::::::::::::::::::::::::::: 183 5.9.46. TYPE :::::::::::::::::::::::::::::::::::::::::::::::::: 184 5.9.47. UNDERLINE :::::::::::::::::::::::::::::::::::::::::: 185 5.9.48. USAGE :::::::::::::::::::::::::::::::::::::::::::::::: 186 5.9.49. USING ::::::::::::::::::::::::::::::::::::::::::::::::: 196 5.9.50. VALUE :::::::::::::::::::::::::::::::::::::::::::::::: 197 3 June 2014 Contents iv GNU COBOL 2.1 [23NOV2013] Programmer's Guide 6. PROCEDURE DIVISION ::::::::::::::::::: 201 6.1. PROCEDURE DIVISION USING :::::::::::::::::::::::::::: 202 6.2. PROCEDURE
Recommended publications
  • Writing Fast Fortran Routines for Python
    Writing fast Fortran routines for Python Table of contents Table of contents ............................................................................................................................ 1 Overview ......................................................................................................................................... 2 Installation ...................................................................................................................................... 2 Basic Fortran programming ............................................................................................................ 3 A Fortran case study ....................................................................................................................... 8 Maximizing computational efficiency in Fortran code ................................................................. 12 Multiple functions in each Fortran file ......................................................................................... 14 Compiling and debugging ............................................................................................................ 15 Preparing code for f2py ................................................................................................................ 16 Running f2py ................................................................................................................................. 17 Help with f2py ..............................................................................................................................
    [Show full text]
  • 1. Introduction to Structured Programming 2. Functions
    UNIT -3Syllabus: Introduction to structured programming, Functions – basics, user defined functions, inter functions communication, Standard functions, Storage classes- auto, register, static, extern,scope rules, arrays to functions, recursive functions, example C programs. String – Basic concepts, String Input / Output functions, arrays of strings, string handling functions, strings to functions, C programming examples. 1. Introduction to structured programming Software engineering is a discipline that is concerned with the construction of robust and reliable computer programs. Just as civil engineers use tried and tested methods for the construction of buildings, software engineers use accepted methods for analyzing a problem to be solved, a blueprint or plan for the design of the solution and a construction method that minimizes the risk of error. The structured programming approach to program design was based on the following method. i. To solve a large problem, break the problem into several pieces and work on each piece separately. ii. To solve each piece, treat it as a new problem that can itself be broken down into smaller problems; iii. Repeat the process with each new piece until each can be solved directly, without further decomposition. 2. Functions - Basics In programming, a function is a segment that groups code to perform a specific task. A C program has at least one function main().Without main() function, there is technically no C program. Types of C functions There are two types of functions in C programming: 1. Library functions 2. User defined functions 1 Library functions Library functions are the in-built function in C programming system. For example: main() - The execution of every C program starts form this main() function.
    [Show full text]
  • Version 7.8-Systemd
    Linux From Scratch Version 7.8-systemd Created by Gerard Beekmans Edited by Douglas R. Reno Linux From Scratch: Version 7.8-systemd by Created by Gerard Beekmans and Edited by Douglas R. Reno Copyright © 1999-2015 Gerard Beekmans Copyright © 1999-2015, Gerard Beekmans All rights reserved. This book is licensed under a Creative Commons License. Computer instructions may be extracted from the book under the MIT License. Linux® is a registered trademark of Linus Torvalds. Linux From Scratch - Version 7.8-systemd Table of Contents Preface .......................................................................................................................................................................... vii i. Foreword ............................................................................................................................................................. vii ii. Audience ............................................................................................................................................................ vii iii. LFS Target Architectures ................................................................................................................................ viii iv. LFS and Standards ............................................................................................................................................ ix v. Rationale for Packages in the Book .................................................................................................................... x vi. Prerequisites
    [Show full text]
  • Scope in Fortran 90
    Scope in Fortran 90 The scope of objects (variables, named constants, subprograms) within a program is the portion of the program in which the object is visible (can be use and, if it is a variable, modified). It is important to understand the scope of objects not only so that we know where to define an object we wish to use, but also what portion of a program unit is effected when, for example, a variable is changed, and, what errors might occur when using identifiers declared in other program sections. Objects declared in a program unit (a main program section, module, or external subprogram) are visible throughout that program unit, including any internal subprograms it hosts. Such objects are said to be global. Objects are not visible between program units. This is illustrated in Figure 1. Figure 1: The figure shows three program units. Main program unit Main is a host to the internal function F1. The module program unit Mod is a host to internal function F2. The external subroutine Sub hosts internal function F3. Objects declared inside a program unit are global; they are visible anywhere in the program unit including in any internal subprograms that it hosts. Objects in one program unit are not visible in another program unit, for example variable X and function F3 are not visible to the module program unit Mod. Objects in the module Mod can be imported to the main program section via the USE statement, see later in this section. Data declared in an internal subprogram is only visible to that subprogram; i.e.
    [Show full text]
  • Use of Third Party Libraries Docker Postgres-9.6.6
    Docker postgres-9.6.6 - Use of Third Party Libraries Name Selected License libc-utils 0.7 (BSD) BSD-Style License libedit 20150325.3.1 (BSD) BSD-Style License libuuid 2.28.2 (BSD-3) BSD-Style License readline 6.3 (GPL) GNU General Public License alpine-baselayout 3.0.4 (GPL v2) GNU General Public License v2.0 apk-tools 2.6.9 (GPL v2) GNU General Public License v2.0 busybox 1.25.1 (GPL v2) GNU General Public License v2.0 scanelf 1.1.6 (GPL2) GNU General Public License v2.0 bash 4.3.46 (GPL v3) GNU General Public License v3.0 or later libgcrypt 1.7.9 (LGPL v2.1) GNU Library General Public License v2.0 or later libgpg-error 1.24 (LGPL v2.1) GNU Library General Public License v2.0 or later alpine-keys 1.3-r0 (MIT) MIT License (also X11) libxml2 2.9.4 (MIT) MIT License (also X11) libxslt 1.1.29 (MIT) MIT License (also X11) su-exec 0.2 (MIT) MIT License (also X11) musl 1.1.15 (MIT) MIT-Style License musl-utils 1.1.15 (MIT) MIT-Style License ncurses-libs 6.0 (MIT) MIT-Style License libcrypto1.0 1.0.2m (openssl) OpenSSL License libressl2.4-libcrypto 2.4.4 (OpenSSL) OpenSSL License libressl2.4-libssl 2.4.4 (OpenSSL) OpenSSL License libssl1.0 1.0.2m (OpenSSL) OpenSSL License tzdata 2016i (Public Domain) Public Domain postgres-9.6.6-alpine-3.5.2 (PostgreSQL) The PostgreSQL License ncurses-terminfo 6.0 (MIT) X11 License ncurses-terminfo-base 6.0 (MIT) X11 License zlib 1.2.11 (zlib) zlib License Docker postgres-9.6.6 - Third-Party Notices Report [alpine-baselayout 3.0.4 (GPL v2)] Copyright Statements TOC 1.3.1 1 License Agreements Recipients who would like to receive a copy of such source code should submit a request to Tripwire by email, at [email protected].
    [Show full text]
  • UG1144 (V2020.1) July 24, 2020 Revision History
    See all versions of this document PetaLinux Tools Documentation Reference Guide UG1144 (v2020.1) July 24, 2020 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 07/24/2020 Version 2020.1 Appendix H: Partitioning and Formatting an SD Card Added a new appendix. 06/03/2020 Version 2020.1 Chapter 2: Setting Up Your Environment Added the Installing a Preferred eSDK as part of the PetaLinux Tool section. Chapter 4: Configuring and Building Added the PetaLinux Commands with Equivalent devtool Commands section. Chapter 6: Upgrading the Workspace Added new sections: petalinux-upgrade Options, Upgrading Between Minor Releases (2020.1 Tool with 2020.2 Tool) , Upgrading the Installed Tool with More Platforms, and Upgrading the Installed Tool with your Customized Platform. Chapter 7: Customizing the Project Added new sections: Creating Partitioned Images Using Wic and Configuring SD Card ext File System Boot. Chapter 8: Customizing the Root File System Added the Appending Root File System Packages section. Chapter 10: Advanced Configurations Updated PetaLinux Menuconfig System. Chapter 11: Yocto Features Added the Adding Extra Users to the PetaLinux System section. Appendix A: Migration Added Tool/Project Directory Structure. UG1144 (v2020.1) July 24, 2020Send Feedback www.xilinx.com PetaLinux Tools Documentation Reference Guide 2 Table of Contents Revision History...............................................................................................................2
    [Show full text]
  • 3. Fortran Program Interfaces
    Chapter 3 3. Fortran Program Interfaces Sometimes it is necessary to create a program that combines modules written in Fortran and another language. For example, • In a Fortran program, you need access to a facility that is only available as a C function, such as a member of a graphics library. • In a program in another language, you need access to a computation that has been implemented as a Fortran subprogram, for example one of the many well-tested, efficient routines in the BLAS library. Tip: Fortran subroutines and functions that give access to the IRIX system functions and other IRIX facilities already exist, and are documented in Chapter 4 of this manual. This chapter focuses on the interface between Fortran and the most common other language, C. However other language can be called, for example C++. Note: You should be aware that all compilers for a given version of IRIX use identical standard conventions for passing parameters in generated code. These conventions are documented at the machine instruction level in the MIPSpro Assembly Language Programmer's Guide, which also details the differences in the conventions used in different releases. How Fortran Treats Subprogram Names The Fortran compiler normally changes the names of subprograms and named common blocks while it translates the source file. When these names appear in the object file for reference by other modules, they are normally changed in two ways: • converted to all lowercase letters • extended with a final underscore ( _ ) character 27 Chapter 3: Fortran Program Interfaces Normally the following declarations SUBROUTINE MATRIX function MixedCase() COMMON /CBLK/a,b,c produce the identifiersmatrix_, mixedcase_, and cblk_ (all lowercase with appended underscore) in the generated object file.
    [Show full text]
  • Subroutines – Get Efficient
    Subroutines – get efficient So far: The code we have looked at so far has been sequential: Subroutines – getting efficient with Perl do this; do that; now do something; finish; Problem Bela Tiwari You need something to be done over and over, perhaps slightly [email protected] differently depending on the context Solution Environmental Genomics Thematic Programme Put the code in a subroutine and call the subroutine whenever needed. Data Centre http://envgen.nox.ac.uk Syntax: There are a number of correct ways you can define and use Subroutines – get efficient subroutines. One is: A subroutine is a named block of code that can be executed as many times #!/usr/bin/perl as you wish. some code here; some more here; An artificial example: lalala(); #declare and call the subroutine Instead of: a bit more code here; print “Hello everyone!”; exit(); #explicitly exit the program ############ You could use: sub lalala { #define the subroutine sub hello_sub { print "Hello everyone!\n“; } #subroutine definition code to define what lalala does; #code defining the functionality of lalala more defining lalala; &hello_sub; #call the subroutine return(); #end of subroutine – return to the program } Syntax: Outline review of previous slide: Subroutines – get efficient Syntax: #!/usr/bin/perl Permutations on the theme: lalala(); #call the subroutine Defining the whole subroutine within the script when it is first needed: sub hello_sub {print “Hello everyone\n”;} ########### sub lalala { #define the subroutine The use of an ampersand to call the subroutine: &hello_sub; return(); #end of subroutine – return to the program } Note: There are subtle differences in the syntax allowed and required by Perl depending on how you declare/define/call your subroutines.
    [Show full text]
  • Explain Function Declaration Prototype and Definition
    Explain Function Declaration Prototype And Definition ligatedreprobated,Sidearm feminizes and but road-hoggish Weylin vengefully. phonemic Roderich nose-dived never reckons her acetones. his carat! Unfabled Dubitative Dewey and ill-equippedclangour, his Jerzy stringer See an example of passing control passes to function declaration and definition containing its prototype Once which is declared in definition precedes its definition of declaring a body of. Check out to explain basic elements must be explained below. They gain in this browser for types to carry out into parts of functions return statement of your pdf request that same things within your program? Arguments and definitions are explained below for this causes an operator. What it into two. In definition and declare a great; control is declared in this parameter names as declaring extern are explained in expressions and ms student at runtime error. Classes and definition was tested in a, and never executed but it will be called formal parameters are expanded at later. There are definitions to prototype definition tells the value method of an example are a function based on the warnings have had been declared. Please enter valid prototype definition looks a function definitions affects compilation. In this method is fixed words, but unlike references or rethrow errors or constants stand out its argument is only if more code by subclasses. How do is the variable of the three basic behavior of variable num to explain actual values of yours i desired. Also when a function num_multiplication function and definition example. By value of the definitions are explained in the nested function, the program passes to.
    [Show full text]
  • COBOL-Skills, Where Art Thou?
    DEGREE PROJECT IN COMPUTER ENGINEERING 180 CREDITS, BASIC LEVEL STOCKHOLM, SWEDEN 2016 COBOL-skills, Where art Thou? An assessment of future COBOL needs at Handelsbanken Samy Khatib KTH ROYAL INSTITUTE OF TECHNOLOGY i INFORMATION AND COMMUNICATION TECHNOLOGY Abstract The impending mass retirement of baby-boomer COBOL developers, has companies that wish to maintain their COBOL systems fearing a skill shortage. Due to the dominance of COBOL within the financial sector, COBOL will be continually developed over at least the coming decade. This thesis consists of two parts. The first part consists of a literature study of COBOL; both as a programming language and the skills required as a COBOL developer. Interviews were conducted with key Handelsbanken staff, regarding the current state of COBOL and the future of COBOL in Handelsbanken. The second part consists of a quantitative forecast of future COBOL workforce state in Handelsbanken. The forecast uses data that was gathered by sending out a questionnaire to all COBOL staff. The continued lack of COBOL developers entering the labor market may create a skill-shortage. It is crucial to gather the knowledge of the skilled developers before they retire, as changes in old COBOL systems may have gone undocumented, making it very hard for new developers to understand how the systems work without guidance. To mitigate the skill shortage and enable modernization, an extraction of the business knowledge from the systems should be done. Doing this before the current COBOL workforce retires will ease the understanding of the extracted data. The forecasts of Handelsbanken’s COBOL workforce are based on developer experience and hiring, averaged over the last five years.
    [Show full text]
  • Subprograms Subroutines Procedures Functions Methods
    Subprograms Subroutines 17/05/2017 Procedures Functions Methods An introduction DFR -- PL Subprograms 1 What is a subprogram? • A “code package” with a name, … • … and possibly parameters … • … and a type (functions) 17/05/2017 Inspired by the idea of a mathematical function BUT mathematical functions have only IN PARAMETERS SUBPROGRAMS may have IN, OUT & IN‐OUT parameters (ADA) DFR -- PL Subprograms Code abstractions – reusable, lead to more abstract design Modules and interfaces 2 Terminology & Ideas • Between different programming languages, the terminology is mixed • E.g. Lisp calls these “procedures” BUT they return a value • E.g. OO calls these “methods” 17/05/2017 • E.g. C calls them functions but allows a void type procedure • Subprograms introduce the concept of scope since they define a new “environment” • The scope of a name is the environment or environments in which the name is visible or accessible DFR -- PL Subprograms • This in turn leads to “name hiding” –when a name in a subroutine hides another object with the same name in an outer environment 3 • local and non‐local environments Parameters • Subprograms may have parameters • FORMAL PARAMETER IDENTIFIER 17/05/2017 • ACTUAL PARAMETER EXPRESSION • Examples 2 literal value 2+2 literal expression DFR -- PL Subprograms The actual parameters aidentifier are the ARGUMENTS to the subprogram f(x) function call a + f(x) * 2 expression 4 Parameters Parameter passing semantics also use mixed terminology! Call-by IN OUT IN-OUT Pass-by 17/05/2017 Value Reference Return DFR -- PL
    [Show full text]
  • C/C++ Compile Guide
    WizFi630S Guide C/C++ Compile Guide (Version 1.0.0) © 2019 WIZnet Co., Ltd. All Rights Reserved. For more information, please visit our website at http://www.wiznet.io/ © Copyright 2019 WIZnet Co., Ltd. All rights reserved. 1 WizFi630S Guide Document Revision History Date Revision Changes 2019-11-25 1.0 Release © Copyright 2019 WIZnet Co., Ltd. All rights reserved. 2 WizFi630S Guide Contents 1. Overview ................................................................................................................. 4 2. Download ................................................................................................................ 4 2.1 Prerequisites .................................................................................................. 4 2.2 Packages for Building Environment .......................................................... 4 2.3 OpenWRT Firmware Repository................................................................. 6 2.4 Menuconfig .................................................................................................... 7 3. Write C Code........................................................................................................... 7 3.1 Helloworld ...................................................................................................... 7 3.2 Make the Environment Script .................................................................... 8 4. Cross Compile ......................................................................................................... 8 4.1
    [Show full text]