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



Thanks Hans 

"functionality is new to V5R2" that gets me because I'm v5r1. Oh well I'll 
just wait.

Thanks 
Bill Hopkins





Hans Boldt <boldt@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/20/2003 09:24 AM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     rpg400-l@xxxxxxxxxxxx
        cc: 
        Subject:        Re: How to do qualified?


Bill Hopkins wrote:
> Barbara and/or list,
> 
> You stated:
> 
>>Your character field with a number in it is sort of a data structure
>>with one zoned subfield.  If you define it that way, dealing with the
>>numeric part is easy.
>>
>>D CHAR1        DS           qualified
>>D   numval            5s 0
>>
>>         CHAR1.numval = CHAR1.numval + NUM1
> 
> 
> Which I understand, but have never had a chance to use. Could you give 
an 
> example of how I could applied that to this?
> Tried to:
> 
> D FXQS(Z)      DS           qualified
> D   WQTYN             15S 0 
> 
> But it did not like array for DS. Am I just tired from working till A.M. 

> last night?Or am I just missing something?
> ...

In other words, you want to code an "array data structure", right? 
The syntax for that is:

D FXQS         DS           qualified DIM(10)
D   WQTYN             15S 0

and subfields of the DS can then be referred to like 
"FXQS(X).WQTYN". But such functionality is new to V5R2. An "array 
data structure" is sort of like a "multiple-occurrence data 
structure", but the index must be explicitly coded, and the DS must 
be a qualified DS.

BTW, another of the V5R2 changes is that you can define a subfield 
of a qualified data structure with keyword LIKEDS. That is, 
subfields themselves can also be data structures or even array data 
structures! Coding nested array data structures within array data 
structures gives you the ability to code something that looks just 
like multi-dimensional arrays.

Cheers!


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


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.