HP RPG/XL Programmer's Guide : COPYRIGHT NOTICE [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation
HP RPG/XL Programmer's Guide
Product 900 Series HP 3000 Computers
HP RPG/XL Programmer's Guide
Printed in U.S.A.
HP Part No. 30318-90001
Edition E1288
Printed Dec 1988
Notice
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
MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard
shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing, performance, 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 into another language without the
prior written consent of Hewlett-Packard Company.
Æ Copyright 1988, Hewlett-Packard Company.
Printing History
New editions are complete revisions of the manual. Update packages,
which are issued between editions, contain additional and replacement
pages to be merged into the manual by the customer. The dates on the
title page change only when a new edition or a new update is published.
No information is incorporated into a reprinting unless it appears as a
prior update; the edition does not change when an update is incorporated.
The software code printed alongside the data indicates the version level
of the software product at the time the manual or update was issued.
Many product updates and fixes do not require manual changes and,
conversely, manual corrections may be done without accompanying product
changes. Therefore, do not expect a one to one correspondence between
product updates and manual updates.
First Edition December 1988 30318A.00.00
Preface
The HP RPG/XL Programmer's Guide explains how to perform many of the
common programming functions in RPG. It does not include an exhaustive
discussion of these tasks, but covers the commonly-used ones and the ones
that use features unique to Hewlett-Packard computers.
This manual is directed to experienced RPG programmers, who may or may
not be familiar with Hewlett-Packard computers. The manual discusses the
language features available with the MPE XL operating system.
This manual is organized as follows:
Chapter 1 Discusses the HP RPG logic cycle.
Chapter 2 Tells you how to enter an RPG program at the terminal.
Chapter 3 Explains how to use disc files in RPG programs.
Chapter 4 Explains how to use the terminal in RPG programs.
Chapter 5 Discusses tables, arrays, data structures and
subroutines.
Chapter 6 Explains how to compile an RPG program and how to enter
compiler options. It also explains the compiler
listings.
Chapter 7 Explains how to execute and debug an RPG program.
Chapter 8 Tells how RPG programs can exchange information and use
operating system facilities such as intrinsics.
Chapter 9 Gives tips on writing efficient RPG programs.
Appendix A Gives instructions on converting IBM RPG programs to the
HP 3000. It also explains how to migrate RPG programs
from the (HP) MPE V operating system to MPE XL.
Related Documentation
Refer to the following documents for further information on features
available in the RPG programming language:
HP RPG/XL Reference Manual (30318-90003) - This manual includes a
complete discussion of the language elements of RPG.
RPG Utilities Reference Manual (32104-90006) - This manual explains how
to use these RPG utilities: XSORT, RISE, SIGEDITOR and RPGINIT.
Data Entry and Forms Management System VPLUS/3000 (32209-90001) - This
manual includes a complete discussion about the screen management
software product, VPLUS. You can use this product within RPG programs
when using a terminal.
EDIT/3000 Reference Manual (03000-90012) - This manual explains how to
use the text processor software product, EDITOR. KSAM/3000 Reference
Manual (30000-90079) - This manual explains how to use KSAM disc files
and how to access them.
KSAM/3000 Reference Manual (30000-90079) - This manual explains how to
use KSAM disc files and how to access them.
TurboIMAGE/XL Database Management System (30391-90001) - This manual
discusses the TurboIMAGE database software product.
MPE XL Intrinsics Reference Manual (32650-90028) - This manual discusses
the operating system routines that can be used by external subroutines in
an RPG program.
Native Language Programmer's Guide (32650-90022) - This manual discusses
how to create and use Native Language Support message files.
Message Catalogs Programmer's Guide (32650-90021) - This manual discusses
how to create and use non-Native Language Support message files.
FCOPY Reference Manual (03000-90064) - This manual explains how to use
the FCOPY file utility.
SORT-MERGE/XL Programmer's Guide (32650-90080) - This manual explains how
to use the SORT/MERGE file utility.
Accessing Files Programmer's Guide (32650-90017) - This manual discusses
the ways MPE XL files can be processed.
MPE XL General User's Reference Manual (32650-90002) - This manual
discusses file, group and account structures.
MPE XL Commands Reference Manual (32650-90003) - This manual describes
all of the MPE XL commands including FILE.
Example Conventions
Throughout this manual, examples of RPG program code are shown using
figures similar to the one below. The first two lines are a ruler to
help you quickly see the column positions for the code. The shaded
numbers on the left are not sequence numbers. Rather, they are used as
reference numbers for the comments which follow the figure. Lines are
referenced only to highlight specific concepts. Additionally, some
examples show lines containing dots only. Dots indicate that, to clarify
examples, code has been omitted.
Figure 5-16. Using RLABL to Pass Information to an External Subroutine
Comments
1 This line makes indicator 20 available to an external
subroutine.
Columns 43-48 specifies that indicator 20 is passed to the
external subroutine. (Prefix indicator names by IN.)
2 This line makes the field, PNAME, available to an external
subroutine.
3 This line executes the external subroutine, SUB01.
MPE/iX 5.0 Documentation