× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Barbara Morris said the following on 1/26/2005 12:32 PM:
Tom Hightower wrote:

Customer has a patient records database.  One of the fields is called
"PAGE" (Patient Age).

Since "PAGE" is a reserved-field in RPG, I'm having a bit of trouble.
I've tried prefixing, and renaming the field in I-specs, but neither of
those techniques helped.



Tom, both I-spec renaming and PREFIX work for me.  Did you still get
compiler errors using those, or did it cause some other problem?


Sorry it's taken so long to respond.

I get a compiler error with this program:

fpatmst    if   e           k disk    prefix('PATIENT.')
dpatient        e ds                  extname(patmst) qualified
 /free
   read(e) patmst patient;
   if not %error() and not %eof();
     dow not %eof();
       dsply patient.page;
       read(e) patmst patient;
     enddo;
   endif;
   *inlr = *on;
 /end-free


Here's the DDS for the file:

      A****************************************************************
      A*    PATIENT MASTER FILE
      A                                      UNIQUE
      A          R PATMSTR                   TEXT('PATIENT MASTER')
      A            PATNUM         9
      A            PAGE           3  0
      A            FNAME         20
      A            LNAME         30
      A*
      A          K PATNUM
 ****************** End of data ****************************************

Here's the compile listing:

S o u r c e L i s t i n g

1 fpatmst if e k disk prefix('PATIENT.')

2


*---------------------------------------------------------------------
* RPG name External name


* File name. . . . . . . . . : PATMST TOM/PATMST

* Record format(s) . . . . . : PATMSTR PATMSTR


*---------------------------------------------------------------------
3 dpatient e ds extname(patmst) qualified


4

5 /free


*---------------------------------------------------------------------
* Data structure . . . . . . : PATIENT


* External format . . . . . : PATMSTR : TOM/PATMST

* Format text . . . . . . . : PATIENT MASTER


*---------------------------------------------------------------------
6=D PATNUM 9A


7=D PAGE 3P 0

8=D FNAME 20A

9=D LNAME 30A

10=IPATMSTR


*---------------------------------------------------------------------
* RPG record format . . . . : PATMSTR


* Prefix . . . . . . . . . . : PATIENT. : 0

* External format . . . . . : PATMSTR : TOM/PATMST

* Format text . . . . . . . : PATIENT MASTER


*---------------------------------------------------------------------
11=I A 1 9 PATIENT.PATNUM


12=I P 10 11 0PATIENT.PAGE

Compilation stopped. Internal failure occurred. Error code is 1.

* * * * * E N D O F C O M P I L A T I O N * * * * *


Tom


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.