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



At 03:21 PM 9/9/97 -0400, you wrote:
>Hi All,
>I am from the S36 world and am now working with the AS400.  One very
>frustrating thing is the DDE's that I get from time to time.  Please
>look at the following:
>
>I have a program that gets called from other programs-
>C***************************************************************** 
>C* MAINLINE CALCULATION AREA.                                    * 
>C***************************************************************** 
>C           *ENTRY    PLIST                                        
>C                     PARM           X$YYYY  40      <--4 pos/0dec      
>C                     PARM           X$MM    20                    
>C                     PARM           X$DD    20                    
>C                     PARM           @D1RT   1                     
>C                     PARM           @D1TP   1                     
>C                     PARM           @D1N#   30                    
>C                     PARM           Y$YYYY  40                    
>C                     PARM           Y$MM    20                    
>C                     PARM           Y$DD    20                    
>C                     PARM           @D1NM   3                     
>C*   
>
>I am getting a DDE on this line-
>
>C* PLACE THE YYYY INTO HDYTST.                                     
>C                     MOVELX$YYYY    HDYTST  80    <--DDE happening
>here!

Hi, Tim

It looks like the program calling the RPG is passing blanks or some
indeterminate value. To see what's coming in (you need to be on v3r7 or
higher for this), compile the RPG with CRTRPGPGM ... OPTION(*SRCDBG). Then
use STRDBG ... OPMSRC(*YES). This will fire up the ILE source-level
debugger, which I've found to be more reliable and stable than STRISDB.
When the source displays, either take F10 or set a breakpoint and take F12.
Then call whatever calls this program. Using F10 results in the execution
stopping at the first executable statement, whatever it is. It may even be
in the PLIST. Then you can see what the parms are. You'll want to display
them in hex, so enter EVAL X$YYYY:x on the debugger command line.

If you're not on at least v3r7, and you have STRISDB, that's a good way to
go, too. If you've neither, try to get News/400's STRSRCDBG utility. Or
there's Xterminate (ASNA?).

Last but not least, there's good old-fashioned debugging--cumbersome,
slower, but no less effective. Or, when you get the error, take the 'D'
option to get a dump. That'll have the values for all variables at the end.

As far as avoiding DDE's, one of the prime culprits I've found is
unitialized data structure subfields. In later releases this can be avoided
by putting a 'I' before the 'DS' on the data structure spec, or
individually on each subfield. This is especially important for numeric
subfields, since they are otherwise initialized to character values--a data
structure is really a 'character' data structure. The need to initialize
these things also holds, if I recall, for data structures based on external
file descriptions-help me here, somebody, it's been a while!

Good luck

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

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.