× 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 Jon
We will shortly be getting V5R3 and I was wondering how you would code this 
with data structure arrays. Just preparing for the future !

-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la 
part de rpg400-l-request@xxxxxxxxxxxx
Envoyé : mercredi 6 juillet 2005 19:01
À : rpg400-l@xxxxxxxxxxxx
Objet : RPG400-L Digest, Vol 4, Issue 783

Send RPG400-L mailing list submissions to
        rpg400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.midrange.com/mailman/listinfo/rpg400-l
or, via email, send a message with subject or body 'help' to
        rpg400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
        rpg400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of RPG400-L digest..."


Today's Topics:

   1. RE: Multi Occurrence Data Structure returned from a procedure
      (Jon Paris)
   2. Re: Regarding DDM file & STRISDB (Shijith_Chand)


----------------------------------------------------------------------

message: 1
date: Wed, 6 Jul 2005 12:50:58 -0400
from: "Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx>
subject: RE: Multi Occurrence Data Structure returned from a procedure

 >> After reading your reply , would you please give me a example of using
LIKEDS as I may be able to improve on what I have done.

Gladly Paul, but I don't regard it as an improvement.

MODS are a legacy concept and for the most part better off ignored in my
opinion.  I was only using one because I was writing a sample program that
will later be converted to be an SQL stored procedure.  Since DS Arrays are
not handled as return values by SQL until V5R3 (and I am running on a V5R2
system) I had to use a MODS when I would have preferred a DS Array.  Clear
as mud right!

Anyway - for those who want it ....

This is the code in the caller:

     D ReturnDS        PR                  ExtPgm('RETURNDS')
     D  CatCode                       2A
     D  RowCount                      5S 0
     D  OutDS                              LikeDS(ReturnDta)

     D ReturnDta       DS                  Occurs(99)
     D  ProductCode                   7A
     D  TotalCost                    12S 2
     D  TotalValue                   12S 2
     D  TotalMargin                  12S 2

      /FREE

       %Occur(ReturnDta) = 1;           // Ensure first element's address is
passed

       ReturnDS( CATCD : ROWS: ReturnDta);

And this is the bit in the called program:

     D ReturnDta       DS                  Based(pOutDS) Occurs(99)
     D  ProductCode                        Like(ProdCd)
     D  TotalCost                    12S 2
     D  TotalValue                   12S 2
     D  TotalMargin                  12S 2

      /FREE

       pOutDS = %Addr(OutDS);           // Map ReturnDta to the caller's
MODS

Hope this helps.

Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com



------------------------------

message: 2
date: Wed, 6 Jul 2005 22:19:40 +0530
from: "Shijith_Chand" <Shijith_Chand@xxxxxxxxxx>
subject: Re: Regarding DDM file & STRISDB

Hi Rob,

          Infact I did not try this out in production as I thought

          this might not be the right realm for experimentation,

          So I thought I will get some expert opinion before I try

          Something adventurous.

             Most of these objects are compiled by some developer

          at the time of checkin and I am really not sure what option

          they have given while compiling. Now re-creating them in the

          Production involves RED TAPE (approval from different pple)

          Anyway thanks for your inputs.

Regards,

S.chand

 

          

      

 

 

 

          

            

            

       

 

 

message: 3

date: Wed, 6 Jul 2005 09:39:31 -0500

from: rob@xxxxxxxxx

subject: Re: Regarding DDM file & STRISDB

 

The name of the DDM file.  Did you try that, and have a problem with it?
I 

know that SQL doesn't like DDM.  Are you saying that STRISDB doesn't
like 

DDM?  Or haven't you tried it?

 

An alternative is to CRTRPGPGM OPTION(*SRCDBG) or OPTION(*LSTDBG).  Read


the help on it.  With that, you shouldn't need access to the actual
source 

to debug.  You could use the command STRDBG OPMSRC(*YES) to debug
instead 

of STRISDB.  Slightly different, but as you move from archaic RPG to
RPGLE 

you'll either go the STRDBG route or use the GUI debugger available with


CODE/400 or WDSc.

 

Rob Berendt


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.