Introduction to z/OS Basics © 2006 IBM Corporation Chapter 9: Using programming languages on z/OS.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Computers Are Your Future
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
Programming Creating programs that run on your PC
COSC 120 Computer Programming
Overview of Programming Paradigms
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computers: Tools for an Information Age
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 8: Designing and developing applications for z/OS.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
Chapter 8 The Tower of Babel. Chapter Outline Procedural languages Fortran, COBOL, PASCAL, C, Ada Object-oriented programming Special-purpose languages.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
© Prentice Hall CHAPTER 3 Computer Software.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Guide To UNIX Using Linux Third Edition
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 6: An Introduction to System Software and Virtual Machines
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
Programming Concepts and Languages Chapter 12 – Computers: Understanding Technology, 3 rd edition 1November
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Types of software. Sonam Dema..
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 7: Designing and developing applications for z/OS.
Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1.
CS102 Introduction to Computer Programming
© Paradigm Publishing Inc Chapter 12 Programming Concepts and Languages.
1 Chapter-01 Introduction to Computers and C++ Programming.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 8: Using programming languages on z/OS.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
Structured COBOL Programming, Stern & Stern, 9th edition
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Learning Objectives Data and Information Six Basic Operations Computer Operations Programs and Programming What is Programming? Types of Languages Levels.
Topics Introduction Hardware and Software How Computers Store Data
CC111 Lec#5: Program Development 1 Program Development and Programming Languages Lecture 4 Reference :Understanding Computers Chapter 13.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
Visual C++ Programming: Concepts and Projects
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Chapter One An Introduction to Programming and Visual Basic.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 11 Understanding transaction managers on z/OS.
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 1: Introduction to Computers and Programming.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
Chapter 12 Programming Concepts and Languages.
Chapter 1 Introduction(1.1)
Presentation transcript:

Introduction to z/OS Basics © 2006 IBM Corporation Chapter 9: Using programming languages on z/OS

Chapter 09 Programming Languages © 2006 IBM Corporation 2 Chapter objectives  Be able to:  List several common programming languages for the mainframe  Explain the differences between a compiled language and an interpreted language  Create a simple CLIST or REXX program  Choose an appropriate data file organization for an online application  Compare the advantages of a high level language to those of Assembler language  Explain the relationship between a data set name, a DD name, and the file name within a program  Explain how the use of z/OS Language Environment affects the decisions made by the application designer

Chapter 09 Programming Languages © 2006 IBM Corporation 3 Key terms in this chapter  assembler  binder  compiler  debugging  dynamic link library  generation  I/O (input/output)  interpreter  load modules  pre-processor  programming language  variable

Chapter 09 Programming Languages © 2006 IBM Corporation 4 Overview of programming languages  A programming language is the way that a programmer instructs a computer to perform functions  Computers only understand machine language  Machine language is in binary form and, thus, very difficult to write  Humans write programs in a programming language, which is converted into machine language for the computer to process  There are many programming languages that have evolved from machine language

Chapter 09 Programming Languages © 2006 IBM Corporation 5 Classification of programming languages  1 st generation –Machine language –specific to hardware and software  2 nd generation –Assembler language –Specific to hardware –Must be assembled –Symbolic machine instructions plus data structures corresponding to machine storage and registers

Chapter 09 Programming Languages © 2006 IBM Corporation 6 Classification of programming languages (continued)  3 rd generation –Procedural languages, known as high-level languages (HLL) –Example: COBOL –Must be translated (compiled) before execution –Usually portable (to an extent) across hardware and software platforms with a recompile  4 th generation – 4GL –Non-procedural languages –Report generators –Query languages –Examples: RPG, CSP, QMF, SQL

Chapter 09 Programming Languages © 2006 IBM Corporation 7 Classification of programming languages (continued)  Visual programming languages (or event-driven languages) –Visual Basic, Visual C++  Object-Oriented language –used in OO technology, e.g. Smalltalk, Java, C++  Other languages –3D applications  Scripting languages –Perl –REXX –HTML

