RSC/MP 7.2 Programming Manual
Application Development
HP NonStop Remote Server Call (RSC/MP) Programming Manual—522360-004
6-3
Formatting and Converting Data
Formatting and Converting Data
The integer byte order for data on NonStop systems does not always match the byte
order of data on workstations. Figure 6-1 shows the byte order of the integers on the
NonStop host and on PC workstations.
RSC/MP provides these API functions to swap integer data between workstation and
host formats:
•
The RscSwapShort function converts 2-byte data.
•
The RscSwapLong function converts 4-byte data.
For UNIX workstations that have the same data format as the NonStop host, these API
functions do not change the data.
RSC/MP does not support these types of data conversion; applications must convert
these data types before calling RSC/MP:
•
COBOL string to C language string — Trailing spaces versus terminating NULL.
•
Floating point — NonStop system format versus IEEE format.
•
Data alignment within structures.
•
Ranges of values — C language signed integer up to 32767 and COBOL “PIC
S9(4) COMP” up to 9999.
•
National language support — 7-bit substitution.
See Appendix B, Language Conversion for RSC/MP Function Calls, for more
information about syntax equivalents.
Figure 6-1. Integer Byte Order
AB
ABD C
A B
A B DC
NonStop Host IBM-compatible PC
CDT007