|
Hello Barbara, I have considered to do so, but because templates are in our D-spec copybook I must use EXTNAME there. (Or else I would handle outside our naming rules) I have a workaround that works, but it causes me to define the file/recordname in copybook and serviceprograms both. I would like to define the template only in the copybook, and further use the template. Is that possible? This is what I work around now: (Simplified) ------------------------------------------------------ D-specs copybook templates: // Datastructure template d Relatie_t e ds extname(ALGPCN) d qualified d based(dummyPtr) ------------------------------------------------------ Serviceprogram prototype copybook d Relatie_SelectWdw... d PR 10I 0 extproc('Relatie_SelectWdw') d ZoekArg 40A const d ZoekMeth 10I 0 const d Relatie_ds likerec(ALGPCNR) ------------------------------------------------------ Serviceprogram procedure routine interface p Relatie_SelectWdw... p B export d Relatie_SelectWdw... d PI 10I 0 d ZoekArg 40A const d ZoekMeth 10I 0 const d Relatie_ds likerec(ALGPCNR) somewhere in the routine a chain into ds: chain relncn algpcnr Relatie_ds; ------------------------------------------------------- Calling program: d/copy from copybook d status S 10I 0 d naam S 10A d relds DS likeds(relatie_t) /free status = Relatie_SelectWdw( naam : InkVerkort_c : relds ); *inlr = *on; /end-free Thanks, Arco! > -----Oorspronkelijk bericht----- > Van: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Namens Barbara Morris > Verzonden: vrijdag 20 mei 2005 21:08 > Aan: rpg400-l@xxxxxxxxxxxx > Onderwerp: Re: likerec by extname from copybook > > "Simonse, Arco (CMK)" wrote: > > > > What I hoped to do is to define a template datastructure in > my D-specs > > copybook what calling programs should use when calling the > I/O routine. > > The only place where I want to have F-specs is in my > serviceroutines. > > That's why I tried to use the copybook DS on my LIKEREC definition. > > > > When I replace my LIKERECs with LIKEDS keywords, just like you Tim, > > then I cannot chain directly into the datastructure because that > > requires the use of LIKEREC. I'm curious how you solved this Tim. > > > > In V5R2, I think the best way to handle this is to define a > LIKEREC DS to be based, and set the basing pointer to the > address of your parmeter DS. If the parameter is CONST, > you'd have to make the LIKEREC DS non-based, and copy the > parameter DS to the LIKEREC DS. > > (In V5R3, there's no problem, because the compiler allows the > LIKEDS structure to be used for I/O.) > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > DISCLAIMER: This message contains information that may be privileged or confidential and is the property of C.Meijer B.V. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy,disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. This footnote also confirms that this email message has been swept by the presence of computer viruses
As an Amazon Associate we earn from qualifying purchases.
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.