|
> Are you implying that a service programs variables can persist across job > boundaries, or are you perhaps saying program and meaning module? Service programs' variables cannot persist across job boundaries. Heck, they can't even persist across activation group boundaries, and actgrp's are a subset of a job. What Barbara is referring to is when you have more than one program calling the same service program in the same job. For example, let's say you've written a service program that allows you to read through a list of orders at a particular status. Maybe they're at "ready to invoice" status. You've written an inquiry program that brings this list of orders up on the screen in a subfile. It does the display logic, and calls the service program to do the business & database logic. The user looks over this list, and if she thinks they look good, she hits F8 to continue (or something) The next program in the job goes to read through the same list in order to print them -- but oops, when it calls the service prgoram, the service program is alreay positioned at the end of the file, so no records show up. This isn't really any different from calling an OPM program (*PGM) to do the back-end logic... if that program ends with *INLR=*OFF (assuming it's an RPG program) and you call it later from a new program, it'll keep it's file position from before. So this isn't a new scenario that's come about with ILE -- it's just more prevalent now because more people are actually writing their code in a modular fashion.
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.