Chapter 09 Programming Languages © 2006 IBM Corporation 8 Choosing a programming language for z/OS  Which language to use? Factors to consider include:  Response time requirements for the application  Budget allotted for development and ongoing support  Time constraints of the project  Whether subroutines will be coded in different languages  Whether to use a compiled or an interpreted language

Chapter 09 Programming Languages © 2006 IBM Corporation 9 Using Assembler language on z/OS  Assembler language –Not usually used for application development –Machine-specific  Used when: –Accessing bits or bytes –Accessing system control blocks –Execution efficiency is needed (performance) –Require high performance subroutines that can be called from HLL programs

Chapter 09 Programming Languages © 2006 IBM Corporation 10 From Assembler source to executable module

Chapter 09 Programming Languages © 2006 IBM Corporation 11 Using COBOL on z/OS  COBOL is an English-like programming language  Used for business-oriented applications  Capabilities of IBM Enterprise COBOL for z/OS and OS/390 –Integrate COBOL applications into Web-oriented business processes –Inter-operability with Java –Parsing of data in XML and Unicode formats

Chapter 09 Programming Languages © 2006 IBM Corporation 12 From HLL source to executable module

Chapter 09 Programming Languages © 2006 IBM Corporation 13 HLL relationship between JCL and program files //MYJOB JOB //STEP1 EXEC IGYWCLG INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INPUT ASSIGN TO INPUT SELECT DISKOUT ASSIGN TO OUTPUT1... FILE SECTION. FD INPUT1 BLOCK CONTAINS... DATA RECORD IS RECORD-IN 01 INPUT-RECORD... FD OUTPUT1 DATA RECORD IS RECOUT 01 OUTPUT-RECORD /* //GO.INPUT1 DD DSN=MY.INPUT,DISP=SHR //GO.OUTPUT1 DD DSN=MY.OUTPUT,DISP=OLD

Chapter 09 Programming Languages © 2006 IBM Corporation 14 HLL relationship between JCL and program (continued)  COBOL SELECT statement makes the link between the DDNAMEs INPUT1 and OUTPUT1 and the COBOL FDs INPUT1 and OUTPUT1 respectively  The COBOL FDs are associated with group items INPUT-RECORD and OUTPUT-RECORD  The program is completely independent of the location of the data or the name of the data sets.

Chapter 09 Programming Languages © 2006 IBM Corporation 15 Relationship between JCL, program, and data set

Chapter 09 Programming Languages © 2006 IBM Corporation 16 Using PL/I on z/OS  Full-function, general-purpose high-level programming language  Suited for –System programming –Commercial –Engineering/scientific, etc.  Less verbose than COBOL  Less English-like

Chapter 09 Programming Languages © 2006 IBM Corporation 17 HLL relationship between JCL and program files  Referring to physical files by a symbolic file name is used by all of the HLLs - even Assembler language  Isolates your program from changes to data set name and data set location –data set name and location can change without recompiling program  “Hard-coding” data set names or other such information in a program is not usually considered a good programming practice –Externalize these values from programs

Chapter 09 Programming Languages © 2006 IBM Corporation 18 HLL relationship between JCL and program files  //MYJOB JOB  //STEP1 EXEC CLG ...  OPEN FILE=INPUT1  OPEN FILE=OUTPUT1  READ FILE=INPUT1 ...  WRITE FILE=OUTPUT1 ...  CLOSE FILE=INPUT1  CLOSE FILE=OUTPUT1  /*  //GO.INPUT1 DD DSN=MY.INPUT,DISP=SHR  //GO.OUTPUT1 DD DSN=MY.OUTPUT,DISP=OLD

Chapter 09 Programming Languages © 2006 IBM Corporation 19 Using C/C++ on z/OS  C is a multi-purpose programming language  Suited for: –System-level code –Text processing –Graphics, etc.  C language contains concise set of statements, with functionality added through its library  C is highly consistent across different platforms

