Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Contents

Tables
Figures
Introduction
About This Book
Run-time environment for Enterprise PL/I for z/OS
Using your documentation
PL/I information
Notation conventions used in this book
Conventions used
How to read the syntax notation
How to read the notational symbols
Enhancements in this release
Performance improvements
Usability enhancements
Enhancements from V3R7
Debugging improvements
Performance improvements
Usability enhancements
Enhancements from V3R6
DB2 V9 support
Debugging improvements
Performance improvements
Usability enhancements
Enhancements from V3R5
Debugging improvements
Performance improvements
Usability enhancements
Enhancements from V3R4
Migration enhancements
Performance improvements
Usability enhancements
Debugging improvements
Enhancements from V3R3
More XML support
Improved performance
Easier migration
Improved usability
Improved debug support
Enhancements from V3R2
Improved performance
Easier migration
Improved usability
Enhancements from V3R1
Enhancements from VisualAge PL/I
How to send your comments
Compiling your program
Using compiler options and facilities
Compile-time option descriptions
AGGREGATE
ARCH
ATTRIBUTES
BACKREG
BIFPREC
BLANK
BLKOFF
CEESTART
CHECK
CMPAT
CODEPAGE
COMMON
COMPACT
COMPILE
COPYRIGHT
CSECT
CSECTCUT
CURRENCY
DBCS
DD
DDSQL
DECIMAL
DEFAULT
DISPLAY
DLLINIT
EXIT
EXTRN
FLAG
FLOAT
FLOATINMATH
GOFF
GONUMBER
GRAPHIC
HGPR
INCAFTER
INCDIR
INCPDS
INITAUTO
INITBASED
INITCTL
INITSTATIC
INSOURCE
INTERRUPT
LANGLVL
LIMITS
LINECOUNT
LINEDIR
LIST
LISTVIEW
MACRO
MAP
MARGINI
MARGINS
MAXMEM
MAXMSG
MAXNEST
MAXSTMT
MAXTEMP
MDECK
NAME
NAMES
NATLANG
NEST
NOT
NUMBER
OBJECT
OFFSET
OPTIMIZE
OPTIONS
OR
PP
PPCICS
PPINCLUDE
PPMACRO
PPSQL
PPTRACE
PRECTYPE
PREFIX
PROCEED
PROCESS
QUOTE
REDUCE
RENT
RESEXP
RESPECT
RULES
SEMANTIC
SERVICE
SOURCE
SPILL
STATIC
STDSYS
STMT
STORAGE
STRINGOFGRAPHIC
SYNTAX
SYSPARM
SYSTEM
TERMINAL
TEST
TUNE
USAGE
WIDECHAR
WINDOW
WRITABLE
XINFO
XML
XREF
Blanks, comments and strings in options
Changing the default options
Specifying options in the %PROCESS or *PROCESS statements
Using % statements
Using the %INCLUDE statement
Using the %OPTION statement
Using the compiler listing
Heading information
Options used for compilation
Preprocessor input
SOURCE program
Statement nesting level
ATTRIBUTE and cross-reference table
Aggregate length table
Statement offset addresses
Storage offset listing
File reference table
Messages and return codes
PL/I preprocessors
Include preprocessor
Macro preprocessor
Macro preprocessor options
Macro preprocessor example
SQL preprocessor
Programming and compilation considerations
SQL preprocessor options
Coding SQL statements in PL/I applications
Additional Information on Large Object (LOB) support
Determining compatibility of SQL and PL/I data types
Using host structures
Using indicator variables
Host structure example
Using the SQL preprocessor with the compiler user exit (IBMUEXIT)
DECLARE STATEMENT statements
CICS Preprocessor
Programming and compilation considerations
CICS preprocessor options
Coding CICS statements in PL/I applications
Writing CICS transactions in PL/I
Error-handling
Using PL/I cataloged procedures
IBM-supplied cataloged procedures
Compile only (IBMZC)
Compile and bind (IBMZCB)
Compile, bind, and run (IBMZCBG)
Compile, prelink, and link-edit (IBMZCPL)
Compile, prelink, link-edit, and run (IBMZCPLG)
Compile, prelink, load and run (IBMZCPG)
Invoking a cataloged procedure
Specifying multiple invocations
Modifying the PL/I cataloged procedures
EXEC statement
DD statement
Compiling your program
Invoking the compiler under z/OS UNIX
Input files
Specifying compile-time options under z/OS UNIX
-qoption_keyword
Single and multiletter flags
Invoking the compiler under z/OS using JCL
EXEC statement
DD statements for the standard data sets
Listing (SYSPRINT)
Source Statement Library (SYSLIB)
Specifying options
Specifying options in the EXEC statement
Specifying options in the EXEC statement using an options file
Link-editing and running
Link-edit considerations
Using the binder
Using the prelinker
Using the ENTRY card
Run-time considerations
Formatting conventions for PRINT files
Changing the format on PRINT files
Automatic prompting
Punctuating long input lines
Punctuating GET LIST and GET DATA statements
ENDFILE
SYSPRINT considerations
Using FETCH in your routines
Fetching Enterprise PL/I routines
Fetching z/OS C routines
Fetching assembler routines
Invoking MAIN under z/OS UNIX
Using I/O facilities
Using data sets and files
Associating data sets with files under z/OS
Associating several files with one data set
Associating several data sets with one file
Concatenating several data sets
Accessing HFS files under z/OS
Associating data sets with files under z/OS UNIX
Using environment variables
Using the TITLE option of the OPEN statement
Attempting to use files not associated with data sets
How PL/I finds data sets
Specifying characteristics using DD_DDNAME environment variables
Establishing data set characteristics
Blocks and records
Record formats
Data set organization
Labels
Data Definition (DD) statement
Using the TITLE option of the OPEN statement
Associating PL/I files with data sets
Specifying characteristics in the ENVIRONMENT attribute
Using libraries
Types of libraries
How to use a library
Creating a library
SPACE parameter
Creating and updating a library member
Examples
Extracting information from a library directory
Defining and using consecutive data sets
Using stream-oriented data transmission
Defining files using stream I/O
Specifying ENVIRONMENT options
Creating a data set with stream I/O
Accessing a data set with stream I/O
Using PRINT files with stream I/O
Using SYSIN and SYSPRINT files
Controlling input from the terminal
Format of data
Stream and record files
Capital and lowercase letters
End-of-file
COPY option of GET statement
Controlling output to the terminal
Format of PRINT files
Stream and record files
Capital and lowercase characters
Output from the PUT EDIT command
Using record-oriented data transmission
Specifying record format
Defining files using record I/O
Specifying ENVIRONMENT options
Creating a data set with record I/O
Accessing and updating a data set with record I/O
Defining and using regional data sets
Defining files for a regional data set
Specifying ENVIRONMENT options
Using keys with REGIONAL data sets
Using REGIONAL(1) data sets
Dummy Records
Creating a REGIONAL(1) data set
Accessing and updating a REGIONAL(1) data set
Essential information for creating and accessing regional data sets
Defining and using VSAM data sets
Using VSAM data sets
How to run a program with VSAM data sets
Pairing an Alternate Index Path with a File
VSAM organization
Keys for VSAM data sets
Choosing a data set type
Defining files for VSAM data sets
Specifying ENVIRONMENT options
Performance options
Defining Files for Alternate Index Paths
Defining VSAM data sets
Entry-sequenced data sets
Loading an ESDS
Using a SEQUENTIAL file to access an ESDS
Using Files Defined for non-VSAM Data Sets
Using Shared Data Sets
Improving your program
Improving performance
Selecting compiler options for optimal performance
OPTIMIZE
GONUMBER
ARCH
REDUCE
RULES
PREFIX
DEFAULT
Summary of compiler options that improve performance
Coding for better performance
DATA-directed input and output
Input-only parameters
GOTO statements
String assignments
Loop control variables
PACKAGEs versus nested PROCEDUREs
REDUCIBLE Functions
DESCLOCATOR or DESCLIST
DEFINED versus UNION
Named constants versus static variables
Avoiding calls to library routines
Preloading library routines
Using interfaces to other products
Using the Sort program
Preparing to use Sort
Choosing the type of Sort
Specifying the sorting field
Specifying the records to be sorted
Determining storage needed for Sort
Calling the Sort program
Example 1
Example 2
Example 3
Example 4
Example 5
Determining whether the Sort was successful
Establishing data sets for Sort
Sort data input and output
Data input and output handling routines
E15—Input handling routine (Sort Exit E15)
E35—Output handling routine (Sort Exit E35)
Calling PLISRTA example
Calling PLISRTB example
Calling PLISRTC example
Calling PLISRTD example
Sorting variable-length records example
ILC with C
Equivalent data types
Simple type equivalence
Struct type equivalence
Enum type equivalence
File type equivalence
Using C functions
Matching simple parameter types
Matching string parameter types
Functions returning ENTRYs
Linkages
Sharing output
Summary
Interfacing with Java
What is the Java Native Interface (JNI)?
JNI Sample Program #1 - 'Hello World'
Writing Java Sample Program #1
JNI Sample Program #2 - Passing a String
Writing Java Sample Program #2
JNI Sample Program #3 - Passing an Integer
Writing Java Sample Program #3
JNI Sample Program #4 - Java Invocation API
Writing Java Sample Program #4
Determining equivalent Java and PL/I data types
Specialized programming tasks
Using the PLISAXA and PLISAXB XML parsers
Overview
The PLISAXA built-in subroutine
The PLISAXB built-in subroutine
The SAX event structure
start_of_document
version_information
encoding_declaration
standalone_declaration
document_type_declaration
end_of_document
start_of_element
attribute_name
attribute_characters
attribute_predefined_reference
attribute_character_reference
end_of_element
start_of_CDATA_section
end_of_CDATA_section
content_characters
content_predefined_reference
content_character_reference
processing_instruction
comment
unknown_attribute_reference
unknown_content_reference
start_of_prefix_mapping
end_of_prefix_mapping
exception
Parameters to the event functions
Coded character sets for XML documents
Supported EBCDIC code pages
Supported ASCII code pages
Specifying the code page
Exceptions
Example
Continuable exception codes
Terminating exception codes
Using the PLISAXC XML parser
Overview
The PLISAXC built-in subroutine
The SAX event structure
start_of_document
version_information
encoding_declaration
standalone_declaration
document_type_declaration
end_of_document
start_of_element
attribute_name
attribute_characters
end_of_element
start_of_CDATA_section
end_of_CDATA_section
content_characters
processing_instruction
comment
namespace_declare
end_of_input
unresolved_reference
exception
Parameters to the event functions
Differences in the events
Coded character sets for XML documents
Supported code pages
Specifying the code page
Exceptions
Example with a simple document
Using PLIDUMP
PLIDUMP usage notes
Locating variables in the PLIDUMP output
Locating AUTOMATIC variables
Locating STATIC variables
Locating CONTROLLED variables
Saved Compilation Data
Timestamp
Saved options string
Interrupts and attention processing
Using ATTENTION ON-units
Interaction with a debugging tool
Using the Checkpoint/Restart facility
Requesting a checkpoint record
Defining the checkpoint data set
Requesting a restart
Automatic restart after a system failure
Automatic restart within a program
Getting a deferred restart
Modifying checkpoint/restart activity
Using user exits
Procedures performed by the compiler user exit
Activating the compiler user exit
The IBM-supplied compiler exit, IBMUEXIT
Customizing the compiler user exit
Modifying SYSUEXIT
Writing your own compiler exit
Structure of global control blocks
Writing the initialization procedure
Writing the message filtering procedure
Writing the termination procedure
PL/I descriptors
Passing an argument
Argument passing by descriptor list
Argument passing by descriptor-locator
CMPAT(V*) descriptors
String descriptors
Array descriptors
CMPAT(LE) descriptors
String descriptors
Array descriptors
Appendixes
Appendix. SYSADATA message information
Understanding the SYSADATA file
Summary Record
Counter records
Literal records
File records
Message records
Understanding SYSADATA symbol information
Ordinal type records
Ordinal element records
Symbol records
Understanding SYSADATA syntax information
Source records
Token records
Syntax records
Notices
Trademarks
Glossary
Index

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)