|
I would normally pass a pointer to the mods. c callp md002r(parm1:parm2:%addr(polData)) Then in my called procedure, define your receiving variable as based and set the pointer to the passed address. D polData DS based(p_polData) occurs(6) D md002r PR D parm1 D parm2 D ptrToDS * C eval p_polData = ptrToDS Thanks, Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 /"\ \ / X / \ Mark Mellish <Mark.Mellish@for To: "'rpg400-l@midrange.com'" <rpg400-l@midrange.com> tis.com> cc: Sent by: Subject: Passing Multi-Occurence Data Structures rpg400-l-admin@mi drange.com 12/04/2002 07:09 AM Please respond to rpg400-l This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- -- [ Picked text/plain from multipart/alternative ] All I am in the process of converting a normal call statement to a callp and have run into a difficulty with a MODS. Has anyone got some example code to show how it is done? If not then I'll have to pass 6 separate parameters instead of the 1 that works fine now. MODS definition: D PolData DS Occurs(6) D RenewDate 1 9 INZ(*BLANKS) D PolNum 10 17 INZ(*BLANKS) D PolName 18 67 INZ(*BLANKS) D GrosP 68 74 2 INZ(*ZEROS) D ComPct 75 79 3 INZ(*ZEROS) D ComAmt 80 86 2 INZ(*ZEROS) D InstYN 87 87 INZ(*BLANKS) D NetP 88 94 2 INZ(*ZEROS) Original call: C Call 'MR002R' C Parm Parm1 C Parm Parm2 C Parm MODS New call: D MR002R PR Extpgm('MR002R') D Parm1 1 Const D Parm2 1 Const D PolData 94 D MR002R PI D Parm1 Const Like(M4DIR) D Parm2 Const Like(M4AGNT) D PolData 94 C Callp MR002R(M4DIR:M4AGNT:M4EFDT:M4EFFT: C M4POLN:PolData) This now treats PolData as a single 94 character field and not a MODS. I have searched through the IBM manuals but have found nothing to help. Any suggestions would be very much appreciated. Regards Mark ___________________________ Mark Mellish Analyst Programmer Fortis Insurance Ltd Phone 02380 353662 Fax 02380 641146 Email mark.mellish@fortis.com -- -- --------------------------------------------------------------- This e-mail, including any attachments, contains information that is private and confidential and solely intended for the addressee or addressees. If you are not the named or intended recipient, please inform the sender immediately by reply transmission and delete this e-mail, including any attachments, without opening or copying it. In addition, in this event you are hereby notified that any disclosure, reading, reproduction, dissemination, distribution or any other use of this e-mail, including any attachments, is strictly prohibited. No warranty or guarantee is given with respect to the correct and accurate transmission of the content as well as with respect to the timely receipt of a sent e-mail. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the Fortis.com mail domain. Always scan attachments before opening them. --------------------------------------------------------------- -- _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.