Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
SORT-MERGE/XL Programmer's Guide: 900 Series HP 3000 Computer Systems > Chapter 3 Input and Output by Record

Record Output

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Record output is useful when you want to create temporary output of a set of sorted or merged data, to create a subset of the sorted or merged information, or to alter the records before outputting them.

To output from SORT-MERGE/XL by record, use either the HPSORTOUTPUT or HPMERGEOUTPUTintrinsic. The syntax is:

   HPSORTOUTPUT (status, buffer, length);

HPMERGEOUTPUT (status, buffer, length);

The buffer parameter contains the record to be input.

NOTE: The buffer parameter is a character (byte) array. If your record contains other data types, you must reconstruct them from buffer.

The length parameter returns the length of the record. After the last record is reached, length returns a value of negative one (-1).

If you use record output, do not specify the outputfile parameter in HPSORTINIT or HPMERGEINIT. Use the intrinsic ASCII if you have specified outputoption in HPSORTINIT to be binary format, but you want displayable ASCII characters instead.

An example follows:

   var
status : INTEGER;
buffer : packed array [1..80] of CHAR;
length : SHORTINT;
.
.
.
HPSORTOUTPUT (status, buffer, length);
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.