|
Tim Truax 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! > > Any help from you bright folks would be appreciated, also any tips on > avoiding DDE's would be appreciated. > > > -- > žžžžžžžžžžžžž > ž-Tim Truax-ž > žžžžžžžžžžžžž > +--- Tim This problem occurs most often in a SBMJOB scenario when passing numeric parms. What has worked best for me is to define my numeric parms as 15 5 ( length 15, 5 decimals). You then would need to map them into the correct field size with Z-ADD. To the best of my understanding of this, memory addresses for numeric parms are in a 15 5 format. When you pass a parameter, you pass the "address" to where the data is stored then the system retrieves that data from that address. I never have any DDE problems when i use this 15 5 method when calling another program via SBMJOB. I don't know if your doing a SBMJOB or not, if not then perhaps you simply do not have the parm loaded with valid numeric data. Check the dump listing to verify which field it is in error, maybe the HDYTST field does not contain valid numeric data for whatever reason. Also i have found that doing a MOVE operation of a Zoned decimal field into a Packed decimal field results in a DDE error. I used to get my share of DDE's but rarely have that problem occur when keeping these things in mind. I'm sure some of the Guru's around here can enlighten both of us some more on this topic, I just do what works for me. 15 5, more Z-ADD's and less MOVES... I think there was a discussion going on a while back about the 15 5. I'm not sure if that method still holds merit on the newer releases of OS/400. It works fine on V3R2. Lets see what the other folks have to say... Hope that helps a little : ) Jim Welsh Programmer/Analyst B&B Cash Grocery Stores, Inc. http://www.netcom.com/~jimwelsh/welcome/welcome.html +--- | 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 mailing list archive is Copyright 1997-2025 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.