11-04-2014
1
COBOL 5.1
Michael Erichsen,
April 2014
Who is This?
11-04-2014
2
What is This?
Agenda
• XML
• Unicode
• IMS SQL
• Debugging
• Performance
• Migration
11-04-2014
3
XML
COBOL 5.1
XML GENERATE
11-04-2014
4
XML GENERATE
XML GENERATE
11-04-2014
5
NAME OF and TYPE OF Example
NAME OF and TYPE OF Example
11-04-2014
6
NAME OF and TYPE OF Example
XML GENERATE
11-04-2014
7
XML GENERATE SUPPRESS
XML GENERATE SUPPRESS
WHEN
11-04-2014
8
Without Suppression
With Suppression
11-04-2014
9
XML PARSE with Continued Data
• XMLSS parser may not deliver all content on a single
XML event
– Content may be split across multiple events
– Your program logic must concatenate the pieces together
• XML-INFORMATION special register (implicit
definition)
– 01 XML-INFORMATION PICTURE S9(9) USAGE BINARY
VALUE 0.
• Value for XML events ATTRIBUTE-CHARACTERS
and CONTENT-CHARACTERS:
– 1: Complete
– 2: Incomplete
UNBOUNDED
11-04-2014
10
UNBOUNDED Example
UNBOUNDED Example
11-04-2014
11
UNBOUNDED Example
UNBOUNDED Example
11-04-2014
12
UNBOUNDED Example
UNICODE
COBOL 5.1
11-04-2014
13
Unicode
• New or changed
intrinsic functions
• ULENGTH()
• UPOS()
• USUBSTR()
• USUPPLEMENTARY()
• UVALID()
• UWIDTH()
IMS SQL
COBOL 5.1
11-04-2014
14
IMS SQL
DEBUGGING
COBOL 5.1
11-04-2014
15
Debugging
• TEST compiler options
– OPTIMIZE(0), NOSTGOPT and TEST
• Most debugging function
– OPTIMIZE > 0, NOSTGOPT and TEST(EJPD)
• Better performance, but a few restrictions
– OPTIMIZE > 0, STGOPT and TEST(NOEJPD)
• Best performance, more restrictions
• No more side files
– Debug information in NO LOAD class in the load
module
– Only loaded if requested by debugger
DWARF 4 (Common Debug
Architecture)
• Industry-standard format
– Language independent
– Extensible
– Widely used on Unix, Linux and other operating
systems
• Advantages
– Stable and maintainable debug information format for
all languages
– Easier to port program analysis and debug
applications to z/OS from other DWARF-compliant
platforms
11-04-2014
16
DWARF 4 (Common Debug Architecture)
• Originally designed
along with Unix
Executable and
Linkable Format
(ELF)
– But independent of
object file formats
DWARF Example
11-04-2014
17
PERFORMANCE
COBOL 5.1
Performance
• Leverage common optimization technology
across multiple languages (COBOL, C/C++,
PL/I, …)
– New Code generator same as Java
• Foundation for support of new hardware
features and future System z processors
– Exploit latest z/Architecture instructions
– Positioning for future 64-bit exploitation
• Prioritize which programs to recompile first
to gain the "free" improvements
11-04-2014
18
New Performance Options
• OPTIMIZE(0|1|2)
• STGOPT (Storage Optimization) (NO|YES)
• HGPR (High preserve of 64-bit registers)
(PRESERVE|NOPRESERVE)
• AFP (Additional Floating Point)
(VOLATILE|NOPVOLATILE)
• MAXPCF (Maximum program complexity
factor, default 60000) (0-999999)
– Warning issued if changing optimization
• ARCH(6|7|8|9|10)
– Remember your disaster recovery environment!
ARCH(6)
11-04-2014
19
ARCH(7)
ARCH(8)
11-04-2014
20
ARCH(9)
ARCH(10)
11-04-2014
21
What is This?
MIGRATION
COBOL 5.1
11-04-2014
22
Migration
• Compilation storage
requirements
• Code changes
• JCL Changes
• Testing!
Storage Requirements
• Compile with less than 80 MB
– User abend 4093 REASON CODE=0000001C
• Compile with between 80 MB and 200 MB
– IEW4000I FETCH… FAILED BECAUSE
INSUFFICIENT STORAGE WAS AVAILABLE
• Compile with more than 200 MB OK
11-04-2014
23
Storage Requirements
• Compile with less than 80 MB
– User abend 4093 REASON CODE=0000001C
• Compile with between 80 MB and 200 MB
– IEW4000I FETCH… FAILED BECAUSE
INSUFFICIENT STORAGE WAS AVAILABLE
• Compile with more than 200 MB OK
• More processor CPU time for compile (5-15
times!)
– Too little time => Another strange abend
• Working Storage 20% bigger
– Reduced by PTF
Code Changes
• AMODE(24) removed
– Expected to be changed before Volvo implementation
• FLAGMIG4 option for COBOL V4.2
– Warning diagnostics for obsolete features
• SEARCH ALL error in version 4 corrected
• Differences between XMLPARSE(COMPAT)
and (XMLSS)
– Many XML events changed or discontinued
– New reserved words
• No coexistence with old COBOL
11-04-2014
24
TESTING IS VERY IMPORTANT
COBOL 5.1
Who is This?
11-04-2014
25
WHILE WRAPPING UP…
COBOL 5.1
Other Changes
• Inline comments
– *>
• Compiler options removed
– SIZE
– SSRANGE
– YEARWINDOW
• Load modules PDSE only
• SYSMDECK & SYSUT8-SYSUT15 required in
JCL
• Interoperation with Java 7 supported
11-04-2014
26
COBOL 5.1.1
COBOL 5.1
COBOL 5.1.1
• Available as PTF’s
– COMPILER UI16133/UI16134/UI16135
– RUNTIME UI15839(V1R13) / UI15840(V2R1)
• AMODE 24 support has been added
– But only for coexistence, not for new functions
• Compilation memory requirements reduced
• Fix list
– http://www-
01.ibm.com/support/docview.wss?uid=swg27041164#
510314
11-04-2014
27
More Information
• COBOL for z/OS Home page
– http://www-
03.ibm.com/software/products/us/en/entecoboforzos
• Enterprise COBOL for z/OS library
– http://www-
01.ibm.com/support/docview.wss?uid=swg27036733
• Enterprise COBOL for z/OS resources
– http://www-
01.ibm.com/support/docview.wss?uid=swg21634215
COBOL 5.1
Michael Erichsen,
April 2014

