![]() |
Advanced and Enterprise COBOL
| Duration: 5 days |
| Participants: Experienced COBOL programmers who are developing and maintaining Enterprise COBOL for z/OS application programs. |
|
Objectives:
Upon successful completion of this course you will be able to:
- Write complex Enterprise COBOL programs that are efficient, easily maintained and modified, and exploit the structured capabilities available in COBOL. - Use the newest features of Enterprise COBOL, COBOL for OS/390, and COBOL/370, including big numbers, XML processing, DLLs, and some of the OO programming capabilities. - Code JCL compiler and run time options best suited to the program and operating system. - Use the online manuals for Enterprise COBOL and z/OS Language Environment. |
|
Overview:
Enterprise COBOL is IBM's latest COBOL compiler. Many new COBOL compilers have been released by IBM over the last two decades, and often, COBOL programmers do not know of their time-saving coding features and expanded capabilities. Since COBOL II (released in 1985), there has been COBOL/370 (now called COBOL for MVS and VM), COBOL for OS/390, and the latest, Enterprise COBOL for z/OS.
- Our 'Advanced and Enterprise COBOL' course includes most of the many new features of these compilers, as well as tips for writing efficient and maintainable COBOL code. This course is customizable to the client’s installation and student background, and has extensive hands-on workshops where students can explore different capabilities of Enterprise COBOL, depending on interest and experience. - Separate courses are available for COBOL and VSAM, COBOL and DB2, COBOL and CICS, COBOL and IMS, COBOL and UNIX, COBOL Debugging with Abend-AID, COBOL Debugging with z/OS Debug Tool, and COBOL Debugging with Xpediter. |
| Prerequisites: Programming experience in any version of COBOL, as well as knowledge of basic MVS JCL and ISPF, is required. This course has quite a bit of material. Students must already have a strong background in COBOL. Some UNIX knowledge is helpful for some of the topics. |
| Format: Lecture and hands-on computer workshops. Throughout the course, students perform many hands-on workshops and coding exercises to reinforce material presented in lectures. The student text includes many COBOL coding examples. A pre- and post-test is available, if desired, to show the learning delta. |
| Setup: Client-site must have Enterprise COBOL V3R3 or V3R4 installed. A working compile and link PROC, CLIST, or REXX EXEC needs to be available. For the optional OO (Object-Oriented) topics, each student's and instructor’s userid must have an OMVS segment setup, and USS (Unix System Services on z/OS) must be installed and available to each userid. For advanced DLL and advanced OO workshops, working UNIX scripts for compile and binder need to be available. |
|
Topic Outline:
- Structured Logic Features EVALUATE - logical and object formats In-Line PERFORM - when to use, how to use Module design Coupling and cohesion considerations Logic impact to SORT, Read-Process-Write loops, Conditional Processing Explicit Scope Terminators - always use Limiting use of periods in Procedure Division Impact on NEXT SENTENCE vs CONTINUE - Data Definition and Initialization Big numbers - both binary and packed decimal New features Efficient definition of variables LOCAL STORAGE INITIALIZE Hexadecimal NULL terminated strings for C/C++ support Using currency signs - String Processing STRING, UNSTRING, INSPECT Reference Modification (Substring) - Advanced Internal SORT Working-storage section table sort INPUT PROCEDURE/OUTPUT PROCEDURE without GO TOs or SECTIONs FASTSRT The basic file SORT is not taught, as it is assumed students know it alread. - Built-in Intrinsic Functions Concepts General format for use (There are currently about 50 intrinsic functions.) Available functions (trig, date, numeric, character, table, statistical, miscellaneous) Using functions - Advanced Table Processing Loading tables from files - structured logic Processing fixed and variable length tables SEARCH, SEARCH ALL Intrinsic functions and table processing The 'ALL' subscript Efficiencies in table processing Initializing (INITIALIZE, VALUE, loops) Fixed vs variable length tables, and alternatives Using VALUE on group items Indexing vs subscripting Debugging tables Table out of bounds SSRANGE overhead - Language Environment (LE) LE concepts, features, and vocabulary Feedback/condition token and copybook LE Load Libraries LE service interfaces and syntax Communication between COBOL and other non-COBOL programs, such as C CALLable LE routines About a dozen of the over 100 CALLable LE services Types of services (No date/time services.) LE Run-time Options About a dozen of the nearly 70 LE run-time options Memory Management Example with a Linked List and linkage section Stack and heap memory - Advanced CALLing Subprograms CALL statement and new features Passing parameters LINKAGE SECTION STOP RUN vs GOBACK Static vs dynamic calls Passing data from the JCL Multiple entry points Nested programs Recursive programming STOP RUN, GOBACK, END PROGRAM CANCEL Reentrant programs, RENT Running below or above the 16-megabyte line: DATA(24), DATA(31), AMODE and RMODE Basic Linkage Editor control statements Linking from object or load modules Passing data vs passing addresses: CALL BY CONTENT, BY REFERENCE, BY VALUE Potential errors when passing parameters by reference - Advanced COPY Command COPY - Altering variable names in copybooks - USS, UNIX, and OMVS (Optional) Concepts and features of UNIX System Services (USS) Using OMVS and five simple UNIX commands Using ISHELL, basics - HFS Files (Optional) Concept Creation Access from JCL and from USS - I/O (Optional) HFS files and UNIX ASCII files (Optional.) I/O efficiencies Handling VB (variable blocked) records - new techniques File Status Line Sequential files Dynamically creating files - DLLs (Optional) Concept DLLs vs dynamically called subprograms Binder vs Linkage Editor PDSE vs PDS requirements Using HFS Compiling to create a DLL; compiler options Linking DLLs; binder options and JCL Pre-linking (Overview only.) CALL statement restrictions for DLLs Search order for DLLs Using COBOL DLLs with C/C++ programs - Debugging and Error Prevention Avoiding typical errors (data, table processing, subprogram CALLs, logic) Testing and debugging techniques Trap dumps to a PS file Reading LE dumps Compiler listing (SL, PL, BLW, BLL, offsets, etc.) Trapping abends: LE options (ERRCOUNT, TRAP, etc.) COBOL built-in error handling and relation to LE run-time options Additional tips and techniques covered throughout course - Miscellaneous (Covered throughout course, as appropriate.) Compiler options (PARMs in JCL; there are about 55 that can be specified.) COBOL run time options Writing efficient programs - where the bottlenecks can be; tuning Pointers COBOL and z/OS functionality - Dates (Optional) Date/time intrinsic functions LE callable services for dates/times Date special registers - CODEPAGE and Multi-byte Characters Unicode concepts and types CODEPAGE compiler option National characters DBCS characters - XML Processing Parsing XML Generating XML CODEPAGEs and XML - Object Oriented Programming (Optional) Concept of OO Design Recursive Threads New COBOL instructions Interface COBOL with Java UNIX System Services (mainframe UNIX), OMVS, ISHELL overview UNIX versus MVS compile BPXBATCH - Highlights of Web and Java-Related Features (Optional) |
|
|