Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jon Sayles, IBM EcoSystems Team

Similar presentations


Presentation on theme: "Jon Sayles, IBM EcoSystems Team"— Presentation transcript:

1 Jon Sayles, IBM EcoSystems Team
Enterprise COBOL Education Using Rational Developer for System Z z/OS Terms and Concepts Jon Sayles, IBM EcoSystems Team

2 IBM Trademarks and Copyrights
© Copyright IBM Corporation 2007, All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. This information is based on current IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM Rational products and services are trademarks or registered trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.

3 Course Contributing Authors
Thanks to the following individuals, for assisting with this course: David Myers/IBM, Ka Yin Lam/IBM,

4 Purpose of This Document
Course Name: COBOL Foundation Training - with RDz Course Description: Learn the COBOL language, RDz and learn z/OS terms, concepts and development skills in this course. Pre-requisites: Some experience in a 3rd or 4th Generation Language is expected. SQL is also recommended. Course Length: 10 days Topics (Agenda) Getting Started - installing and configuring RDz - and the course materials, and using Eclipse to edit COBOL z/OS Terms and Concepts COBOL General Language Rules Basic COBOL Statements Data records and table handling Debugging Programs - Note: Deep dive on using RDz for common COBOL programming errors (001, 0C4, 0C7, infinite loops, fall-thru, etc.) Input/Output and Report Writing Patterns Sequential File Match/Merge Patterns COBOL Subprograms and the Linkage Section Structured Programming Concepts and Coding Patterns Advanced Character Manipulation, COBOL Intrinsic Functions, Date and Time coding patterns, and Language Environment calls OS/390 Concepts and JCL Compile/Link & Run Procs on the mainframe Indexed file Coding Patterns Sort/Merge and Master File Update Coding Patterns Accessing DB2 Data and Stored Procedures COBOL in the Real World: CICS - lecture only IMS (DL/I and TM) - ditto Batch processing - ditto Java calling COBOL COBOL and XML Statements SOA and COBOL - creating and calling Web Services Web 2.0 using Rich UI

5 Course Details Audience Prerequisites
This course is designed for application developers who have programmed in some language before, and who wish to learn COBOL. Prerequisites This course assumes that the student has the basic knowledge of IS technologies, data processing, software and have programmed for at least two or more years in a language such as: Java, VB, RPG, PL/1, Pascal, or some 4th Generation Language or tool. Knowledge of SQL (Structured Query Language) for database access is assumed as well. Basic PC and mouse-driven development skills is also assumed. Finally, it is assumed that you have been following along in this course, and have successfully completed the learning modules in sequence. Or have the equivalent COBOL background obtained through some other form of COBOL study or on-the-job work.

6 z/OS Terms and Concepts
UNIT z/OS Terms and Concepts Topics: z/OS Hardware Terms and Concepts z/OS Software Terms and Concepts COBOL and z/OS Integration Appendices

7 Topic objectives After completing this topic, you should be able to:
Describe the characteristics and define the following IBM hardware: Mainframes 3390 disk packs LPARs EBCDIC Multi-tier environments

8 Why Learn About the z/OS?
1. Very difficult to re-engineer the (up to 40 years of) production business functionality running on a mainframe (generally not cost-efficient & risky) 2. What they do for I/T shops – they do extremely well (proven & reliable): Large-scale capacity – by every standard of measurement: Support for 1,000s, 10,000s, 100,000s concurrent users 100,000s  1,000,000s TPS (transactions per/second) Hosting for dozens/hundreds of databases/files, measured in terabytes High-speed/secure/stable network access Able to support mixed environments and workloads. One box often hosts: OLTP (On-Line Transaction Processing), Batch processing, Ad-hoc processing Several testing regions Multiple logical (virtual) "machines" split from single box Even runs multiple operating systems concurrently (z/OS, Linux, z/VM) Extremely stable/secure production environment: If a mainframe box goes down once/per year it's unusual Recovery and data integrity mechanisms unparalleled Efficient, self-regulating operating system: Slicing/Prioritizing CPU cycles flexible, simple, cost-effective MIPS Prior generation names: OS/390, s/390 (system 390) …. s/370 (system 370), MVS (Multiple Virtual Storage)                   So why don't they just reverse engineer all that old COBOL hoo-haa and rewrite it in Java? Well, that's just not very easy. There are no automated language translators, and the amount of code that runs these production systems is in the trillions of lines (Gartner) world-wide. Single programs that contain between 20,000 and 50,000 lines of code (not size, lines-of-code) are not atypical. Ford Motor Company runs 50,000 (fifty thousand) batch COBOL jobs every night. Each job is composed of between 5 and 20 steps. Each step is a "load module" (linked programs) that number between 1,000 and 50,000 lines of code. You do the math. And before you run off thinking that this is simply the product of sloppy, poorly-designed and structured development, think again. These are the primary business rules that run the world's corporations. The rules are complex (that's why 6th graders aren't coding them). And, over time (as in 30+ years) the rules change – the code gets maintained, and the inevitable result is complexity that makes eBusiness applications look like "See Spot Run" reading primers. There are many other reasons for "why mainframes" – as described. Basically, think "economies of scale".

