Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Working with more complex applications

Porting applications between platforms
Getting mainframe applications to compile
Getting mainframe applications to run: overview
Fixing differences caused by data representations
Handling differences in ASCII SBCS and EBCDIC SBCS characters
Handling differences in native and nonnative formats
Handling differences in IEEE and hexadecimal data
Handling differences in ASCII DBCS and EBCDIC DBCS strings
Fixing environment differences that affect portability
Fixing differences caused by language elements
Writing code to run on the mainframe
Writing applications that are portable between the Windows-based and AIX workstations
Using subprograms
Main programs, subprograms, and calls
Ending and reentering main programs or subprograms
Calling nested COBOL programs
Nested programs
Example: structure of nested programs
Scope of names
Local names
Global names
Searches for name declarations
Calling nonnested COBOL programs
CALL identifier and CALL literal
Call interface conventions
CDECL
OPTLINK
SYSTEM
Calling between COBOL and C/C++ programs
Initializing environments
Passing data between COBOL and C/C++
Setting linkage conventions for COBOL and C/C++
Collapsing stack frames and terminating run units or processes
COBOL and C/C++ data types
Example: COBOL program calling C/C++ DLL
Making recursive calls
Sharing data
Passing data
Describing arguments in the calling program
Describing parameters in the called program
Testing for OMITTED arguments
Coding the LINKAGE SECTION
Coding the PROCEDURE DIVISION for passing arguments
Grouping data to be passed
Handling null-terminated strings
Using pointers to process a chained list
Example: using pointers to process a chained list
Using procedure and function pointers
Dealing with a Windows restriction
Coding multiple entry points
Passing return-code information
Understanding the RETURN-CODE special register
Using PROCEDURE DIVISION RETURNING . . .
Specifying CALL . . . RETURNING
Sharing data by using the EXTERNAL clause
Sharing files between programs (external files)
Example: using external files
Input-output using external files
Using command-line arguments
Example: command-line arguments
Building dynamic link libraries
Static linking and dynamic linking
How the linker resolves references to DLLs
Creating DLLs
Example: DLL source file and related files
Module definition file
Resolving DLL references at run time
Resolving DLL references at link time
Compiling and linking the DLL
Creating module definition files
Reserved words for module statements
Summary of module statements
BASE
DESCRIPTION
EXPORTS
HEAPSIZE
LIBRARY
NAME
STACKSIZE
STUB
VERSION
Preparing COBOL programs for multithreading
Multithreading
Working with language elements with multithreading
Working with elements that have run-unit scope
Working with elements that have program invocation instance scope
Scope of COBOL language elements with multithreading
Choosing THREAD to support multithreading
Transferring control to multithreaded programs
Ending multithreaded programs
Handling COBOL limitations with multithreading
Example: using COBOL in a multithreaded environment
Source code for thrcob.c
Source code for subd.cbl
Source code for sube.cbl
Preinitializing the COBOL runtime environment
Initializing persistent COBOL environment
Terminating preinitialized COBOL environment
Example: preinitializing the COBOL environment
Processing two-digit-year dates
Millennium language extensions (MLE)
Principles and objectives of these extensions
Resolving date-related logic problems
Using a century window
Example: century window
Using internal bridging
Example: internal bridging
Moving to full field expansion
Example: converting files to expanded date form
Using year-first, year-only, and year-last date fields
Compatible dates
Example: comparing year-first date fields
Using other date formats
Example: isolating the year
Manipulating literals as dates
Assumed century window
Treatment of nondates
Using sign conditions
Performing arithmetic on date fields
Allowing for overflow from windowed date fields
Specifying the order of evaluation
Controlling date processing explicitly
Using DATEVAL
Using UNDATE
Example: DATEVAL
Example: UNDATE
Analyzing and avoiding date-related diagnostic messages
Avoiding problems in processing dates
Avoiding problems with packed-decimal fields
Moving from expanded to windowed date fields

Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)