× 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.



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 06/14/2018 06:44:44
PM:
On 2018-06-14 9:45 AM, dlclark@xxxxxxxxxxxxxxxx
wrote:
I call it "tricking" the compiler because using a prefix with
a
period in it creates a qualified variable that is not actually
qualified
in the resulting I-specs. Thus, the compiler ends up generating the
same
storage addresses for his separate data structure where the variables
*are* qualified.

The variables _are_ qualified in the resulting I-specs. So the I specs
refer to the actual qualified data structure. You do have to define the
qualified data structure, though.


OK, I understand. But, from the perspective of the next
programmer coming along, it is "tricking" the compiler because it is not
clear/obvious what is going on -- because it is not usual to use a prefix
with a period in it. Because, usually, the resulting I-specs are not
actually qualified. Here is my compile listing to demonstrate what I am
saying.


4 dcl-f MyFile disk extfile(*extdesc) prefix('CHE.')
5 extdesc('SHR460/IMLFCMPT');
*---------------------------------------------------------------
* RPG name External name
* File name. . . . . . . . . : MYFILE SHR460/IMLFCMPT
* Record format(s) . . . . . : IMLFCMPRF IMLFCMPRF
*---------------------------------------------------------------
6
7=IIMLFCMPRF
*---------------------------------------------------------------
* RPG record format . . . . : IMLFCMPRF
* Prefix . . . . . . . . . . : CHE. : 0
* External format . . . . . : IMLFCMPRF : SHR460/IMLFCMPT
*---------------------------------------------------------------
8=I I 1 8 0CHE.IMLFCMPTID
9=I I 9 16 0CHE.CICOMPPTID
10=I I 17 24 0CHE.IMLFSEQTID
11=I (ALWNULL) P 25 31 2CHE.BOYEXTTTL
12=I (ALWNULL) P 32 38 2CHE.YTDEXTTTL
13=I (ALWNULL) P 39 42 4CHE.EXTIDX
14=I (ALWNULL) P 43 46 4CHE.ABSRTO
15=I (ALWNULL) Z 47 72 CHE.TMSLSTEXT
16=I (ALWNULL) Z 73 98 CHE.TMSLSTLRL
17=I (ALWNULL) Z 99 124 CHE.TMSLCLCMP
18=I (ALWNULL) Z 125 150 CHE.TMSCRPACT
19=I *VAR A 151 170 CHE.ADDBYUSR
20=I (ALWNULL) *VAR A 171 182 CHE.ADDBYPGM
21=I Z 183 208 CHE.ADDTS
22=I *VAR A 209 228 CHE.CHGBYUSR
23=I (ALWNULL) *VAR A 229 240 CHE.CHGBYPGM
24=I Z 241 266 CHE.CHGTS
25=I (ALWNULL) A 267 267 CHE.LIFOYN


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.