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



Hi Kurt,

DS group field names were introduced way back (as mentioned before, I saw
this in a Jon Paris/Susan Gantner article from Feb 2003) and the
definition is derived from its subfields. Each group in this case is 30A
because there are five subfields that are each 6,5.

The advantage which I'm using them for is they can be a target of an
overlay for my arrays, whereas a subfield can't.

I've rearranged the fields so they are neatly in groups and are also
neatly placed into the appropriate arrays.

Thanks everyone for your replies. I really appreciate it.
I love the code examples that people post. Learning never stops.

Cheers,

Glenn


Subject: RE: DS Group Field Names
From: "Anderson, Kurt" <KAnderson@xxxxxxxxxxxx>
Date: Wed, March 12, 2014 3:06 pm
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>


My impressions is that in Glenn's case "overchargesLevel1" is not coming
from a file, only the other subfields that make up that field are. But if
you're in agreement with that, it seems odd that "overchargesLevel1" can
be defined by the compiler only if the definition of the other subfields
comes from a file vs being explicitly defined. Though I don't really ever
see myself using this - I am a -huge- fan of qualified files and reading
into data structures (vs a read implicitly loading a data structure).

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery
Platform

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Barbara Morris
Sent: Wednesday, March 12, 2014 2:45 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: DS Group Field Names

On 2014-03-11 17:32, Anderson, Kurt wrote:
Hi Glenn,

Only way to get the long names to work (from my test) was to give those
long names a definition. I also tried freeform (I know you're on v6.1,
but I wasn't sure if you could PTF the freeform back or not), but I'm
definitely no pro in fully freeform RPG code yet. I was having issues
getting the overChargesLevel1 & 2 lines to autodefine.

Since I don't have the files the fields are based on, I just gave them
an arbitrary definition.
dcl-ds overChargesMultiMeter;
overChargesLevel1;
y1vrp1 Length(5) Overlay(overchargesLevel1);
y2vrp1 Length(5) Overlay(overchargesLevel1: *next);

Hi Kurt, you don't have to specify data-type information for free-form
subfields if the subfield's definition comes from a file.

dcl-ds overChargesMultiMeter;
overChargesLevel1;
y1vrp1 Overlay(overchargesLevel1);
y2vrp1 Overlay(overchargesLevel1: *next);
...
--
Barbara

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