Chapter 09 Programming Languages © 2006 IBM Corporation 20 Using Java on z/OS  Java is an object-oriented programming language  Enterprise COBOL and Enterprise PL/I provide interfaces to programs written in Java Language. Also, DB2 and IMS.  Java is pervasive across the zSeries platform.  Java Native Interface (JNI) allows your program to call programs written in other languages. The JNI is part of the Java Development Kit.

Chapter 09 Programming Languages © 2006 IBM Corporation 21 Using CLISTs on z/OS  CLIST (pronounced "see list") is short for command list, because the most basic CLISTs are lists of TSO/E commands  CLIST language is an interpreted language (that is, you don't have to compile and link-edit it)  CLISTs are easy to write and test  CLIST and REXX languages: –Two command languages available in TSO/E  CLIST programming language is used for: –Performing routine tasks (entering TSO/E commands) –Invoking other CLISTs –Invoking applications written in other languages –ISPF applications (displaying panels, controlling application flow) –One-time quick solutions to problems

Chapter 09 Programming Languages © 2006 IBM Corporation 22 Using REXX on z/OS  Restructured Extended Executor (REXX) language is a procedural language  REXX is an interpreted and compiled language  REXX is a more full-function language than CLIST  REXX can be used for: –Performing routine tasks (entering TSO/E commands) –Invoking other REXX execs –Invoking applications written in other languages –ISPF applications (displaying panels, controlling application flow) –One-time quick solutions to problems –System programming –Anywhere that we might use another HLL compiled language

Chapter 09 Programming Languages © 2006 IBM Corporation 23 Compiled versus interpreted languages  Compiled versus interpreted: –A design-stage decision –Performance is slower with interpreted languages  Both compiled and interpreted languages have their strengths and weaknesses  No simple answer as to which is better -- it depends on the application. Within a single application, we might decide to use several programming languages.

Chapter 09 Programming Languages © 2006 IBM Corporation 24 Advantages of compiled languages  Assembler, COBOL, PL/I, C/C++ are translated by running the source code through a compiler  This results in very efficient code that can be executed any number of times  Often, the overhead for the translation is incurred just once, when the source is compiled; thereafter, it need only be loaded and executed  Compiled programs will be more efficient and performing  Interpreted languages are often parsed, interpreted, and executed each time that the program is run, increasing the cost of running the program

Chapter 09 Programming Languages © 2006 IBM Corporation 25 Advantages of interpreted languages  An interpretive language is relatively easy to code, test, and change  Good for one-time solutions  Good for developing application prototypes  Ad hoc versus fixed requests  Time saver for command strings that are entered repeatedly

Chapter 09 Programming Languages © 2006 IBM Corporation 26 Overview of Language Environment  Goals of application development today: –Modularize and share code –Develop applications on a Web-based front end  z/OS Language Environment product provides a common environment for all conforming high-level language (HLL) products: –Establishes a common language development and execution environment for application programmers on z/OS –Consolidates in a common runtime library, function previously provided in individual library products eliminating the need to maintain separate language libraries

Chapter 09 Programming Languages © 2006 IBM Corporation 27 Advantages of z/OS Language Environment  Establishes a common run-time environment for all participating HLLs  Combines essential run-time services, such as routines for run- time message handling, condition handling, and storage management  All of these services are available through a set of interfaces that are consistent across programming languages  You can use one run-time environment for your applications, regardless of the application's programming language or system resource needs  Your program can seamlessly call one language from another, to exploit the functions and features in each language

Chapter 09 Programming Languages © 2006 IBM Corporation 28 Language Environment components

Chapter 09 Programming Languages © 2006 IBM Corporation 29 Summary  The mainframe supports most programming languages in use today.  Your choice of a programming language depends on several factors, including the requirements of the application and the installation’s ability to maintain the application.  Depending on the application requirements, you might use multiple languages or assembler subroutines for certain parts.  Remember: When it is time to update the application, other people must be able to program these languages as well.  Complexity in design must always be weighed against ease of maintenance.