|
I will send you an example when I get back to work Monday, but here is a basic view. 1) A service program is created from a group of subprocedures. 2) the subprocedures can be written in a single source member, or separate source modules 3) You CAN write/read/update/chain/reade, etc. to files in the subprocedures, but there are a few items you must know to accomplish this: a) The file specs must be declared outside the P-specs b) If you use the technique of PREFIXing the I/O fields, and creating a DS containing the fields with LIKEREC or EXTNAME, the DSs _must_ be declared in the D-specs BEFORE the P-specs, making them 'global'. 4) If you want the subprocedures to be callable by each other, you must include the EXPORT keyword on the beginning P-spec, or include all subprocedures in the same source file 5) If you don't want ALL modules of the service program to be callable by other programs, you must create binder source (see the Sorcerer's guide), and use the binder source on the CRTSRVPGM command. As Jerry said, the Sorcerer's guide is the best source, but this might get you started. On 1/27/06, thomas <rpgguru2@xxxxxxxxxx> wrote: > > does anyone have a simple service program I could look at to start to > understand them. A list of rules of what has to happen would help. Have > figured out that you cannot read and write files in a SERVICE program. Or at > least I think that is right. Thomas Burrows > > _______________________________________________ > Join Excite! - http://www.excite.com > The most personalized portal on the Web! > -- > 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. > > -- "Enter any 11-digit prime number to continue..." "In Hebrew SQL, how do you use right() and left()?..." - Random Thought "If all you have is a hammer, all your problems begin to look like nails"
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.