|
Barbara, Thank you for the clear explanation. Figuring this out has also solved an outstanding issue we had in another application. This has been a slight twist on activation group/service program issues we've already worked through. -BUT-, service programs and procedures are greeeaaaat and well worth some of the occasional obstacles. For all the times the IBM manuals are mentioned/quoted you'd think that I'd 'actually' thread thru it one of these days. :-) Rick, I hope one day they'll put the time and money for a movie into HHG like they did with LOR. John B. ------------------------------ message: 2 date: Wed, 28 Jan 2004 13:53:36 -0500 from: rick.baird@xxxxxxxxxxxxxxx subject: RE: Stupey service program thinks file is open -OR- %OPEN is easi ly f ooled? Eric answered your activation group question, but I just had to comment on the code you sent just wanted to point out some nifty features of the language... instead of: >D TRUE C CONST('1') >D FALSE C CONST('0') you can use named indicators: >d true s n inz(*on) >d false s n inz(*off) instead of: >C IF %OPEN(ILLDR) = FALSE >C OPEN ILLDR >C ENDIF c if not %open(ILLDR) or c if %open(ILLDR) but then you probably already knew that... :) Rick "The best way to get a drink out of a Vogon is to stick your finger down his throat, and the best way to irritate him is to feed his grandmother to the Ravenous Bugblatter Beast of Traal. On no account allow a Vogon to read poetry at you." - The Guide ------------------------------ message: 5 date: Wed, 28 Jan 2004 17:17:21 -0500 from: Barbara Morris <bmorris@xxxxxxxxxx> subject: Re: Stupey service program thinks file is open -OR- %OPEN iseasi ly f "DeLong, Eric" wrote: > ... > There were threads that explored this topic in depth, at one point. I think > some of that was distilled in the Midrange.com FAQ. > It's even in the manual (ILE RPG programmer's guide): "Reclaim Resources Command The Reclaim Resources (RCLRSC) command is designed to free the resources for programs that are no longer active. The command works differently depending on how the program was created. If the program is an OPM program or was created with DFTACTGRP(*YES), then the RCLRSC command will close open files and free static storage. For ILE programs or service programs that were activated into the OPM default activation group because they were created with *CALLER, files will be closed when the RCLRSC command is issued. For programs, the storage will be re-initialized; however, the storage will not be released. For service programs, the storage will neither be re-initialized nor released. Note: This means that if you have a service program that ran in the default activation group and left files open (returning with LR off), and a RCLRSC is issued, when you call the service program again, the files will still appear to be open, so so any I/O operations will result in an error. For ILE programs associated with a named activation group, the RCLRSC command has no effect. You must use the RCLACTGRP command to free resources in a named activation group." ------------------------------
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.