Upload
michael-erichsen
View
931
Download
2
Embed Size (px)
DESCRIPTION
About Enterprise COBOL V5. With thanks to Tom Ross.
Citation preview
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