× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Terminating a C proram
  • From: "Pantzopoulos, Mike" <mikepantzopoulos@xxxxxxxx>
  • Date: Wed, 9 Aug 2000 00:19:41 -0400

Title: Re: Terminating a C proram

Thanks to all who helped with a response to the above subject. My summary of the answers and further research so far is:

  1. EPM does not exist and  is of no concern to the current C compiler and run-time.. This means that the Jennifer Hamilton book is well out of date? I couldn't find any mention of Activation Groups in the index, and the first (and only!) publishing date was October 1992!!. For $200 Australian I would expect that the publishers keep the book up to date. I feel a little skinned
  2.        

  3. All I am trying to achieve is a consistency with RPG- to retain the C program and its lower level RPG invocations in memory until the business function has ended, in which case I will pass through a request code that results in the lower level programs setting on *INLR and then results in the C program ending as well.

  4. I looked up the ILE C Programmers Guide(appendixH) where it states.....keeping an activation group active after the program has exited means that all the storage associated with that program is still allocated and in a 'last-used' state. When the program is called again, initialization, as defined by the language, is not done. All variables have the last value assigned to them in the previous run of he program. In addition all of the settings in the ILE C run-time are in 'last-used' state such as signal(),strtok() etc......." .(reference H1.1).

  5. ..............no mention of the static attribute............

    In the same section they provide some example code and so I  created two C programs (copied from H1-1 in the users guide), one called TESTRTRN (with a return;) and the other TESTEXIT(with the return replaced by an exit() with test harnesses as follows:


    #include <stdio.h>                                                     
            int invocation_count=0;                                            
            int main(void)                                                     
            {                                                                  
            invocation_count++; /* increment counter */                        
            printf("Exit called: ");  ..........for the TESTRTRN program......printf("Return called: ");                                         

            printf("%d\n", invocation_count);                                  
            getchar(); /*  this holds the screen open */                       
    exit();..........for the TESTRTRN program........... return;                                                           

}


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.