HP 3000 Manuals

SORT-MERGE/XL Programmer's Guide : COPYRIGHT NOTICE [ SORT-MERGE/XL Programmer's Guide ] MPE/iX 5.0 Documentation


SORT-MERGE/XL Programmer's Guide


Product 900 Series HP 3000 Computer Systems SORT-MERGE/XL Programmer's Guide HP Part No. 32650-90080 Printed in U.S.A. Printed Oct 1989 Edition Second Edition E1089
________________________________________________________________________ |The information contained in this document is subject to change | |without notice. | | | |HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS | |MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard | |shall not be liable for errors contained herein or use of this | |material. | | | |Hewlett-Packard assumes no responsibility for the use or reliability | |of its software on equipment that is not furnished by Hewlett-Packard.| | | |This document contains proprietary information which is protected by | |copyright. All rights are reserved. No part of this document may be | |photocopied, reproduced, or translated to another language without the| |prior written consent of Hewlett-Packard Company. | ________________________________________________________________________ Copyright Æ 1989 by Hewlett-Packard Company Print History The following table lists the printings of this document, together with the respective release dates for each edition. The software version indicates the version of the software product at the time this document was issued. Many product releases do not require changes to the document. Therefore, do not expect a one-to-one correspondence between product releases and document editions. Edition Date Software Version --------------------------------------------------------------------------------------- First Edition November 1987 A.01.00 Update 1 July 1988 A.10.00 Second Edition October 1989 A.30.00 Documentation Map
[]
[]
Preface SORT-MERGE/XL Programmer's Guide (322650-90080) is intended for use by experienced programmers who are developing applications that require sorting or merging operations. This Programmer's Series manual explains how to use the SORT-MERGE/XL subsystem and related intrinsics. This manual assumes knowledge of general programming and MPE concepts, but little or no experience with the HPSORT or HPMERGE intrinsics. For current specific information about the intrinsics, the MPE XL Intrinsics Manual (32650-90028). Chapter 1, Introduction, offers an overview of the sorting and merging process, with flow charts. Chapter 2, Creating Core Routines that Sort and Merge, traces the development of Pascal routines that do a simple sort and a simple merge operation. First the example routines are presented step by step with descriptions of the development. The entire examples are presented at the end of the chapter. Chapter 3, Input and Output by Record, presents examples of a simple sort operation that uses the option of input by record, and a simple merge operation that uses the option of output by record. A Pascal example is also included in this chapter. Chapter 4, Altering the Collating Sequence, presents an example of using an optional, or alternate, collating sequence. A Pascal example is also included in this chapter. Chapter 4, Getting SORT-MERGE/XL Information, tells you how to get status information about a completed sorting or merging operation, and how to get title and version information at any point in your sorting or merging program. Appendix A, HPSORT Intrinsic Status Returns, and Appendix B, HPMERGE Intrinsic Status Returns, list the error number, message, cause, and user corrective action for status returns from the HPSORT and HPMERGE intrinsics. Appendix C, ASCII/EBCDIC Table, shows the ASCII and EBCDIC character code values, along with their decimal, octal, and hexadecimal equivalents. Appendix D, FORTRAN Program Examples, gives five FORTRAN programs equivalent to the five Pascal sorting and merging programs used as examples in Chapters 2, 3, and 4. Appendix E, Data Types, gives tables that show the generic data types used in SORT-MERGE/XL, and their equivalents in HP Business BASIC/XL, HP C/XL, HP COBOL II/XL, HP FORTRAN 77/XL, and HP Pascal/XL. Conventions UPPERCASE In a syntax statement, commands and keywords are shown in uppercase characters. The characters must be entered in the order shown; however, you can enter the characters in either uppercase or lowercase. For example: COMMAND can be entered as any of the following: command Command COMMAND It cannot, however, be entered as: comm com_mand comamnd italics In a syntax statement or an example, a word in italics represents a parameter or argument that you must replace with the actual value. In the following example, you must replace filename with the name of the file: COMMAND filename bold italics In a syntax statement, a word in bold italics represents a parameter that you must replace with the actual value. In the following example, you must replace filename with the name of the file: COMMAND(filename) punctuation In a syntax statement, punctuation characters (other than brackets, braces, vertical bars, and ellipses) must be entered exactly as shown. In the following example, the parentheses and colon must be entered: (filename):(filename) underlining Within an example that contains interactive dialog, user input and user responses to prompts are indicated by underlining. In the following example, yes is the user's response to the prompt: Do you want to continue? >> yes { } In a syntax statement, braces enclose required elements. When several elements are stacked within braces, you must select one. In the following example, you must select either ON or OFF: {ON } COMMAND {OFF} Conventions (continued) [ ] In a syntax statement, brackets enclose optional elements. In the following example, OPTION can be omitted: COMMAND filename [OPTION] When several elements are stacked within brackets, you can select one or none of the elements. In the following example, you can select OPTION or parameter or neither. The elements cannot be repeated. [OPTION ] COMMAND filename [parameter] [...] In a syntax statement, horizontal ellipses enclosed in brackets indicate that you can repeatedly select the element(s) that appear within the immediately preceding pair of brackets or braces. In the example below, you can select parameter zero or more times. Each instance of parameter must be preceded by a comma: [,parameter][...] In the example below, you only use the comma as a delimiter if parameter is repeated; no comma is used before the first occurrence of parameter: [parameter][,...] |...| In a syntax statement, horizontal ellipses enclosed in vertical bars indicate that you can select more than one element within the immediately preceding pair of brackets or braces. However, each particular element can only be selected once. In the following example, you must select A, AB, BA, or B. The elements cannot be repeated. {A} {B} |...| ... In an example, horizontal or vertical ellipses indicate where portions of an example have been omitted. Å In a syntax statement, the space symbol Å shows a required blank. In the following example, parameter and parameter must be separated with a blank: (parameter)Å(parameter) The symbol indicates a key on the keyboard. For example, RETURN represents the carriage return key or Shift represents the shift key. CTRLcharacter CTRLcharacter indicates a control character. For example, CTRLY means that you press the control key and the Y key simultaneously. Conventions (continued) base prefixes The prefixes %, #, and $ specify the numerical base of the value that follows: %num specifies an octal number. #num specifies a decimal number. $num specifies a hexadecimal number. If no base is specified, decimal is assumed. bits (bit:length) When a parameter contains more than one piece of data within its bit field, the different data fields are described in the format bits (bit:length), where bit is the first bit in the field and length is the number of consecutive bits in the field. For example, bits (13:3) indicates bits 13, 14, and 15: most significant least significant |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--| | 0| | | | | | | | | | | | |13|14|15| |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--| bits (0:1) bits (13:3)


MPE/iX 5.0 Documentation