Cobol 5 presentation

  • 1.
  • 2.
    11-04-2014 2 What is This? Agenda •XML • Unicode • IMS SQL • Debugging • Performance • Migration
  • 3.
  • 4.
  • 5.
    11-04-2014 5 NAME OF andTYPE OF Example NAME OF and TYPE OF Example
  • 6.
    11-04-2014 6 NAME OF andTYPE OF Example XML GENERATE
  • 7.
  • 8.
  • 9.
    11-04-2014 9 XML PARSE withContinued Data • XMLSS parser may not deliver all content on a single XML event – Content may be split across multiple events – Your program logic must concatenate the pieces together • XML-INFORMATION special register (implicit definition) – 01 XML-INFORMATION PICTURE S9(9) USAGE BINARY VALUE 0. • Value for XML events ATTRIBUTE-CHARACTERS and CONTENT-CHARACTERS: – 1: Complete – 2: Incomplete UNBOUNDED
  • 10.
  • 11.
  • 12.
  • 13.
    11-04-2014 13 Unicode • New orchanged intrinsic functions • ULENGTH() • UPOS() • USUBSTR() • USUPPLEMENTARY() • UVALID() • UWIDTH() IMS SQL COBOL 5.1
  • 14.
  • 15.
    11-04-2014 15 Debugging • TEST compileroptions – OPTIMIZE(0), NOSTGOPT and TEST • Most debugging function – OPTIMIZE > 0, NOSTGOPT and TEST(EJPD) • Better performance, but a few restrictions – OPTIMIZE > 0, STGOPT and TEST(NOEJPD) • Best performance, more restrictions • No more side files – Debug information in NO LOAD class in the load module – Only loaded if requested by debugger DWARF 4 (Common Debug Architecture) • Industry-standard format – Language independent – Extensible – Widely used on Unix, Linux and other operating systems • Advantages – Stable and maintainable debug information format for all languages – Easier to port program analysis and debug applications to z/OS from other DWARF-compliant platforms
  • 16.
    11-04-2014 16 DWARF 4 (CommonDebug Architecture) • Originally designed along with Unix Executable and Linkable Format (ELF) – But independent of object file formats DWARF Example
  • 17.
    11-04-2014 17 PERFORMANCE COBOL 5.1 Performance • Leveragecommon optimization technology across multiple languages (COBOL, C/C++, PL/I, …) – New Code generator same as Java • Foundation for support of new hardware features and future System z processors – Exploit latest z/Architecture instructions – Positioning for future 64-bit exploitation • Prioritize which programs to recompile first to gain the "free" improvements
  • 18.
    11-04-2014 18 New Performance Options •OPTIMIZE(0|1|2) • STGOPT (Storage Optimization) (NO|YES) • HGPR (High preserve of 64-bit registers) (PRESERVE|NOPRESERVE) • AFP (Additional Floating Point) (VOLATILE|NOPVOLATILE) • MAXPCF (Maximum program complexity factor, default 60000) (0-999999) – Warning issued if changing optimization • ARCH(6|7|8|9|10) – Remember your disaster recovery environment! ARCH(6)
  • 19.
  • 20.
  • 21.
  • 22.
    11-04-2014 22 Migration • Compilation storage requirements •Code changes • JCL Changes • Testing! Storage Requirements • Compile with less than 80 MB – User abend 4093 REASON CODE=0000001C • Compile with between 80 MB and 200 MB – IEW4000I FETCH… FAILED BECAUSE INSUFFICIENT STORAGE WAS AVAILABLE • Compile with more than 200 MB OK
  • 23.
    11-04-2014 23 Storage Requirements • Compilewith less than 80 MB – User abend 4093 REASON CODE=0000001C • Compile with between 80 MB and 200 MB – IEW4000I FETCH… FAILED BECAUSE INSUFFICIENT STORAGE WAS AVAILABLE • Compile with more than 200 MB OK • More processor CPU time for compile (5-15 times!) – Too little time => Another strange abend • Working Storage 20% bigger – Reduced by PTF Code Changes • AMODE(24) removed – Expected to be changed before Volvo implementation • FLAGMIG4 option for COBOL V4.2 – Warning diagnostics for obsolete features • SEARCH ALL error in version 4 corrected • Differences between XMLPARSE(COMPAT) and (XMLSS) – Many XML events changed or discontinued – New reserved words • No coexistence with old COBOL
  • 24.
    11-04-2014 24 TESTING IS VERYIMPORTANT COBOL 5.1 Who is This?
  • 25.
    11-04-2014 25 WHILE WRAPPING UP… COBOL5.1 Other Changes • Inline comments – *> • Compiler options removed – SIZE – SSRANGE – YEARWINDOW • Load modules PDSE only • SYSMDECK & SYSUT8-SYSUT15 required in JCL • Interoperation with Java 7 supported
  • 26.
    11-04-2014 26 COBOL 5.1.1 COBOL 5.1 COBOL5.1.1 • Available as PTF’s – COMPILER UI16133/UI16134/UI16135 – RUNTIME UI15839(V1R13) / UI15840(V2R1) • AMODE 24 support has been added – But only for coexistence, not for new functions • Compilation memory requirements reduced • Fix list – http://www- 01.ibm.com/support/docview.wss?uid=swg27041164# 510314
  • 27.
    11-04-2014 27 More Information • COBOLfor z/OS Home page – http://www- 03.ibm.com/software/products/us/en/entecoboforzos • Enterprise COBOL for z/OS library – http://www- 01.ibm.com/support/docview.wss?uid=swg27036733 • Enterprise COBOL for z/OS resources – http://www- 01.ibm.com/support/docview.wss?uid=swg21634215 COBOL 5.1 Michael Erichsen, April 2014