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



In this case, when passing a structure of SQL results I do this:

D sqlResult             DS                      Occurs(100)
D  field1...

D resultsTable  DS                      Qualified
D  count                        10I 0
D  data                                 LikeDs(sqlResult)
D                                               Dim(100)  // Same as occurs
option


/Free
...
  resultsTable.Count = SQlER3;
  cpyBytes(%Addr(resultsTabel.Data : 
           %Addr(sqlResult) : 
           %Size(sqlResult) * resultsTable.Count);      
...     

  Return resultsTable;
...


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Jeff Young
Sent: Wednesday, March 15, 2006 7:52 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Passing Multi Occurance DS as parm btw modules


Roger,
  I am doing a multiple row SQL FETCH in the second module, and the only
thing it will accept is a MODS.
  I do not think it will accept a MODS with the BASED keyword, but I will
check.
   
  Thanks,
  

"Mackie, Roger L. (Precision Press)" <RLMackie@xxxxxxxxxxxxx> wrote:
  Jeff,

You can pass the pointer to a MODS in one module and base an identical
MODS in the other module on that pointer. I had to do that once and it
works well. However, As Scott pointed out before, it is much easier to
pass DS arrays if your code does not need to be compatible with earlier
releases.

Roger Mackie

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Tuesday, March 14, 2006 2:33 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Passing Multi Occurance DS as parm btw modules

Scott,
Typo on Occur. S/B Occurs.

Occurs is not allowed on a prototype parm. How do I define it then?



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.