×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Thanks Charles and everybody else that suggested data structure field names. Its allot more readable code.

Andy
----- Original Message ----- From: "Wilt, Charles" <CWilt@xxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, June 24, 2005 9:10 AM
Subject: RE: RPG Free Format question


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of HauserSSS
Sent: Friday, June 24, 2005 7:25 AM
To: RPG programming on the AS400 / iSeries
Subject: AW: RPG Free Format question


Hi Andy,

I'd prefer data structure subfields.

d gDisplayFileControl...
d                 ds                  qualified
d  FunctionKeys                1   24A
d     exit                           n   overlay(FunctionKeys : 3)
d     printList                      n   overlay(FunctionKeys : 5)
d     cancel                         n   overlay(FunctionKeys : 12)
d  PageUpDown                       2A
overlay(gDisplayFileControl : 25)
d     pagedown                       n
overlay(gDisplayFileControl : 25)
d     pageup                         n
overlay(gDisplayFileControl : 26)
d  ReverseImage                    10A
overlay(gDisplayFileControl : 51)
d     RI_Field1                      n
overlay(gDisplayFileControl : 51)
d     RI_Field2                      n
overlay(gDisplayFileControl : 52)
d     RI_Field3                      n
overlay(gDisplayFileControl : 53)
d     RI_Field4                      n
overlay(gDisplayFileControl : 54)
d     RI_Field5                      n
overlay(gDisplayFileControl : 55)
d     RI_Field6                      n
overlay(gDisplayFileControl : 56)
d     RI_Field7                      n
overlay(gDisplayFileControl : 57)
d     RI_Field8                      n
overlay(gDisplayFileControl : 58)
d     RI_Field9                      n
overlay(gDisplayFileControl : 59)
d     RI_Field10                     n
overlay(gDisplayFileControl : 60)

 /Free
   Functionkeys = *Off;
   PageUpDown   = *Off;
   ReverseImage = *On;
 /End-Free


Sweet, I figure this could be done, but I hadn't yet needed to try it out.

I believe however, that you do need to qualify those names correct?

/Free
  gDisplayFileControl.Functionkeys = *Off;
  gDisplayFileControl.PageUpDown   = *Off;
  gDisplayFileControl.ReverseImage = *On;
/End-Free

Also, I don't like the differences between the way FunctionKeys and PageUpDown/ReverseImage is defined.

I like the looks of this better:

d gDisplayFileControl...
d                 ds                  qualified
d  FunctionKeys                    24A   overlay(gDisplayFileControl : 1)
d exit n overlay(gDisplayFileControl : 3) d printList n overlay(gDisplayFileControl : 5) d cancel n overlay(gDisplayFileControl : 12)
d  PageUpDown                       2A   overlay(gDisplayFileControl : 25)
d pagedown n overlay(gDisplayFileControl : 25) d pageup n overlay(gDisplayFileControl : 26)
d  ReverseImage                    10A   overlay(gDisplayFileControl : 51)
d RI_Field1 n overlay(gDisplayFileControl : 51) d RI_Field2 n overlay(gDisplayFileControl : 52) d RI_Field3 n overlay(gDisplayFileControl : 53) d RI_Field4 n overlay(gDisplayFileControl : 54) d RI_Field5 n overlay(gDisplayFileControl : 55) d RI_Field6 n overlay(gDisplayFileControl : 56) d RI_Field7 n overlay(gDisplayFileControl : 57) d RI_Field8 n overlay(gDisplayFileControl : 58) d RI_Field9 n overlay(gDisplayFileControl : 59) d RI_Field10 n overlay(gDisplayFileControl : 60)

What does everybody think?  Any other Improvements?

Any way to clean it up, say defining the grouping fields implictly instead of explicitly? I thought there might be, but as I looked at it I decided that it wasn't.

Charles Wilt
--
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.