home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
zfamily.zip
/
zfamily
/
ZHPFUNCS
/
HELP
/
ZHPFUNCS.INF
(
.txt
)
next >
Wrap
OS/2 Help File
|
1993-11-19
|
60KB
|
1,811 lines
ΓòÉΓòÉΓòÉ 1. Document Content ΓòÉΓòÉΓòÉ
This document is made up of five parts:
Library Card
General information card for this library.
Installation Guide
How to install the Z Family/2 reusable library and how to use the installed
files.
User's Guide
How to integrate the library with your application and how to call the
corresponding functions and macros.
Reference Manual
Reference information for the functions, macros and structures provided by
this library.
Sample Program
How to call and use the sample program.
ΓòÉΓòÉΓòÉ 2. Library card ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Package: ZHPFUNCS
Library: FMZHPFUN.DLL
Version: 2.20
Requirements:
OS/2 2.x, C Set/2 or IBM C/C++ Tools 2.0, Toolkit 2.x.
Trademarks
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ <hidden> Dummy ΓòÉΓòÉΓòÉ
Contact: Dr. Dario de Judicibus
IBMMAIL: ITIBM98W
Internet: ddj@vnet.ibm.com
ΓòÉΓòÉΓòÉ 3. Installation Guide ΓòÉΓòÉΓòÉ
Select one:
Library installation
The expanded tree
ΓòÉΓòÉΓòÉ 3.1. Library installation ΓòÉΓòÉΓòÉ
Select one:
Γûá Package content
Γûá How to install the library
ΓòÉΓòÉΓòÉ 3.1.1. Package content ΓòÉΓòÉΓòÉ
FMZHPFUN.DLL is distributed as a package containing the following files:
ZHPFUNCS.ZIP A compressed file which contains the library
modules.
ZHPFUNCS.INF The on-line documentation for this reusable library.
ΓòÉΓòÉΓòÉ 3.1.2. How to install the library ΓòÉΓòÉΓòÉ
To install the libraries, you have to perform the following steps:
1. Locate the directory of the CD-ROM, remote partition, or diskette where
ZHPFUNCS.ZIP is placed. Let's say, for example, P:\ZFAMILY.
2. Move to the directory on your system where you want to install the
reusable library. For example, move to D:\REUSE.
3. Unpack the ZIP file by using option -d. Note that the option must be lower
case. In our case, issue the following command:
[D:\REUSE] PKUNZIP2 -d P:\ZFAMILY\ZHPFUNCS.ZIP
4. When the command finishes, a new directory is available on your system. In
our example, P:\ZFAMILY\ZHP. This directory contains several
sub-directories which contains all the files needed to use the reusable
library. The directory tree is described in Library Tree. The content of
each sub-directory is described in detail in Content of directories.
5. To use the library, you must now move the unpacked files to the
appropriate directories in your development environment. In particular
move
o the headers from .\ZHP\H to any directory listed in your INCLUDE
environment variable.
o the import and/or object libraries from .\ZHP\LIB and .\ZHP\DEVEL to any
directory listed in your LIB environment variable.
o the dynamic link libraries from .\ZHP\DLL to any directory listed in your
LIBPATH environment variable.
You may also want to move this file from .\ZHP\HELP to any directory
listed in your BOOKSHELF environment variable.
Now you are ready to work with the ZHP reusable library.
ΓòÉΓòÉΓòÉ 3.2. The expanded tree ΓòÉΓòÉΓòÉ
Select one:
Γûá Library tree
Γûá Content of directories
ΓòÉΓòÉΓòÉ 3.2.1. Library tree ΓòÉΓòÉΓòÉ
When you unpack ZHPFUNCS.ZIP, a new sub-directory is created on your system:
ZHP. It has the following structure:
current dir
Γöé
Γöé ZHP
Γö£ΓöÇΓöÉ
Γöé Γö£ΓöÇΓöÇΓöÇΓöÇ H
. Γö£ΓöÇΓöÇΓöÇΓöÇ DLL
. Γö£ΓöÇΓöÇΓöÇΓöÇ LIB
. Γö£ΓöÇΓöÇΓöÇΓöÇ MRI
. Γö£ΓöÇΓöÇΓöÇΓöÇ HELP
. Γö£ΓöÇΓöÇΓöÇΓöÇ DEVEL
. ΓööΓöÇΓöÇΓöÇΓöÇ SAMPLE
ΓòÉΓòÉΓòÉ 3.2.2. Content of directories ΓòÉΓòÉΓòÉ
Here is the list of the directories that are created when ZHPFUNCS.ZIP is
unpacked as described in How to install the library. The content of each
directory is described in detail.
The H sub-directory contains all the header files (H and RCH) to be added to
the INCLUDE path of the application development environment. Move all the files
from this directory to the appropriate path in your environment.
Important If you use other Z Family/2 reusable libraries in your development
environment, ensure that you are using the latest version of the zgeneral.h
header file, which is available in all the library packages. You may do
that by comparing the update dates in the prologue of the header file.
/*
** Module : ZGENERAL.H
** Authors : Dario de Judicibus (DEJUDICI at ROMEPPC)
** Alessandro Cavallini (CAVALLI at ROMEPPC)
** Giacomo Lenoci
** Created : 10 Jan 1992
** Updated : 01 Feb 1993
** Version : 2.30
** Content : General includes for all Z Family/2 DLLs
** Product : Z Family/2 Project (5641-504) FMZ
**
*/
The DLL sub-directory contains all the dynamic link library or libraries (DLL)
to be added to the LIBPATH path of the application development environment and
of the run environment. Move all the files from this directory to the
appropriate path in your environment.
The LIB sub-directory contains all the import library or libraries (LIB) to be
added to the LIB path of the application development environment. Move all the
files from this directory to the appropriate path in your environment.
The MRI sub-directory contains all the text that might be translated to other
languages (see Machine Readable Information for additional information).
The HELP sub-directory contains the library documentation and a news file
(ZHPNEWS.DOC) containing modifications applied at the last minute and not
available in the on-line manuals, along with the history of changes.
The DEVEL sub-directory contains the object library or libraries (LIB) and the
sample DEF and MAK files that can be used to generate your own DLL(s) (see
Create your own library for details).
The SAMPLE sub-directory contains the source code and the executable code of
the sample program. It doesn't contain the DLL file(s) so to run the sample,
you must ensure that all the required DLL files have been copied to a
directory in your LIBPATH. The DLL files for this library as well as those
belonging on any pre-requisite Z Family/2 Reusable Library need to be in a
directory in your LIBPATH.
Important If the library depends on other Z Family/2 reusable libraries, all
the files belonging to the pre-requisite libraries will be part of the
dependent library only in the beta versions of the package.
The final version won't contain any pre-requisite file. That is true for
the SAMPLE sub-directory too. So, you won't be able to recompile the sample
program unless you install the pre-requisite packages too.
ΓòÉΓòÉΓòÉ 4. User's Guide ΓòÉΓòÉΓòÉ
Select one:
General information
Basic topics
Advanced topics
ΓòÉΓòÉΓòÉ 4.1. General information ΓòÉΓòÉΓòÉ
Select one:
Γûá Library overview
Γûá Include files
Γûá Requirements
Γûá Development rules
Γûá Trademarks
ΓòÉΓòÉΓòÉ 4.1.1. Library overview ΓòÉΓòÉΓòÉ
This library contains a set of functions to convert various type of data from
the S/370 format to that used in OS/2, and vice versa. The following data types
are supported:
o Dates and Times
o Short and Long Integers
o Single and Double Precision Floating Point Numbers
The data type formats for either S/370 and OS/2 are provided in Data formats.
ΓòÉΓòÉΓòÉ 4.1.2. Include files ΓòÉΓòÉΓòÉ
The system include files that are required to use this library are:
#define INCL_PM
#define INCL_DOS
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <stdarg.h>
The specific include files that are required to use this library are:
zgeneral.h
Definitions and types for all Z Family/2 Reusable Libraries.
zhpdefs.h
Macro and constants for this library.
zhptypes.h
Type definitions for this library.
zhpproto.h
Function prototypes for this library.
Note: The specific includes must be included in the order as listed above.
ΓòÉΓòÉΓòÉ 4.1.3. Requirements ΓòÉΓòÉΓòÉ
FMZHPFUN.DLL is intended to run under OS/2 2.x. It doesn't run under previous
versions of OS/2.
FMZHPFUN.DLL has been compiled by IBM C/C++ Tools 2.0 and statically linked to
the C run-time libraries. Then you don't need the run-time libraries to use it.
Notes
FMZHPFUN.DLL functions can be called either from C or from C++. In addition, an
exception handler is registered for each exported function.
A sample program that shows how to use FMZHPFUN.DLL functions is also provided
in the DLL's package. A short description of that sample is available in Sample
program tutorial.
The sample program uses the IMPORTS statement in its .DEF to import the
FMZHPFUN.DLL functions. File FMZHPFUN.LIB is also provided as an alternative
solution.
It is also possible to create a clone of FMZHPFUN.DLL by using the files
available in the DEVEL sub-directory of the tree created by exploding the ZIP
file distributed with the package (see Create your own library).
ΓòÉΓòÉΓòÉ 4.1.4. Development rules ΓòÉΓòÉΓòÉ
To safely integrate any Z Family/2 reusable library in your application, you
need to follow a simple set of rules:
1. Do not use names beginning by a lower case "z" for
o functions
o macros
o global structures
o types
o constants
o #define
o global variables
2. Do not use names beginning by a "z" for
o include files (.H)
o dynamic link libraries (.DLL)
Follow these rules and your code can take full advantage of the services
provided by the current and future Z Family Reusable Libraries/2.
ΓòÉΓòÉΓòÉ 4.1.5. Trademarks ΓòÉΓòÉΓòÉ
IBM Z Family/2 Reusable Libraries is copyrighted by IBM Corporation.
IBM Corporation trademarks
CUA
Common User Access
IBM
IBM C Set/2
IBM C/C++ Tools
Operating System/2
OS/2
Presentation Manager
SAA
Systems Application Architecture
Workplace Shell
Other trademarks
Intel is a trademark of the Intel Corporation.
Microsoft and Windows are trademarks of the Microsoft Corporation.
PKZIP and PKUNZIP are trademarks of the PKWare Corporation.
80386 is a trademark of the Intel Corporation.
ΓòÉΓòÉΓòÉ 4.2. Basic topics ΓòÉΓòÉΓòÉ
Select one:
Γûá Design notices
Γûá Data formats
Γûá Floating Point Numbers
ΓòÉΓòÉΓòÉ 4.2.1. Design notices ΓòÉΓòÉΓòÉ
Important
The ZHP functions do not check the input values. They perform only the
conversion of input strings and numbers according to specific algorithms.
If you want to check if the input value is valid, you must code your own
controls, or use another Z Family/2 library which provides such services
(e.g. ZIS or ZNL libraries).
ΓòÉΓòÉΓòÉ 4.2.2. Data formats ΓòÉΓòÉΓòÉ
Select one:
Γûá Date formats
Γûá Time formats
Γûá Short integer formats
Γûá Long integer formats
Γûá Single precision floating point number formats
Γûá Double precision floating point number formats
ΓòÉΓòÉΓòÉ 4.2.2.1. Date formats ΓòÉΓòÉΓòÉ
S/370 Packed Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöéy yΓöéΓöéy mΓöéΓöém dΓöéΓöéd FΓöé 4 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Filler (0xF)
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of day
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of day
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of month
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of month
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4th digit of year
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3st digit of year
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of (year - 1900)
OS/2 Sorted String Format
ΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉ
ΓöéMΓöéΓöéCΓöéΓöéYΓöéΓöéYΓöéΓöémΓöéΓöémΓöéΓöédΓöéΓöédΓöéΓöé0Γöé 9 BYTES
ΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤Γöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇ Terminator (0x00)
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of day
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of day
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of month
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of month
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 4th digit of year
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 3st digit of year
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of year (century)
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of year (millenium)
ΓòÉΓòÉΓòÉ 4.2.2.2. Time formats ΓòÉΓòÉΓòÉ
S/370 Packed Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöé0 hΓöéΓöéh mΓöéΓöém sΓöéΓöés FΓöé 4 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Filler (0xF)
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of seconds
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of seconds
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of minutes
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of minutes
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of hours
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of hours
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Filler (0x0)
OS/2 Sorted String Format
ΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉΓöîΓö¼ΓöÉ
ΓöéhΓöéΓöéhΓöéΓöémΓöéΓöémΓöéΓöésΓöéΓöésΓöéΓöé ΓöéΓöé ΓöéΓöé0Γöé 9 BYTES
ΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤ΓöÿΓööΓö┤Γöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇ Terminator (0x00)
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇ Filler (space)
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Filler (space)
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of seconds
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of seconds
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of minutes
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of minutes
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 2nd digit of hours
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1st digit of hours
ΓòÉΓòÉΓòÉ 4.2.2.3. Short integer formats ΓòÉΓòÉΓòÉ
S/370 16-bit Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöé 1 ΓöéΓöé 0 Γöé 2 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 0 to 3
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 4 to 7
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 8 to 11
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 12 to 15
OS/2 Short Integer Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöé 0 ΓöéΓöé 1 Γöé 2 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 8 to 11
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 12 to 15
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 0 to 3
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 4 to 7
ΓòÉΓòÉΓòÉ 4.2.2.4. Long Integer formats ΓòÉΓòÉΓòÉ
S/370 32-bit Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöé 3 ΓöéΓöé 2 ΓöéΓöé 1 ΓöéΓöé 0 Γöé 4 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 0 to 3
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 4 to 7
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 8 to 11
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 12 to 15
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 16 to 19
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 20 to 23
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 24 to 27
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 28 to 31
OS/2 Long Integer Format
ΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉΓöîΓöÇΓö¼ΓöÇΓöÉ
Γöé 0 ΓöéΓöé 1 ΓöéΓöé 2 ΓöéΓöé 3 Γöé 4 BYTES
ΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿΓööΓöÇΓö┤ΓöÇΓöÿ
Γöé Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 24 to 27
Γöé Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 28 to 31
Γöé Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 16 to 19
Γöé Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 20 to 23
Γöé Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 8 to 11
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 12 to 15
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 0 to 3
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Bits from 4 to 7
ΓòÉΓòÉΓòÉ 4.2.2.5. Single precision floating point number formats ΓòÉΓòÉΓòÉ
S/370 Format
ΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉ
Γöé + ΓöéΓöé + ΓöéΓöé + ΓöéΓöé + Γöé
ΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γöÿ
ΓööΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇ 24 bits : fraction
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 7 bits : exponent
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1 bit : sign
value = (-1)[s] * 16[(e - 64)] * .f
range = 5E-79 ... 7E+75
OS/2 IEEE Format
ΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉ
Γöé + ΓöéΓöé + ΓöéΓöé + ΓöéΓöé + Γöé
ΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γöÿ
ΓööΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 23 bits : fraction
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 8 bits : exponent
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1 bit : sign
value = (-1)[s] * 2[(e - 127)] * 1.f
range = 1E-38 ... 3E+38
ΓòÉΓòÉΓòÉ 4.2.2.6. Double precision floating point number formats ΓòÉΓòÉΓòÉ
S/370 Format
5 bytes
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼ Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉ
Γöé + ΓöéΓöé + ΓöéΓöé ΓöéΓöé + Γöé
ΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤ Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γöÿ
ΓööΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇ 56 bits : fraction
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 7 bits : exponent
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1 bit : sign
value = (-1)[s] * 16[(e - 64)] * .f
range = 5E-79 ... 7E+75
OS/2 IEEE Format
5 bytes
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼ Γö¼Γö¼ΓöÉΓöîΓö¼Γö¼Γö¼Γö¼Γö¼Γö¼Γö¼ΓöÉ
Γöé + ΓöéΓöé + ΓöéΓöé ΓöéΓöé + Γöé
ΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤ΓöÿΓööΓö┤Γö┤ Γö┤Γö┤ΓöÿΓööΓö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γö┤Γöÿ
ΓööΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Γöé Γöé ΓööΓöÇΓöÇΓöÇΓöÇ 52 bits : fraction
Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 11 bits : exponent
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 1 bit : sign
value = (-1)[s] * 2[(e - 1023)] * 1.f
range = 2E-308 ... 3E+308
ΓòÉΓòÉΓòÉ 4.2.3. Floating Point Numbers ΓòÉΓòÉΓòÉ
Floating point numbers in the host environment are different from those in the
PC environment in both data format and data range. In fact, the IEEE format
used for OS/2 floating point numbers defines two different ranges for single
and double precision, whereas the S/370 range is the same in both cases:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé MINIMUM Γöé MAXIMUM Γöé
Γöé VALUE Γöé VALUE Γöé
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Format Γöé IEEE Γöé S370 Γöé IEEE Γöé S370 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Single precision Γöé 1E-38 Γöé 5E-79 Γöé 3E+38 Γöé 7E+75 Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé Double precision Γöé 2E-308 Γöé 5E-79 Γöé 3E+308 Γöé 7E+75 Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Because the two ranges are not equivalent, the conversion services are not
perfectly biunivocal. Magnitudes which underflow [overflow] during conversion
are converted to zero [the largest representable number].
In addition, because the number of bytes used for the fraction section of the
data format (see Single precision floating point number formats and Double
precision floating point number formats) is not the same in IEEE and S/370
formats, conversion is not strictly reversible, that is:
PtoH (x) HtoP &nidentical. HtoP (x) PtoH ╨║= I
where PtoH is the conversion from IEEE (PC) to S/370 (Host) format
HtoP is the conversion from S/370 (Host) to IEEE (PC) format
I is the conversion from a format to itself (identity)
The consequence is that the least significant bits are unreliable, as in the
following example:
Converting from IEEE to S/370 format a single precision floating point
number:
PtoH 0x80866423 0xA142B211
Converting back from S/370 to IEEE format the result of the previous
conversion:
HtoP 0xA142B211 0x80856420
ΓòÉΓòÉΓòÉ 4.3. Advanced topics ΓòÉΓòÉΓòÉ
Select one:
Γûá Machine Readable Information
Γûá Signal handling
Γûá Create your own library
Γûá How to generate the clone
Γûá How to use the object library
ΓòÉΓòÉΓòÉ 4.3.1. Machine Readable Information ΓòÉΓòÉΓòÉ
If the library contains translatable pieces of information, they are contained
in resource files available in the MRI sub-directory of the ZHP directory,
created at installation time (see Installation).
To use these resource files, move all the header files in the H sub-directory
to the appropriate path in your development environment, translate the resource
files to the target language, recompile the file by using the command
rc -r <resource>.RC
to generate the corresponding RES file, and apply the result to the DLL file by
using the command
rc <resource>.RES <name>.DLL
Note that <name> is not FMZHPFUN but the name of the DLL cloned as described in
Create your own library.
ΓòÉΓòÉΓòÉ 4.3.2. Signal handling ΓòÉΓòÉΓòÉ
FMZHPFUN.DLL enables the handling of signals as follows.
First, each exported function is preceeded in code by the corresponding pragma
handler:
Sample
#pragma handler(zhpLibraryVersion)
VOID EXPENTRY zhpLibraryVersion
.
.
.
Second, a standard function, available in any Z Family/2 reusable library, is
provided to register a user's signal handler: zhpRegisterSignal (see
zhpRegisterSignal).
The user's signal handler is a function that accepts as input parameter an
integer, and returns a void. Here is a sample signal handler:
Sample
void UserSignalHandler (int signal)
{
switch (signal)
{
case SIGILL : /* Prepare to handle SIGILL */ break ;
case SIGSEGV : /* Prepare to handle SIGSEGV */ break ;
case SIGFPE : /* Prepare to handle SIGFPE */ break ;
case SIGTERM : /* Prepare to handle SIGTERM */ break ;
case SIGABRT : /* Prepare to handle SIGABRT */ break ;
case SIGINT : /* Prepare to handle SIGINT */ break ;
case SIGUSR1 : /* Prepare to handle SIGUSR1 */ break ;
case SIGUSR2 : /* Prepare to handle SIGUSR2 */ break ;
case SIGUSR3 : /* Prepare to handle SIGUSR3 */ break ;
case SIGBREAK: /* Prepare to handle SIGBREAK */ break ;
default : /* Unknown signal */ break ;
}
/*
** Handle the received signal according to the previous
** preparation. In general, show a message and terminate
** the program.
*/
}
ΓòÉΓòÉΓòÉ 4.3.3. Create your own library ΓòÉΓòÉΓòÉ
It is possible for the reuser to decide to clone a Z Family/2 reusable library
with a different name. Since the source code is not available to reusers, it
is possible to do that by using the files in the DEVEL sub-directory.
Important These files are not intended to be used as they are, but should be
modified as described below.
The DEVEL directory contains at least four files:
ZHPFUNCS.LIB An object library
ZHPFUNCS.DEF A skeleton for the definition file
ZHPCLONE.MAK A skeleton for the make file
ZHPSTUB.C A stub file used to generate the library
In addition, it may also contain one or more resource files, that is
ZHPxxxxx.RES files.
Important
This library may need to load resources from itself, or to get its module
handle. If you clone the library and change its name, it has no way to
automatically know which is its new name. So you need to tell it about. You
can do that by using the zhpSetLibraryName() function.
ΓòÉΓòÉΓòÉ 4.3.4. Create your own library ΓòÉΓòÉΓòÉ
To generate a clone of FMZHPFUN.DLL with a different name, you have to execute
the following steps:
1. Edit ZHPCLONE.MAK (see Skeleton of a makefile to clone a Z Family/2 DLL)
changing USRNAME to the desired name. Let's say, for example, DLLCLONE.
You may add other instructions to this make file, but be careful if you
change the existing ones. In particular, the OPTIONS constant contains
the same options used to compile FMZHPFUN.DLL. If you change them, the new
DLL may not work as expected.
Skeleton of a makefile to clone a Z Family/2 DLL
#
# Module : ZxxCLONE.MAK
# Authors : Luca Miccoli (MICCOLI at ROMEPPC)
# Reviewer : Dario de Judicibus (DEJUDICI at ROMEPPC)
# Created : 06 Apr 1993
# Reviewed : 21 Apr 1993
# Version : 1.00
# Content : Make File for Z Family/2 Clones
#
# ------------------------------------------------------------------------------
#
# NOTE : This is a SAMPLE makefile. You may need to modify it to satisfy your
# specific needs. You may also want to include it in a larger MAKE file
# which is used to generate your application. In any case, read carefully
# the comments below and the "User's Guide", to understand what you can
# change, and what should be used as is.
# ------------------------------------------------------------------------------
#
# User provided name of the .DLL (to be filled)
#
USRNAME = ________
STBNAME = zxxstub
INTNAME = zxxfuncs
RESNAME = zxxrsrcs
#
# Do not change OPTIONS unless really needed. They SHOULD match the original ones.
#
OPTIONS = /Kb /Ge- /Sm /Ss /Gd- /Gm+ /Ms /I-
LINKOPT = /NOI
#
# MAKE file generates a DLL and the corresponding IMPORT library having the
# name specified as USRNAME above.
#
all: $(USRNAME).dll $(USRNAME).lib
#
# STUB should be compiled by using the same options used for Z Family/2 DLL
#
$(STBNAME).obj: $(STBNAME).c
icc /C+ $(OPTIONS) $(STBNAME).c
#
# Use STUB and Z Family/2 OBJECT library to generate the User's Cloned DLL
# Use $(INTNAME).def to make your $(USRNAME).def, changing the name after
# LIBRARY (first instruction of the definition file).
#
$(USRNAME).dll: $(STBNAME).obj $(INTNAME).lib $(USRNAME).def $(RESNAME).res
link386 $(LINKOPT) $(STBNAME).obj,$(USRNAME).dll,,$(INTNAME).lib,$(USRNAME).def ;
rc $(RESNAME).res $(USRNAME).dll
#
# Use the User's Cloned DLL to generate the corresponding IMPORT library
#
$(USRNAME).lib: $(USRNAME).dll $(USRNAME).def
implib $(USRNAME).lib $(USRNAME).def
2. Edit ZHPFUNCS.DEF (see Skeleton of a definition to clone a Z Family/2 DLL)
changing the name after LIBRARY keyword to the desired name, that is,
DLLCLONE.
Skeleton of a definition to clone a Z Family/2 DLL
;
; Module : ZxxFUNCS.DEF
; Authors : Dario de Judicibus (DEJUDICI at ROMEPPC)
; Mario Turaccio (TURACCIO at ROMEPPC)
; Reviewer : Dario de Judicibus (DEJUDICI at ROMEPPC)
; Created : 21 Oct 1991
; Updated : 01 Apr 1993
; Version : 1.00
; Content : Module Definition File for FMZLXFUN.DLL
; Product : Z Family/2 Project (5641-504) FMZ
;
LIBRARY FMZxxFUN INITINSTANCE TERMINSTANCE
DESCRIPTION '... , Z Family/2 5641-504 (C) Copyright IBM Corporation 1993,1994.'
PROTMODE
CODE LOADONCALL
DATA MULTIPLE READWRITE NONSHARED
HEAPSIZE 32768
STACKSIZE 32768
IMPORTS
FMZyyFUN.zgsLibraryVersion
FMZyyFUN.zgsRegisterSignal
...
EXPORTS
zxxLibraryVersion
zxxRegisterSignal
...
3. Generate the new DLL by executing:
NMAKE - af ZHPCLONE.MAK
ΓòÉΓòÉΓòÉ 4.3.5. How to use the object library ΓòÉΓòÉΓòÉ
An object library called ZHPFUNCS.LIB is available in DEVEL sub-directory.
Such a library is provided to allow the user to clone the FMZHPFUN.DLL library,
as explained in Create your own library.
Important
You may also decide to clone only few function rather than the whole
library. However you cannot use this library to statically link some library
function to your program. In fact, those functions which may need to load
resources from the DLL itself, or to get the library handle to perform
specific activities, wouldn't work any more. This use of the object library
is not supported. You may do that, but at your own risk.
ΓòÉΓòÉΓòÉ 5. Reference Manual ΓòÉΓòÉΓòÉ
Select one:
Function sheets
Macro sheets
Data sheets
ΓòÉΓòÉΓòÉ 5.1. Function sheets ΓòÉΓòÉΓòÉ
Select one:
Γûá zhpLibraryVersion
Γûá zhpSetLibraryName
Γûá zhpRegisterSignal
Γûá zhpIEEEtoS370double
Γûá zhpIEEEtoS370float
Γûá zhpLongToS370Word
Γûá zhpPackedToSortedDate
Γûá zhpPackedToSortedTime
Γûá zhpShortToS370Halfword
Γûá zhpSortedToPackedDate
Γûá zhpSortedToPackedTime
Γûá zhpS370HalfwordToShort
Γûá zhpS370toIEEEdouble
Γûá zhpS370toIEEEfloat
Γûá zhpS370WordToLong
ΓòÉΓòÉΓòÉ 5.1.1. zhpLibraryVersion ΓòÉΓòÉΓòÉ
Provide information about library version and the date and time of compilation
of the DLL source code.
Prototype
VOID EXPENTRY zhpLibraryVersion
(
zPLIBVERS pLibVers
) ;
Parameters
pLibVers
Pointer to a zLIBVERS structure. That structure should be allocated by
the caller. Its content, if any, will be overwritten.
result
The zLIBVERS structure whose pointer is provided as input parameter is
filled.
Notes
Look at zLIBVERS for the definition of zLIBVERS structure.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.2. zhpSetLibraryName ΓòÉΓòÉΓòÉ
Set the value of the private variable zhpDllName. See also Create your own
library.
Important If called, this function must be called before any other library
function.
Prototype
VOID EXPENTRY zhpSetLibraryName
(
PSZ szNewName
) ;
Parameters
szNewName
Pointer to the string containing the new name of library. If you pass a
NULL pointer or an empty string, the library name is set to its default,
that is zhpDLLNAME.
result
None.
Notes
If you clone FMZHPFUN.DLL, you obtain a new library with a new name. Since
this library may need to know its name to load resources or get its module
handle, you have to tell it which is the new name. You can use this function
to do that. The default name is zhpDLLNAME.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.3. zhpRegisterSignal ΓòÉΓòÉΓòÉ
It registers an application signal handler for exception handling.
Prototype
zSIGNAL EXPENTRY zhpRegisterSignal
(
zSIGHAND SigHandler
)
Parameters
SigHandler
Pointer to the application signal handler to be registered. Type is
zSIGHAND (see Z Family/2 general constants).
result
zREGISTERED if the handler has been successfully registered, otherwise it
returns the signal for which the registration failed. See Signal
handling types for the complete list of signals and their meaning.
Notes
Look at Signal handling for a description of the exception handling feature
provided by FMZHPFUN.DLL.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.4. zhpIEEEtoS370double ΓòÉΓòÉΓòÉ
Convert an OS/2 double precision IEEE floating point number to a S/370 double
precision floating point number.
Prototype
VOID EXPENTRY zhpIEEEtoS370double
(
ULONG *dIEEE ,
ULONG *dS370
)
Parameters
dIEEE
The pointer to an array of 2 unsigned long integers which contains the
number in the OS/2 IEEE format (64-bit).
dS370
The pointer to an array of 2 unsigned long integers which should receive
the number in the S/370 format (64-bit).
result
The array of unsigned long integers whose pointer is passed as the second
argument is filled.
Notes
See Single precision floating point number formats and Double precision
floating point number formats for details about floating point number formats.
Array sizes are not checked. The caller is responsible for providing the
64-bit numbers as arrays of two unsigned long integers.
The input value is not checked. The function assumes the number is valid and
provided according to the IEEE format.
Because the S/370 format and the IEEE format are not equivalent, the following
rules apply:
o Magnitudes which underflow during conversion are converted to 0.
o Magnitudes which overflow during conversion are converted to the largest
representable number.
See also Floating Point Numbers for additional considerations.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.5. zhpIEEEtoS370float ΓòÉΓòÉΓòÉ
Convert an OS/2 single precision IEEE floating point number to a S/370 single
precision floating point number.
Prototype
VOID EXPENTRY zhpIEEEtoS370float
(
ULONG *fIEEE ,
ULONG *fS370
)
Parameters
fIEEE
The pointer to an unsigned long integer which contains the number in the
OS/2 IEEE format (32-bit).
fS370
The pointer to an unsigned long integer which should receive the number
in the S/370 format (32-bit).
result
The unsigned long integer whose pointer is passed as the second argument
is filled.
Notes
See Single precision floating point number formats and Double precision
floating point number formats for details about floating point number formats.
The input value is not checked. The function assumes the number is valid and
provided according to the IEEE format.
Because the S/370 format and the IEEE format are not equivalent, the following
rules apply:
o Magnitudes which underflow during conversion are converted to 0.
o Magnitudes which overflow during conversion are converted to the largest
representable number.
See also Floating Point Numbers for additional considerations.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.6. zhpLongToS370Word ΓòÉΓòÉΓòÉ
Convert an OS/2 long integer to a S/370 32-bit integer.
Prototype
VOID EXPENTRY zhpLongToS370Word
(
LONG *xLong ,
CHAR *xWord
)
Parameters
xLong
The pointer to a long integer which contains the number in the 80x86
format.
xWord
The pointer to a 4-byte array which should receive the S/370 32-bit
integer.
result
The 4-byte array whose pointer is passed as the second argument is
filled.
Notes
See Long integer formats and Short integer formats for details about integer
formats.
Array size is not checked. The caller is responsible for providing an array of
four characters as target memory area.
The input value is not checked. The function assumes the integer is valid and
provided according to the OS/2 80x86 format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.7. zhpPackedToSortedDate ΓòÉΓòÉΓòÉ
Convert a date from the S/370 Packed format to the OS/2 Sorted String format.
Prototype
VOID EXPENTRY zhpPackedToSortedDate
(
CHAR *packed ,
CHAR *sorted
)
Parameters
packed
The pointer to a 4-byte array which contains the date in the S/370 Packed
format.
sorted
The pointer to a null terminated string which should receive the date in
the OS/2 Sorted String format. String must be at least 9-bytes long.
result
The string whose pointer is passed as the second argument is filled.
Notes
See Date formats and Time formats for details about date and time formats.
String lengths and array sizes are not checked. The caller is responsible for
providing strings and arrays of appropriate size.
The input date is not checked. The function assumes the date is valid and
provided according to the S/370 Packed format.
Known bugs
This function works with dates whose year range is 1000 AD to 2999 AD.
ΓòÉΓòÉΓòÉ 5.1.8. zhpPackedToSortedTime ΓòÉΓòÉΓòÉ
Convert a time from the S/370 Packed format to the OS/2 Sorted String format.
Prototype
VOID EXPENTRY zhpPackedToSortedTime
(
CHAR *packed ,
CHAR *sorted
)
Parameters
packed
The pointer to a 4-byte array which contains the time in the S/370 Packed
format.
sorted
The pointer to a null terminated string which should receive the time in
the OS/2 Sorted String format. String must be at least 9-byte long.
result
The string whose pointer is passed as the second argument is filled.
Notes
See Date formats and Time formats for details about date and time formats.
String lengths and array sizes are not checked. The caller is responsible for
providing strings and arrays of appropriate size.
The input time is not checked. The function assumes the time is valid and
provided according to the S/370 Packed format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.9. zhpShortToS370Halfword ΓòÉΓòÉΓòÉ
Convert an OS/2 short integer to a S/370 16-bit integer.
Prototype
VOID EXPENTRY zhpShortToS370Halfword
(
SHORT *xShort ,
CHAR *xHword
)
Parameters
xShort
The pointer to a short integer which contains the number in the 80x86
format.
xHword
The pointer to a 2-byte array which should receive the S/370 16-bit
integer.
result
The 2-byte array whose pointer is passed as the second argument is
filled.
Notes
See Long integer formats and Short integer formats for details about integer
formats.
Array size is not chedked. The caller is responsible for providing an array of
two characters as target memory area.
The input value is not checked. The function assumes the integer is valid and
provided according to the OS/2 80x86 format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.10. zhpSortedToPackedDate ΓòÉΓòÉΓòÉ
Convert a date from the OS/2 Sorted String format to the S/370 Packed format.
Prototype
VOID EXPENTRY zhpSortedToPackedDate
(
CHAR *sorted ,
CHAR *packed
)
Parameters
sorted
The pointer to a null terminated string which contains the date in the
OS/2 Sorted String format. String must be at least 9-byte long.
packed
The pointer to a 4-byte array which should receive the date in the S/370
Packed format.
result
The array whose pointer is passed as the second argument is filled.
Notes
See Date formats and Time formats for details about date and time formats.
String lengths and array sizes are not checked. The caller is responsible for
providing strings and arrays of appropriate size.
The input date is not checked. The function assumes the date is valid and
provided according to the OS/2 Sorted String format.
Known bugs
This function works with dates whose year range is 1000 AD to 2999 AD.
ΓòÉΓòÉΓòÉ 5.1.11. zhpSortedToPackedTime ΓòÉΓòÉΓòÉ
Convert a time from the OS/2 Sorted String format to the S/370 Packed format.
Prototype
VOID EXPENTRY zhpSortedToPackedTime
(
CHAR *sorted ,
CHAR *packed
)
Parameters
sorted
The pointer to a null terminated string which contains the time in the
OS/2 Sorted String format. String must be at least 9-bytes long (see
Notes below).
packed
The pointer to a 4-byte array which should receive the time in the S/370
Packed format.
result
The array whose pointer is passed as the second argument is filled.
Notes
The sorted parameter can only be 7-bytes long. The two trailing blanks are
not requested. However, you cannot use the same string as a target for
zhpPackedToSortedTime(), which requires a 9-byte string as target.
See Date formats and Time formats for details about date and time formats.
String lengths and array sizes are not checked. The caller is responsible for
providing strings and arrays of appropriate size.
The input time is not checked. The function assumes the time is valid and
provided according to the OS/2 Sorted String format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.12. zhpS370HalfwordToShort ΓòÉΓòÉΓòÉ
Convert a S/370 16-bit integer to an OS/2 short integer.
Prototype
VOID EXPENTRY zhpS370HalfwordToShort
(
CHAR *xHword ,
SHORT *xShort
)
Parameters
xHword
The pointer to a 2-byte array which contains the S/370 16-bit integer.
xShort
The pointer to a short integer which should receive the number in the
80x86 format.
result
The short integer whose pointer is passed as the second argument is
filled.
Notes
See Long integer formats and Short integer formats for details about integer
formats.
Array size is not checked. The caller is responsible for providing the S/370
16-bit integer as an array of two characters.
The input value is not checked. The function assumes the integer is valid and
provided according to the S/370 format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.13. zhpS370toIEEEdouble ΓòÉΓòÉΓòÉ
Convert a S/370 double precision floating point number to an OS/2 double
precision IEEE floating point number.
Prototype
VOID EXPENTRY zhpS370toIEEEdouble
(
ULONG *dS370 ,
ULONG *dIEEE
)
Parameters
dS370
The pointer to an array of 2 unsigned long integers which contains the
number in the S/370 format (64-bit).
dIEEE
The pointer to an array of 2 unsigned long integers which should receive
the number in the OS/2 IEEE format (64-bit).
result
The array of unsigned long integers whose pointer is passed as the second
argument is filled.
Notes
See Single precision floating point number formats and Double precision
floating point number formats for details about floating point number
formats.
Array sizes are not checked. The caller is responsible for providing the
64-bit numbers as arrays of two unsigned long integers.
The input value is not checked. The function assumes the number is valid and
provided according to the S/370 format.
Because the S/370 format and the IEEE format are not equivalent, the following
rules apply:
o Magnitudes which underflow during conversion are converted to 0.
o Magnitudes which overflow during conversion are converted to the largest
representable number.
See also Floating Point Numbers for additional considerations.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.14. zhpS370toIEEEfloat ΓòÉΓòÉΓòÉ
Convert a S/370 single precision floating point number to an OS/2 single
precision IEEE floating point number.
Prototype
VOID EXPENTRY zhpS370toIEEEfloat
(
ULONG *fS370 ,
ULONG *fIEEE
)
Parameters
fS370
The pointer to an unsigned long integer which contains the number in the
S/370 format (32-bit).
fIEEE
The pointer to an unsigned long integer which should receive the number
in the OS/2 IEEE format (32-bit).
result
The unsigned long integer whose pointer is passed as the second argument
is filled.
Notes
See Single precision floating point number formats and Double precision
floating point number formats for details about floating point number formats.
The input value is not checked. The function assumes the number is valid and
provided according to the S/370 format.
Because the S/370 format and the IEEE format are not equivalent, the following
rules apply:
o Magnitudes which underflow during conversion are converted to 0.
o Magnitudes which overflow during conversion are converted to the largest
representable number.
See also Floating Point Numbers for additional considerations.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.1.15. zhpS370WordToLong ΓòÉΓòÉΓòÉ
Convert a S/370 32-bit integer to an OS/2 long integer.
Prototype
VOID EXPENTRY zhpS370WordToLong
(
CHAR *xWord ,
LONG *xLong
)
Parameters
xWord
The pointer to a 4-byte array which contains the S/370 32-bit integer.
xLong
The pointer to a long integer which should receive the number in the
80x86 format.
result
The long integer whose pointer is passed as the second argument is
filled.
Notes
See Long integer formats and Short integer formats for details about integer
formats.
Array size is not checked. The caller is responsible for providing the S/370
32-bit integer as an array of four characters.
The input value is not checked. The function assumes the integer is valid and
provided according to the S/370 format.
Known bugs
None.
ΓòÉΓòÉΓòÉ 5.2. Macro sheets ΓòÉΓòÉΓòÉ
This library has no macros.
ΓòÉΓòÉΓòÉ 5.3. Data sheets ΓòÉΓòÉΓòÉ
Select one:
Γûá zLIBVERS
Γûá Signal handling types
Γûá Library constants
Γûá Z Family/2 general constants
ΓòÉΓòÉΓòÉ 5.3.1. zLIBVERS ΓòÉΓòÉΓòÉ
This structure is used by all Z Family/2 DLL's to maintain information about
the level of the library, and the date and time of compilation of library
source code.
Structure
typedef struct zLibVersion
{
USHORT Version ;
USHORT Release ;
USHORT Modification ;
CHAR String[zLEVELSIZE] ;
CHAR Stamp[zSTAMPSIZE] ;
CHAR Name[zNAMESIZE] ;
}
zLIBVERS, *zPLIBVERS ;
Fields
Version
Library version. Updated only when major functional changes are applied
to the library code.
Release
Library release. Updated only when minor functional changes are applied
to the library code.
Modification
Library modification. Updated when fixes are applied to the library
code.
String
A string containing the library level (version plus release). It must
match the values of version and release.
Stamp
A string containing the compilation time stamp. Usually the C Set/2
predefined constant __TIMESTAMP__ is assigned to this field.
Name
A string containing the library name. If the library was cloned with a
different name, and zhpSetLibraryName() was previously called, this
string contains the name of the clone.
Include file
zgeneral.h
Notes
This structure is the same for all the Z Family/2 DLL's.
ΓòÉΓòÉΓòÉ 5.3.2. Signal handling types ΓòÉΓòÉΓòÉ
Two types are used in the signal handling feature of FMZHPFUN.DLL: zSIGHAND
and zSIGNAL.
zSIGHAND is the pointer to a signal handler function that can be used as
argument when zhpRegisterSignal() is called (see Signal handling for details
about how to write a signal handler).
zSIGNAL is the signal event that may be returned by zhpRegisterSignal() if the
registration of the signal handler fails.
Definition
typedef int zSIGNAL ;
typedef void (*zSIGHAND)(int) ;
Signals
This is the list of the possible values whose type is zSIGNAL.
SIGILL
Illegal instruction (invalid function image)
SIGSEGV
Invalid access to memory
SIGFPE
Floating point exception
SIGTERM
OS/2 SIGTERM (killprocess) signal
SIGABRT
Abort() signal
SIGINT
OS/2 SIGINTR signal
SIGUSR1
User exception in range 0xA0000000-0xBFFFFFFF
SIGUSR2
User exception in range 0xC0000000-0xDFFFFFFF
SIGUSR3
User exception in range 0xE0000000-0xFFFFFFFF
SIGBREAK
OS/2 Ctrl-Break sequence
Include file
zgeneral.h
Notes
These types are the same for all the Z Family/2 DLL's.
ΓòÉΓòÉΓòÉ 5.3.3. Library constants ΓòÉΓòÉΓòÉ
The following constants can be used by the applications that are dynamically
linked to FMZHPFUN.DLL.
zhpDLLNAME
The default name of this library. Note that, if you clone this library,
the real name must be changed by using the zhpSetLibraryName() function.
In such a case, you cannot use any more this constant.
zhpZPREFIX
The Z Family/2 identifier of this library.
Include file
zhpdefs.h
Notes
None.
ΓòÉΓòÉΓòÉ 5.3.4. Z Family/2 general constants ΓòÉΓòÉΓòÉ
The following constants are shared by all Z Family/2 DLL's.
zPRODPREF
Z Family/2 three-character product prefix (ZHP).
zPRODNUMB
Z Family/2 product number (5641-504).
zCOPYRIGHT
Z Family/2 copyright statement.
zNAMESIZE
Maximum size of Name string in zLIBVERS.
zLEVELSIZE
Maximum size of Level string in zLIBVERS.
zSTAMPSIZE
Maximum size of Stamp string in zLIBVERS.
zNULLERRORID
Null error identifier. To be used when the error identifier can be
ignored by the called function.
zEXEMINERRID
Minimum value of error identifiers for user applications.
zEXEMAXERRID
Maximum value of error identifiers for user applications.
zDLLMINERRID
Minimum value of error identifiers for the Z Family/2 DLL's.
zDLLMAXERRID
Maximum value of error identifiers for the Z Family/2 DLL's.
zSIGNAL
Z Family/2 signal type for signal handling.
zSIGHAND
Z Family/2 signal handler type for signal handling.
zBIT
Z Family/2 type used for unsigned bits.
Include file
zgeneral.h
Notes
Error identifiers are used to identify both the error itself, and the message
associated with it.
ΓòÉΓòÉΓòÉ 6. Sample Program ΓòÉΓòÉΓòÉ
Select one:
Running the sample program
Sample program tutorial
ΓòÉΓòÉΓòÉ 6.1. Running the sample program ΓòÉΓòÉΓòÉ
Important
To run the sample program, you must already have installed the library as
described in How to install the library.
Do not double-click on the item below unless
1. you copied the sample program to a directory listed in your PATH, or added
the directory where the sample program is to your PATH.
2. you copied all the needed dynamic libraries to a directory listed in your
LIBPATH, or added the directory where such libraries are to your LIBPATH.
Hit me to run the sample
ΓòÉΓòÉΓòÉ 6.2. Sample program tutorial ΓòÉΓòÉΓòÉ
The FMZHPFUN.DLL package also contains a sample program that shows how to use
the DLL functions.
The program is called PCHOST and can be launched either from an OS/2 window
(or full-screen), or from the OS/2 Desktop, double-clicking on its icon.
When the program is executed, a small windows appear on the screen.
PCHOST window has only a single pull-down menu, called Convert. If you open
that menu you can see four items:
PC to Host...
To this item is linked a submenu with five items:
Dates To convert dates from PC format to S/370 one.
Times To convert times from PC format to S/370 one.
Integers To convert integers from PC format to S/370 one.
Single float To convert single precision floating point numbers
from PC format to S/370 one.
Double float To convert double precision floating point numbers
from PC format to S/370 one.
Host to PC...
To this item is linked a submenu with five items:
Dates To convert dates from S/370 format to PC one.
Times To convert times from S/370 format to PC one.
Integers To convert integers from S/370 format to PC one.
Single float To convert single precision floating point numbers
from S/370 format to PC one.
Double float To convert double precision floating point numbers
from S/370 format to PC one.
About
A message box containing the name of the library, its version, the
author and some other related information (eg. copyright) is displayed.
The first two fields are obtained by the zhpLibraryVersion() function.
Exit
The user is prompted for the confirmation of the EXIT request.
Program ends.