9 Terms and Concepts – Hardware
IBM z/10 series IBM s/90 G5/G6 Smallest workloads IBM z/990 series IBM z/Series 800 (Linux) - smaller workloads IBM z/900 series "The zSeries is the enterprise class e-business server optimized for integration, transactions and data of the next generation e-business world." IBM i/900 series Mid-range Mainframe Formerly: AS/400 So, here are the current crop of IBM mainframe boxes. They are almost all air-cooled, and extremely powerful. Note that there are two basic machines shown: z/xxx series – capable of running the new x/64-bit operating system, and I/xxx series – which is the contemporary version of the AS/400 machines. iSeries (old AS/400 … OS/400) - comes with DB2/400, MQ Series, DataQ support can call RPG programs (roughly 90% of AS/400 applications use the RPG programming language. Currently not supported in native RRD mode – but soon to be added) The IBM TotalStorage Enterprise Storage Server (ESS) Model 800 Capacity up to 56 Terabytes (that's 5,600 Gigabytes) Prior generation of technology names: DASD (Direct Access Storage Device

10 Logical Partition – LPAR
LPARs are the equivalent of a separate mainframe for most practical purposes Each LPAR runs its own operating system Devices can be shared across several LPARs Processors can be dedicated or shared When shared each LPAR is assigned a number of logical processors (up to the maximum number of physical processors) and a weighting Each LPAR is independent Development z/OS Test z/OS Production z/OS Linux Linux Linux Many installations used to have several boxes A single larger machines running many LPARs is often more cost effective, as software licenses for multiple small machines can total more than those for a single large one LPARs CPU Physical Processors CPU CPU CPU READ WRITE z/10 Main Memory

11 Disk Devices Current mainframes use 3390 disk devices
The original configuration was simple with a controller connected to the processor and strings of devices attached to the back end The DS8000 Enterprise Storage Server is a device that can manage disk devices It emulates a large number of control units and 3390 disks. It can also be partitioned and connect to UNIX and other systems as SCSI devices. There are 11/196 Terra-bytes of disk space up to 32 channel interfaces, 16/256 Giga-bytes cache and 284/Mega-Bytes of non-volatile memory

12 EBCDIC The IBM S/360 through to the latest zSeries machines use the Extended Binary Coded Decimal Interchange character set for most purposes This was developed before ASCII and is also an 8 bit character set z/OS Web Server stores ASCII data as most browsers run on PCs which expect ASCII data UNICODE is used for JAVA on the latest machines

13 Modern Multi-Tier Mainframe Systems
Client Tier Middle Tier Enterprise Tier Business Application Server Browser Client Legacy Systems Presentation Logic Business Objects Browser Client Database Server The middle tier employs a component based architecture The middle tier responsibilities include: Business objects Business application logic Presentation content generation Other middleware services Connection pooling, data caching, etc. Frameworks Java EE .NET Client See Slide Notes

14 z/OS Terms and Concepts
UNIT z/OS Terms and Concepts Topics: Hardware Terms and Concepts z/OS Software Terms and Concepts COBOL Program and z/OS Integration Appendices

15 Topic objectives After completing this topic, you should be able to:
Describe the characteristics and define the following IBM software terms and concepts: z/OS and mainframe operating system software Batch processing Online applications Transactions BMS MFS Mainframe file and database systems: VSAM/QSAM files DL/I (IMS) databases DB2 databases Mainframe development software (traditional) Tools Development process Procedural languages

16 Terms and Concepts – Operating Systems
Mainframe Description Network/PC Equivalent ======== ====================================================== ====================== z/OS Latest mainframe operating system UNIX/Linux/Windows XP "z" refers to 64-bit addressing "z-architecture" – z/OS is "Self-optimizing, Self-configuring and Self-healing". z/OS supports Java (6), XML, DB2, TCP/IP and can host the Linux operating system as running task. OS/390 Previous generation mainframe operating system Windows NT Win98 MVS Mainframe operating system during late 70's, 80's early 90's Win95 Multiple Virtual Storage – virtually partition real storage to allow for multiple applications – all with access to max addressable memory z/VM Latest operating system for mid-size mainframes. VM (per se') is prior generation of this O.S. development tools under VM include: CMS (same as TSO) and Xedit (similar to ISPF/Edit). VSE/ESA Operating system for small mainframes. Its predecessor was DOS/VSE. TSO Time Sharing Option – an operating system within z/OS TSO provides time slicing (access to mainframe cycles) for developers coding, compiling, testing, etc. JCL Job Control Language – a language for specifying the properties Korn shell scripts and characteristics of batch application "jobs" CMD files Jobs are the basic unit of work to the mainframe operating system. The z/OS is the latest version of IBM's mainframe operating system. 64-bit addressing, and built-in (native) support for many eBusiness technologies. This operating system was called OS/390 before z/OS was introduced… and before that MVS. MVS was IBM's break-through technology of the late 70's/80's – that multi-tasked, and provided 32-bit addressing to applications by utilizing disk storage as extended memory – no matter the size or amount of real memory. Not shown on this slide is Workload Manager – a piece of Systems Software that monitors groups of servers (I.e. mainframes), managing the machines, and moving work between them with the aid of human administrators, but based on pre-defined performance goals. Workload Manager is required for certain types of current RRD mainframe access. z/VM is a smaller version of z/OS – used often for development machines, as it is more efficient with memory and resources for developers (without providing the high level of throughput z/OS is famous for. VM/CMS machines are used in many (especially smaller) shops for development. Instead of TSO/ISPF development tools (an upcoming topic) VM/CMS uses Xedit and more of a command line interface. VSE/ESA is an even smaller version of z/OS – without the z/64-bit capability – and typically used for even smaller boxes. TSO is like an operating system within an Operating System. However, it is used almost exclusively for developers who are building and maintaining applications. JCL is not an operating system, but a language that z/OS understands. It is used to initiate tasks through what are called Jobs – basically a unit-of-work that extends through an entire cycle of processing.

17 Traditional "Online" …vs… "Batch" Applications
Mainframe Description Network/PC Equivalent ======== ======================================================= =================== Online Access to production applications and data from connected 3270 terminals WebSphere, Tomcat… is done through Online systems. Characteristics: extremely high throughput, sub-second response- time, limited data access, mix of Read/Only, Insert, Update, Delete. Access from 3270 devices to the mainframe in is traditionally through VTAM (especially if running under SNA). Today's Online systems often connect web pages to back-office resources. Batch Access to production applications and data offline (after 7:00 PM) UNIX Korn Shell, .cmd files is done through Batch systems. Characteristics: extremely high volume (process from 100,000s to 1,000,000s of transactions in a single job. The "job" is the unit of work, defined by JCL (Job Control Language) and consists of dozens to 100s of individual programs linked together to process data. Online Systems–Teleprocessing Region(s) Batch Region(s) Development 3270 users TSO users In the mainframe world there are two basic types of applications: Online and Batch. Online applications that execute under one of two teleprocessing software packages (C.I.C.S. - or IMS/TM) – sometimes referred to as supervisor programs, because they have the ultimate responsibility for data and transactional integrity. Batch applications that are submitted as "background" jobs to the operating system. z/OS queues and executes these jobs based on their priority (and other classifications) – and constraints (resources available, etc.). Batch applications provide no real-time human interaction (they are strictly static, offline processing jobs, submitted via JCL with the only dynamic feature being a parameter (PARM) that can be passed into the job steps) VTAM (Virtual Telecommunications Access Method – VTAM is an IBM proprietary API that controls communications in an SNA (Systems Network Architecture) network. Note that, online applications (and all the resources they require – including files and database) are often dedicated (allocated to) the online region (and by definition not available to batch jobs). This has changed over the past decade, and it is now more common to find database and file sharing among online and batch processes (in spite of the potential problems of contention, lock-out and poor response time). Most mainframe shops have enormous batch systems – that process in the millions to billions of data records each night – and prepare the online databases for customer-facing work, from 7:00 – 7:00 each day. Note that each online region is a "job" to the mainframe. And additionally, each Batch region – including TSO is a "job" as well. VTAM JCL JOBs Online Resource Adaptors Online Applications Offline (batch) Files and Databases Online Applications z/OS and z/10 Online Files and Databases Online Applications Batch Jobs Batch Job Batch Jobs CICS or IMS TM

18 z/OS Online Application Systems
Mainframe Description Network/PC Equivalent ======== ======================================================= =================== C.I.C.S. Customer Information Control System. IBM's oldest teleprocessing monitor. WebSphere, Tomcat… Runs as a job under the operating system. Coordinates all resources necessary for secure units of work (transactions) – two-phase commit across multiple data sources, etc. Screens defined with BMS maps. Other resources defined to C.I.C.S. system tables through RDO (Resource Definitions Online) Note that screens for z/OS  Screens for I/Series (AS/400)  5250 IMS/TM Information Management System/Transaction Manager. IBM's dedicated WebSphere, Tomcat… IMS TP monitor. Same functionality as C.I.C.S. – but different product. No application program access to native VSAM files (directly). Typically installed in "IMS shops". TP calls through 'CBLTDLI' interface. Web/REST services have found their way into the mix as well – in accessing online data and process C.I.C.S. Region(s) IMS/TM Region(s) BMS Maps 3270 – MFS Maps As mentioned, there are basically two options for production Online systems --- CICS and IMS/TM. Fortune 1000 shops may have both installed, but typically you'll find one or the other in any given area – as the application programming skill-set, vocabulary and expertise is different (and deep) enough to warrant it. C.I.C.S. has over 70% of the IBM online market, but IMS/TM applications tend to be [significantly] bigger, and the largest (and oldest I/T) shops often use IMS/TM, because they are users of IMS/DB (the database element of the IMS package). The programming environment is similar within the IMS family. Note that C.I.C.S. screens are referred to as "maps" – more specifically as B.M.S. maps (Basic Mapping Support). These maps are source file definitions for where fields and literals are placed on the 3270 terminal – as well as how Program Function (PF) Keys are mapped (back, forward, end, refresh, enter, etc.) In the IMS/TM world, screens are referred to as MFS maps (or blocks). Similar to BMS, MFS describes physical and logical characteristics of how data is mapped to screens and then to file structures for use as parameters into and out of application programs. Products to look out for (next generation RRD) CICS/ECI – Java/JCA connector passes data-streams/COMMAREA CICS/EPI - access API pass 3270-screens back and forth VTAM VTAM CICS Transaction Gateway IMS Connect C.I.C.S. Application IMS/TM Applications C.I.C.S. Application IMS/TM Applications DB2 DL/I VSAM DB2 DL/I GSAM C.I.C.S. Application z/OS and z/10 IMS/TM Application CICS Region IMS TM Region

19 Traditional Batch Processing Software
Mainframe Description Network/PC Equivalent ======== ======================================================= =================== Tivoli Production (and Integration/Q.A. test) Job Scheduler (J.E.S.) Embarcadero CA-7 Automates production control over: job queues, security, priority, scheduling, schedule Ids, job (pre and post) processing requirements, documentation Ad Hoc TSO/ISPF has facilities to create (edit) and submit JCL jobs Korn Shell, .cmd file Both in the background (running under the control of the Job initiator and queues) and in the foreground (running under TSO itself – almost like dedicated online process). REXX execs and CLISTs (same as .cmd files) can also be executed in the TSO foreground for various reasons (usually utilities like copy/delete files, etc.) Batch Region(s) Development Subsystem JES Queue TSO/ISPF users In the batch programming world there is development (including various testing regions – I've seen up to 7 separate defined regions for testing in an application development area) and production. All jobs that run under z/OS are submitted via JCL (recall previous slide). The JCL job (see example below) describes the resources required the job (files, programs, etc.) – as well as the steps and sequence of the programs to executed. TSO/ISPF usually has both a panel and command line interface to compiling programs. Tivoli (IBM) and CA-7 (C.A.) are two of the most popular mainframe production job schedulers. They provide a higher level view of production jobs, tracking their workflow and providing statistics and management reporting. Jobs are still executed using JCL: Sample JCL //job card //** ** //** This sample connects LOADTESR ** //** send 2k byte data (total data is 40Mbyte) //** release LOADTESR ** //** QUIT ** //LOADTEST EXEC PGM=IBMCOBOL,REGION=1M,PARM='10CBLTESR' //** step name is loadtester's ID //** PARM='LUname' //* a=5(512byte data) //* 1(1kbyte data) //* 2(2kbyte data) //* 4(4kbyte data) //* b=not used //* LUname=LOAD Tester Receive ApplID //STEPLIB DD DSN=LOADTEST.LINKLIB,DISP=SHR //SYSUDUMP DD SYSOUT=* //SYSPRINT DD SYSOUT=* // JCL JOBs JES JOB Initiator(s) Batch Jobs Batch Job z/OS and box Offline (batch) Files and Databases Tivoli CA-7 REXX execs CLISTs Batch Jobs

20 Databases – DB2 DB2 Application Program Database – logical artifact
Mainframe Description Network/PC Equivalent ======== ==================================================== ===================== DB2 IBM's flagship relational DBMS. Has close to 100% market share Oracle, SQLServer, etc. on the mainframe (no significant competitors on z/xxx machines). - Most concepts and standards of PC/UNIX relational databases apply to DB2 (tables, rows, indexes, views, stored procedures, etc.) - DBA-level (physical) structures very different (as they are with most RDBMS products (see below) - And on the mainframe, almost all access to data is done through static "plans" which are bound SQL statements stored in the DB2 Catalog. DB2 supports Stored Procedures & dynamic SQL DB2 DB2 is IBM's RDBMS – or more accurately, it is a family of RDBMS products – each of which has its own unique SQL dialect. As described, mainframe DB2 is pretty much an old-fashioned AT&T style monopoly of RDBMS product (there are probably a handful of Oracle/mainframe shops world-wide, compared to thousands of DB2 shops). However, (and in spite of some relatively hard-nosed selling over the past 20+ years), not every IBM mainframe shop will have DB2. This is significant, as DB2 is required for the RDD native mainframe access software to work. For [much] more information on DB2, go to this url: Application Program Database – logical artifact Catalog Exec SQL Call 'plan' End-Exec. Tablespace – physical artifact Plan Plan Plan Table Table Index System Tables

21 Databases – IMS Other IMS technology to look out for:
Mainframe Description Network/PC Equivalent ======== ==================================================== ==================== IMS-DL/I IBM's hierarchical DBMS. Data is stored in inverted tree structures called ISAM (indexed) files "segments". Note that IMS/ESA has two components (IMS/DB and IMS/TM – formerly IMS/DC) - The segments (and their relationships) are defined with in a proprietary specification block (file) known as a DBD (Data Base Descriptor). - Applications access IMS databases through an application view defined in a specification known as a PSB (Program Specification Block) – which is composed of 1-Many PCBs (Program Communications Block). Each PCB is a view a single database segment. Access to IMS databases is through a call interface (Call using format – similar to method calls passing parameters and returning data). - IMS database technology is also referred to as: IMS DB … and DL/1 (Data Language 1 – which is like SQL for accessing IMS databases. DL/1 (or DL/I) is a complex and sophisticated language (read difficult) language. The business semantics of most IMS databases is shared between the application program's DL/1 logic (sequenced access calls) and the data per se'. IMS/DB is a 35 year old product (!!) that was one of the very first commercially-successful databases. It is basically a career-deep technology (I.e. mastery requires years, not months or weeks. What is important to understand about IMS databases is that the data per se' is often meaningless – without going through the process (where the "rules" about the data exist). In other words, the structures (especially in older databases) are often not normalized. And merely exposing the an IMS database segment to the Web may not be buying much. Other IMS technology to look out for: IMS Java – next generation of Java interface to IMS DB and IMS/TM IMS connect - listens to TCP/IP provides JCA connector support for IMS/TM For much more in IMS, go to this site: From this site, see these articles: IMS Concepts and Database Administration - Part 3 A high-level overview of IMS database concepts, terminology, and database design considerations. IMS Concepts and Database Administration - Part I IMS Concepts and Database Administration - Part 2 Or, see attached HTML files that are tutorial and overview in nature. Suppliers Parts Address PurchaseOrders IMS Application Program Call 'CBLTDLI' USING SUPP-PCB, IO-AREA, DB-SSA.

22 Files and Databases – VSAM
Mainframe Description Network/PC Equivalent ======== ========================================================= =================== VSAM IBM's foundation data storage system. Basically comprised of indexed ISAM (indexed) files files – and applications and system utilities that access the indexed data. - Access is either direct (through primary key), sequential (read until condition), or through secondary index file (similar to a WHERE clause). - Syntax/access to VSAM (Virtual Storage Access Method) files in most IBM languages is through direct statements: OPEN INPUT file, check status… READ file, check status. OPEN OUTPUT FILE… UPDATE file, INSERT into file, CLOSE file. (native language access – not Call Interface). - The business semantics of almost all VSAM files is shared between the application program's data access logic (sequenced calls) and the data per se'. VSAM Application Program VSAM provides efficient/fast keyed and alternate index access to data. The same caveats apply about VSAM as discussed about IMS (it is typically semantically poor information, in and of itself – and the meaning of the data is mainly realized through application access – which reads/writes records in a particular sequence. Products to look out for (next generation RRD): VSAM Java – a direct Java/JCA connection to mainframe VSAM files For much more in VSAM, go to this site: Suppliers OPEN input SUPPLIER-FILE if SUPPLIER-STATUS = '00' subtract APPL-RESULT from APPL-RESULT else add 12 to ZERO giving APPL-RESULT end-if Secondary Index File Supplier Zip Codes

23 Files and Databases – Other
Mainframe Description Network/PC Equivalent ======== ==================================================== ==================== QSAM Queued Sequential Access Management (aka "flat" files) Sequential files… Non-indexed files that hold (almost always) batch data for bulk processing. Often historical data, back-ups and image-copy data. IDMS Non-IBM proprietary files in "network/CODASYL" data model Indexed files… Originally offered by Cullinane software (Boston). Later purchased by Computer Associates. Many large Fortune 1000 IDMS users. IDMS-ADSO (CICS for IDMS) ADABAS Non-IBM proprietary files in "indexed/table" data model Indexed files… Originally offered by SoftwareAG, ADABAS has a large install base (especially in U.S. government and state offices. Coupled with the Natural programming language (a COBOL-like 3GL) there are still lots of ADABAS installations. Natural/Adabas. EGL – Natural  EGL Migration. There are other databases and file systems running on most mainframes, besides DB2, IMS and VSAM. For much more in IDMS, go to this site: For much more in ADABAS, go to this site:  EBCDIC …vs… ASCII - internal data storage format  It is worth noting that virtually all mainframe data is internally stored using in EBCDIC format. This means that some software will have to translate bytes transmitted, between mainframe/PC It also means that (text) data sorted on the mainframe will sort in a different order on the PC

24 Traditional Development Environment
Mainframe Description Network/PC Equivalent ======== ==================================================== ==================== TSO Time Sharing Option. Basically, a "job" that runs under z/OS responsible UNIX/Windows O.S. for managing program development resources (files, Login, jobs, etc.) ISPF Interactive Systems Programming Facility. Each individual developer's custom RDz Development IDE, that allows programmers to: Create new source files and manage them. - Edit source and data files, interact with common version control software, compile/link/run/test programs (usually by submitting background "jobs") through JCL – but often shops provide "foreground" (interactive) facilities for this common process. - Developers are allowed a [relatively] wide margin to customize their own unique environments. - And shops almost always created "system software" tools that snap-in to ISPF – maintaining standards, raising productivity, and providing easier access to in-house functions – often written in REXX or CLIST language. - Sometimes called: SPF (for short). C.A. offers a similar facility, named: ROSCOE. Version Many different competing version control and "library management" facilities ClearCase Control Available on the mainframe. They all do (roughly) the same thing. Most shops use: Software CA-Endevor, Serena-Changeman, IBM-SCLM, CA-Panvalet, CA-Librarian The development tools on the mainframe are panel-driven. Developers fill in parameters on an interactive panel (see next slide) – and press Enter to activate some function (submit a job to the Operating System, navigate to a tool, etc.) There actually is a CUA (mouse-windows) interface to ISPF – but it is somewhat of a kludge (it's a bit cumbersome and slow) – and few developers utilize it. Basically, they get very fast using shortcuts, customizing their ISPF options (which are like preferences), and utilizing a shop's unique and often dizzying array of in-house developed system utilities and functions.

25 Terms and Concepts – TSO/ISPF Development
ISPF "Main Menu" of development options ISPF Edit (of JCL file) ISPF Utility Allocate Dataset (file) A peek at ISPF panels.

26 Terms and Concepts – Compile/Link/Run Environment
Source Module JES Reader Similar to C, C++, and other 3 and 4GLs… Source is compiled to to .OBJ (machine code) Errors are returned to the JES reader (usually visible through an option under TSO) The .OBJ format of the program is linked to a "load module" by the Link Editor – which resolves all external references and calls The Load Module is reference in JCL – by naming the entry point of the initial program to be launched (like main() in Java) Object Module Load Module The development cycle or process is the same on the mainframe as it is for virtually every other language. Ultimately, compiles must be submitted to the operating system as jobs – but many shops provide "foreground" cycles to do this, as it saves developer time. //EXEC PGM=LoadModule…

27 Development File Types - Introduction
In a development environment, there are two file types: Files that hold application source Files that hold application data Both are created (allocated) using some form of z/OS Job JCL Utility program ISPF panel – which creates and submits JCL as a foreground task Files are usually referred to as Data Sets – and are allocated on a disk pack with a volume serial number – that uniquely identifies the disk in the LPAR Application source files: Partitioned Data Set (PDS) A collection of like-type sequential files: COBOL, JCL, CLIST. Individual files are termed "members" of the PDS – which is the "Data Set" You can almost think of them as: records (individual members) within an array (the PDS Data Set) Sequential Data Set Individual files – can be used for: Test data (QSAM data sets), source files (not typically, but possible), Executables A specialized form of the PDS is a Load Library – which is a PDS that contains "Load Modules" Each Load Module is the compiled and linked version of program source Test Data Sets Many and varied types: Fixed sequential Variable Length Sequential Print files Load libraries Partitioned Data Sets Space is allocated typically in disk pack: Tracks Cylinders Records within a file: Have a length - LRECL Are aggregated into "blocks" – which become the unit of I/O transfer BLKSIZE

28 Programming Languages
Mainframe Description Network/PC Equivalent ======== ==================================================== ==================== COBOL Common Business Oriented Language BASIC - A 50+ year-old language, that is still being heavily invested in – although not nearly at the same rate it was, during the 60's, 70's and 80's (or even 90's). COBOL is an English-like wordy language. That is optimal for applications with long shelf-lives – due to it's verbose (I.e. easy-to-read) nature, universality, and it's run-time optimization. - COBOL programs have a DATA DIVISION – analogous to a class's attributes, and a PROCEDURE DIVISION – analogous to a class's methods. - Data structures and files are defined through what are called copybooks – which describe the individual fields and field definitions (data format, etc.). Copybooks are downloaded and become RRD classes, when accessed through our mainframe integration technology. HLASM High Level Assembler Assembler High Level Assembler is an IBM licensed program that helps you develop programs and subroutines to provide functions not typically provided by other symbolic languages, such as COBOL, FORTRAN, and PL/I. PL/I An elegant, 3rd generation, imperative, structured programming language BASIC Used a lot in scientific and financial shops. Not as universal as COBOL. RPG Report Program Generator. A high-level 3GL – used extensively on the Power i BASIC Java/C/C++ All of these languages have compilers and tools available on z/OS Java/C/C++ For much more in COBOL go to this site:

29 Software – Programming Languages – "Hello World" Comparison
IDENTIFICATION DIVISION. PROGRAM-ID. HELLOWORLD. 000300* ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-COBOL. OBJECT-COMPUTER. IBM-COBOL. 000800 DATA DIVISION. FILE SECTION. 001100 PROCEDURE DIVISION. DISPLAY "Hello world!". STOP RUN. HELLOPRT START IN THE BEGINNING... PRINT NOGEN SPARE US THE MACRO EXPANSIONS BEGIN SAVE (14,12) SAVE INPUT REGISTERS LR 12, WHERE ARE WE? USING HELLOPRT, RIGHT HERE ST 13,SAVE SAVE OLD SAVE AREA ADDRESS LA 11,SAVE POINT TO NEW SAVE AREA ST 11,8(13) IN OLD SAVE AREA LR 13, MOVE SAVE AREA ADDRESS * * WRITE "HELLO, WORLD!" ON WHATEVER HAS BEEN SET UP AS SYSPRINT IN * THE INVOKING JCL (NO, UNIX DOESN'T HAVE A MONOPOLY ON DEVICE- * INDEPENDENT I/O!) DOPUT EQU * PUT SYSPRINT,HELLOMSG WRITE THE MESSAGE B DOPUT FOREVER... * THIS CODE WILL NEVER BE REACHED, BUT IS INCLUDED FOR COMPLETENESS L ,SAVE GET OLD SAVE AREA BACK RETURN (14,12),RC= TO THE OPERATING SYSTEM * FILE AND WORK AREA DEFINITIONS SAVE DS 18F LOCAL SAVE AREA HELLOMSG DC C' HELLO, WORLD!' SYSPRINT DCB DSORG=PS,MACRF=PM,DDNAME=SYSPRINT, X RECFM=FA,LRECL=133,BLKSIZE=133 END BEGIN COBOL program For an interesting look at over 100 language "Hello World" programs, visit this site: HELLO: PROCEDURE OPTIONS (MAIN); /* A PROGRAM TO OUTPUT HELLO WORLD */ FLAG = 0; LOOP: DO WHILE (FLAG = 0); PUT SKIP DATA('HELLO WORLD!'); END LOOP; END HELLO; HLASM program PL/I program

30 z/OS Links and Knowledge
Here are some links for additional study on mainframe software terms and concepts: An excellent set of organized categories of info – that backstop a lot of the material in this Unit What can we say… it's Wikipedia A somewhat advanced but excellent next-level-down dive on the technology terms and concepts in this Unit IBM's site for mainframe – and z/topic communities Knowledge

31 z/OS Terms and Concepts
UNIT z/OS Terms and Concepts Topics: Hardware Terms and Concepts z/OS Software Terms and Concepts COBOL Program and z/OS Integration Appendices

32 Topic objectives After completing this topic, you should be able to:
Describe how COBOL programs: Are executed at run-time by operating system Attach to and read/write data from external data Interface with other business logic

33 Review – Online and Batch
Recall from the previous slide that there are two "modes" of z/OS applications: Batch: Where "Jobs" are executed through "JCL" (Job Control Language) cards that are read and understood by z/OS Online: Where transactions ("trancodes") are entered into a z/OS sub-system that "listens" for them. These sub-systems (either IMS/TM or CICS) are responsible for: Security – ensuring authentication and authorization from those entering the TRANCODE and connecting to the online system Attaching the proper initial process (COBOL program) responsible for handling the transaction More… LOADLIB Compiled Programs //EXEC PGM=MYPROG,… z/OS J E S //JOB JOBNAME=MYJOB,… JCL LOADLIB Compiled Online Programs C I S z/OS TRANCODE

34 Batch Processing (only slightly) Deeper Dive
There are only a few places in a batch COBOL program that interface with z/OS. It's easiest to understand by studying a little (!) JCL JCL is an operating system language that has three major keywords (aka "cards") //JOBname JOB – describes the characteristics of the batch job, including how much CPU time it is allowed. Note that the TIME= parameter will kill programs in infinite loops (although it won't solve your coding problem  ) //JOBname JOB,…,TIME=(1) //Stepname EXEC – tells z/OS what program to execute (like main in Java or C/C++) //STEPLIB – tells z/OS the name of the library to search for the compiled program LOADLIB Compiled Programs //STEPNAME EXEC PGM=MYPROG, // PARM=AABBCC,… //STEPLIB DD DSN=MYLOADLIB //DDName – DD statement. Connects your program's I/O statements with z/OS datasets. DSN= "fully-qualifies" the name of the dataset (so z/OS can find it) Your program needs one //DD statement for every file it accesses. And where's the hook for that? (next slide…) Dataset z/OS QSAM, VSAM DL/I files //DDName DD DSN=MY.zOS.FILE,... // …dataset characteristics… Note – there's a LOT more to JCL. We'll cover it later on in the course, when you get to hit the mainframe.

35 COBOL and Batch In COBOL – every QSAM and VSAM file you access will need a "SELECT/ASSIGN" statement – that essentially defines a "logical" external file name which must have a matching //DD card in the JCL that runs your code. See the pictures below. //MYFILE - is the logical file name that connects the COBOL program's I/O statements (internal file variable name) to … DSN=ABC.MYFILE – which is the physical (external) filename that lives on a 3990 disk pack attached z/OS //MYFILE DD DSN=ABC.MYFILE,... // …dataset characteristics…

36 COBOL and Online Transactions
Online applications run under the supervision of a transaction management system (in z/OS either: CICS or IMS TM). The transaction manager connects to a series of system tables with entries defined for resources necessary to fulfill run-time transaction requests: C I I M C S S T M z/OS TRANCODE CICS or IMS "System Tables" Terminals (LTERM) Device IDs allowed to hit the online region Users (User-ID/Password) Authentication/Authorization Trancode (transaction code) List of actual trancodes, and which program to load and execute for each trancode File (or database) Entry that acts like a batch DD card, and defines which files can be accessed online Many other control block definitions are needed to support a production online transaction system

37 z/OS Terms and Concepts
UNIT z/OS Terms and Concepts Topics: Hardware Terms and Concepts z/OS Software Terms and Concepts COBOL Program and z/OS Integration Appendices

38 z/OS – COBOL Java - Equivalence Chart
Mainframe/COBOL/z/OS I-Net/Java =================================== =============================================== Program field or variable  Class or Local method Attribute Paragraph  Method Program (source)  Class Definition (.java file) Load Module (.EXE file)  Compiled Class (.class file) Execute or run a Load Module  Object instance of a Class, running in Java/VM Load Modules in a Load Library  Classes defined in Packages Program passed/returned parameters  Method passed/returned parameters JCL cmd/.shell script (UNIX) Requirements-Based Vocabulary(OO COBOL)  User Defined Datatype (Class) REDEFINES clause  Class and Datatype Casting/conversion Program/sub-routine calls  Java method calls Call to System/Utility program  Java or NeuVis API method calls RDBMS/Database  RDBMS/Database Table  Persisted Class data Table row  Single object persisted data SQL statement/Stored Procedure  same … but all dynamic SQL using JDBC CICS/IMS DC  Application Server BMS Map/MFS  Java Servlet/HTML Page CICS Queue/IMS DC Scratch Pad  EJB Session Object CICS In/Out Maps, IMS MFS MID/MOD EJB Request/Response Objects


Download ppt "Jon Sayles, IBM EcoSystems Team"

Similar presentations


Ads by Google