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





----

RE:     RPG400 SDA query?

>Hi all,
>I am building a AS400 SDA screen and on this screen I am going to have
>an array (6 elements / 30 characters each) displayed.  Well wanting to
>take advantage of the EXFMT opcode to write my screen, I am not able to
>give any of my SDA screen fields names like this -- QN,1 or QN,2.. I
>have a hard time believing that I must still do a MOVE of the array
>elements into the hard named screen names like this:
>MOVE  QN,1   QN001
>MOVE  QN,2   QN002
>Etc....
>Any suggestions to this former S36'er appreciated.
>: Tim & Dana Truax :



Tim 
I'm glad you asked that.   In RPG III we used to just make a D/S
and hard code the From & To positions of each field (QN001,QN002,etc) 
and then "Overlayed" the data structure with an array defined something 
like this;


E             ARRAY    3    3
I*
I    DS    
I       1   3 QN001
I       4   6 QN002
I       7   9 QN003
I       1   9 ARRAY  

With this definition,  you can manipulate it as a field, structure, 
Array, or Array elements.

In RPGIV  we would.... LIKE TO DO THIS!!!!!!!!!.

D STRUC     DS
D                   QN001
D                   QN002
D                   QN003
D                3  ARRAY        DIM(3) OVERLAY(STRUC)

But they have not given us the ability to overlay at the D/S level yet.
sooooo, in this example you would have to define the array like this;

D          1    9    ARRAY       DIM(3)

Hard coding(Jon, Hans, George)  the from & To of the array definition.  

ooooooooooooooooooooooooorrrrrrrrrrrrrrr.

Use pointers & based variables.

John Carr
EdgeTech
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.