COBOL Language Fundamentals Quick Start
()
About this ebook
This book will teach you the basic information and skills you need to develop applications with the COBOL programming language on IBM mainframe computers running z/OS. The instruction, examples and sample programs in this book are a fast track to becoming productive with COBOL as quickly as possible. The content of this book is easy to read and digest, well organized and focused on honing real job skills. Acquiring these skills is a key step in mastering COBOL application development so you'll be ready to perform effectively on an application development team.
Robert Wingate
Robert Wingate is a computer services professional with over 30 years of IBM mainframe and distributed programming experience. He holds several IBM certifications, including IBM Certified Application Developer - DB2 11 for z/OS, and IBM Certified Database Administrator for LUW. He lives in Fort Worth, Texas.
Read more from Robert Wingate
Interview Questions for IBM Mainframe Developers Rating: 1 out of 5 stars1/5IMS-DB Basic Training For Application Developers Rating: 0 out of 5 stars0 ratingsCOBOL Basic Training Using VSAM, IMS and DB2 Rating: 5 out of 5 stars5/5PLI Basic Training Using VSAM, IMS and DB2 Rating: 1 out of 5 stars1/5MVS JCL Utilities Quick Reference, Third Edition Rating: 5 out of 5 stars5/5
Related to COBOL Language Fundamentals Quick Start
Related ebooks
COBOL Programming Interview Questions: COBOL Job Interview Preparation Rating: 5 out of 5 stars5/5COBOL for the Approved Workman Rating: 0 out of 5 stars0 ratingsMainframe Interview Cases Rating: 0 out of 5 stars0 ratingsMvs Jcl in Plain English Rating: 5 out of 5 stars5/5Mastering COBOL Programming: A Comprehensive Guidebook Rating: 0 out of 5 stars0 ratingsCobol Rating: 0 out of 5 stars0 ratingsA Guide to Db2 Performance for Application Developers: Code for Performance from the Beginning Rating: 0 out of 5 stars0 ratingsDB2 10 for z/OS: The Smarter, Faster Way to Upgrade Rating: 0 out of 5 stars0 ratingsDB2 Interview Questions, Answers, and Explanations: DB2 Database Certification Review Rating: 0 out of 5 stars0 ratingsMathematician and Computer Scientist Grace Hopper Rating: 5 out of 5 stars5/5UNIX Shell Scripting Interview Questions, Answers, and Explanations: UNIX Shell Certification Review Rating: 5 out of 5 stars5/5UNIX Shell Programming Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsLearning .NET High-performance Programming Rating: 0 out of 5 stars0 ratingsOracle Quick Guides: Part 1 - Oracle Basics: Database and Tools Rating: 0 out of 5 stars0 ratingsLearn Batch File Programming! Rating: 1 out of 5 stars1/5IBM RPG A Complete Guide Rating: 0 out of 5 stars0 ratingsVisual Studio Code: End-to-End Editing and Debugging Tools for Web Developers Rating: 0 out of 5 stars0 ratingsSQL Database Programming: The Ultimate Guide to Learning SQL Database Programming Fast! Rating: 0 out of 5 stars0 ratingsJava for Black Jack: Learn the Java Programming Language in One Session by Writing and Running a Java-Based Card Game Simulation Rating: 0 out of 5 stars0 ratingsDB2 9.7 for Linux, UNIX, and Windows Database Administration: Certification Study Notes Rating: 5 out of 5 stars5/5IT Interview Guide for Freshers: Crack your IT interview with confidence Rating: 0 out of 5 stars0 ratingsSoftware documentation Third Edition Rating: 0 out of 5 stars0 ratingsJava 9 Programming By Example Rating: 4 out of 5 stars4/5Learn Docker - .NET Core, Java, Node.JS, PHP or Python: Learn Collection Rating: 5 out of 5 stars5/5JavaScript: Best Practices to Programming Code with JavaScript: JavaScript Computer Programming, #3 Rating: 0 out of 5 stars0 ratingsMastering COBOL Programming: From Basics to Expert Proficiency Rating: 0 out of 5 stars0 ratingsCOBOL Mastery: The Definitive Handbook for Modern Programming Rating: 0 out of 5 stars0 ratingsCOBOL Essentials: Definitive Reference for Developers and Engineers Rating: 0 out of 5 stars0 ratingsC Programming Concepts Rating: 0 out of 5 stars0 ratings
Business For You
On Writing Well, 30th Anniversary Edition: An Informal Guide to Writing Nonfiction Rating: 4 out of 5 stars4/5Company Rules: Or Everything I Know About Business I Learned from the CIA Rating: 4 out of 5 stars4/5The Everything Guide To Being A Paralegal: Winning Secrets to a Successful Career! Rating: 5 out of 5 stars5/5Becoming Bulletproof: Protect Yourself, Read People, Influence Situations, and Live Fearlessly Rating: 4 out of 5 stars4/5Collaborating with the Enemy: How to Work with People You Don't Agree with or Like or Trust Rating: 4 out of 5 stars4/5Your Next Five Moves: Master the Art of Business Strategy Rating: 5 out of 5 stars5/5Law of Connection: Lesson 10 from The 21 Irrefutable Laws of Leadership Rating: 4 out of 5 stars4/5The Intelligent Investor, Rev. Ed: The Definitive Book on Value Investing Rating: 4 out of 5 stars4/5The Richest Man in Babylon: The most inspiring book on wealth ever written Rating: 4 out of 5 stars4/5Never Split the Difference: Negotiating As If Your Life Depended On It Rating: 4 out of 5 stars4/5The Confidence Code: The Science and Art of Self-Assurance---What Women Should Know Rating: 4 out of 5 stars4/5The Energy Bus: 10 Rules to Fuel Your Life, Work, and Team with Positive Energy Rating: 3 out of 5 stars3/5Grant Writing For Dummies Rating: 5 out of 5 stars5/5Capitalism and Freedom Rating: 4 out of 5 stars4/5Emotional Intelligence: Exploring the Most Powerful Intelligence Ever Discovered Rating: 4 out of 5 stars4/5How to Think Like a Lawyer--and Why: A Common-Sense Guide to Everyday Dilemmas Rating: 4 out of 5 stars4/5The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers Rating: 4 out of 5 stars4/5High Conflict: Why We Get Trapped and How We Get Out Rating: 4 out of 5 stars4/5The Book of Beautiful Questions: The Powerful Questions That Will Help You Decide, Create, Connect, and Lead Rating: 4 out of 5 stars4/5Ultralearning: Master Hard Skills, Outsmart the Competition, and Accelerate Your Career Rating: 4 out of 5 stars4/5Robert's Rules Of Order: QuickStudy Laminated Reference Guide Rating: 5 out of 5 stars5/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Wise as Fu*k: Simple Truths to Guide You Through the Sh*tstorms of Life Rating: 5 out of 5 stars5/5Tools Of Titans: The Tactics, Routines, and Habits of Billionaires, Icons, and World-Class Performers Rating: 4 out of 5 stars4/5The Five Dysfunctions of a Team: A Leadership Fable, 20th Anniversary Edition Rating: 4 out of 5 stars4/5Stimulus Wreck: Rebuilding After a Financial Disaster Rating: 4 out of 5 stars4/5Financial Words You Should Know: Over 1,000 Essential Investment, Accounting, Real Estate, and Tax Words Rating: 4 out of 5 stars4/5Everybody Writes: Your Go-To Guide to Creating Ridiculously Good Content Rating: 4 out of 5 stars4/5
Reviews for COBOL Language Fundamentals Quick Start
0 ratings0 reviews
Book preview
COBOL Language Fundamentals Quick Start - Robert Wingate
LEGAL
Disclaimer
The contents of this book are based upon the author’s understanding of and experience with the COBOL language programming language. Every attempt has been made to provide correct information. However, the author and publisher do not guarantee the accuracy of every detail, nor do they assume responsibility for information included in or omitted from it. All of the information in this book should be used at your own risk.
Copyright
The contents of this book may not be copied in whole, or in part, without the explicit written permission of the author. The contents are intended for personal use only. Secondary distribution for gain is not allowed. Any alteration of the contents is absolutely forbidden.
Copyright, 2020 by Robert Wingate
DB2, DB2 UDB, UDB, and MVS are all registered trademarks of the IBM Corporation.
LEGAL
Introduction
Welcome
Assumptions:
Approach to Learning
COBOL Language Fundamentals
Introduction
COBOL Language Basics
Programming Format
Four Divisions
IDENTIFICATION DIVISION
ENVIRONMENT DIVISION
DATA DIVISION
PROCEDURE DIVISION
Optional Entries and Sections
Variables, Data Types and Assignment
Data Types
COMP Variables
Data Structures
Sample Program
Sequence, Selection, Iteration
Sequence
Selection
Iteration
File I/O
Program Listing for COBTRN3
Reporting
ANSI Carriage Control
Report Program Sample
Calculations
Calculations with GIVING
Calculations with COMPUTE
Edits and Validation
Tables
Sub Programs
Review Questions
Questions and Answers
Additional Resources
Other Titles by Robert Wingate
About the Author
Introduction
Welcome
Congratulations on your purchase of COBOL Language Fundamentals Quick Start. This book will teach you the basic information and skills you need to develop applications with COBOL on IBM mainframes running z/OS. The instruction, examples and sample programs in this book are a fast track to becoming productive as quickly as possible using basic COBOL. The content is easy to read and digest, well organized and focused on honing real job skills.
This is not an everything you need to know about COBOL
book. Rather, this text will teach you what you need to know to become productive quickly with COBOL. For additional detail, you can download and reference the IBM manuals and Redbooks associated with these products.
Assumptions:
While I do not assume that you know a great deal about IBM mainframe programming, I do assume that you’ve logged into an IBM mainframe and know your way around. Also I assume that you have a working knowledge of computer programming in some language (it can be a language other than COBOL). All in all, I assume you have:
1. A working knowledge of ISPF navigation and basic operations such as creating data sets.
2. A basic understanding of structured programming concepts.
4. Access to a mainframe computer running z/OS and DB2 (with a COBOL compiler available).
Approach to Learning
I suggest you follow along and do the examples yourself in your own test environment. There’s nothing like hands-on experience. Going through the motions will help you learn faster.
If you do not have access to a mainframe system through your job, I can recommend Mathru Technologies. You can rent a mainframe account from them at a very affordable rate, and their environment supports COBOL. The URL to the Mathru web site is:
http://mathrutech.com/index.html
Besides the instruction and examples, I’ve included questions at the end of each chapter. I recommend that you answer these and then check yourself against the answers in the back of the book.
Knowledge, experience and practice questions. Will that guarantee that you’ll succeed as a COBOL application developer? Of course, nothing is guaranteed in life. But if you put sufficient effort into this well-rounded training plan that includes all three of the above, I believe you have a very good chance of becoming productive as an IBM Application Developer as soon as possible. This is your chance to get a quick start!
Best of luck!
Robert Wingate
IBM Certified Application Developer – DB2 11 for z/OS
C:\Books\IBM Books\COBOL Language Fundamentals Quick Start\Kobo\COBOL Language Fundamentals Quick Start KOBO_files\image001.jpgCOBOL Language Fundamentals
Introduction
COBOL is an acronym for Common Business-Oriented Language. It’s a third generation procedural language that has been around since 1959. COBOL was developed primarily for business use. It generally focuses on record or database input/out, as well as calculations and reports.
You may hear that COBOL is gone or on the way out, but its demise is probably exaggerated. While lots of mainframe COBOL programming has been rewritten in other languages (or replaced by commercial packages), COBOL is still heavily used in legacy applications that run on IBM mainframe computers. This is true especially for banking and finance applications. Check out this article if you don’t believe it:
https://thenewstack.io/cobol-everywhere-will-maintain/
If you are used to programming in languages such as C or Java, you’ll find that COBOL is a bit more English-like. This can be an advantage or disadvantage depending on how you look at it. For example, a data assignment to a variable in most programming languages can be as simple as:
X = 27
In COBOL you would code this same operation as:
MOVE 27 TO X
The latter is somewhat more verbose. It also has the receiving variable on the right side of the equation which is different.
Also, in COBOL you can spell out Booleans such as > or < using English phrases, such as:
IF X IS GREATER THAN 100
Whatever your view of the verbosity, COBOL is a very usable language and worth learning. As legacy COBOL programmers retire, there is still much code to be maintained or converted. This chapter will help make you productive for these tasks quickly.
COBOL Language Basics
Programming Format
Unlike more freeform languages, COBOL is very particular about exactly where you can put executable code. Here is a summary of the formatting rules you must follow in COBOL.
image.jpg