× 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: Terminating a C Program
  • From: "Pantzopoulos, Mike" <mikepantzopoulos@xxxxxxxx>
  • Date: Tue, 8 Aug 2000 01:40:08 -0400

Title: Terminating a C Program

I have a few problems in understanding the program model that is used for C programs, and how the C program acts in the stack when called from RPG.

In essence I want the C program to behave like an RPG program - ie it stays resident until *INLR is set on. Is there a way of doing this in C? Alternatively, how do I control the invocation and termination of a C program ? My current C program is terminating each time it returns, and I need it and it's lower level RPG invocations to stay resident until I'm ready to end them..

I'm also  bit confused as to which program model I have when I compile my C program

In my travels through Jennifer Hamilton's book, I saw a reference to STREPMENV and ENDEPMENV and I thought this might be the answer to the above problems.

Unfortunately, it turns out I have ILE C program created using the CRTBNDC. When I look at the DSPPGM output, I find that this is an ILE program. When I use CRTCMOD/CRTPGM, of course it's an ILE program. I shouldn't have to create an EPM program should I?

I've have looked at the C Programmers Guide, but to no avail.
Any help out there?

Thank You

Mike Pantzopoulos





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.