× 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.



I believe it is because your PGM1 is in activation group *CALLER and I am
guessing you are running it from the command line so it is running in the
default activation group.  Overrides in the default activation group are
like OPM overrides in that they are applied at the call level.  Thus, your
override is at a lower call level than your open so it is ignored.  Change
PGM1 to run in *New or a named activation group and I think your override
will happen the way you expect because it will follow the ILE override
rules.

Scott Mildenberger

> -----Original Message-----
> From: Bartell, Aaron L. (TC) [mailto:ALBartell@taylorcorp.com]
> Sent: Friday, January 17, 2003 9:13 AM
> To: 'RPG400-L@midrange.com'
> Subject: Activation Groups, external sub procedures, and OVRDBF
> 
> 
> I have looked in the archives but am unable to find an 
> example similar to
> mine, so here I go. . .
> 
> I have a situation where my OVRDBF isn't working and from my 
> point of view I
> have all of my ducks in a row.  I have PGM1 doing a CALLP to 
> a sub procedure
> named clCmdExec which executes the OVRDBF command I send into it.  For
> example:
> 
> PGM1...
>      C                   CallP      cLCmdExec('OVRDBF FILE(ORDHDR1)
> TOFILE(PRODLIB/ORDHDR1)')
> 
> 
> cLCmdExec (external module that is bound into PGM1) . . .
>      P cLCmdExec...
>      P                 B                   Export
>      D cLCmdExec...
>      D                 PI              N
>      D  pCmd                       1024    Value Varying
>      D  pLength                      15  5 Value Options(*NoPass)
>      C                   If         %Parms = 1
>      C                   Eval       pLength = %Len(%Trim(pCmd))
>      C                   EndIf
> 
>      C                   Call      'QCMDEXC'                  
>           99
>      C                   Parm                    pCmd
>      C                   Parm                    pLength
> 
>      C                   Return    *In99
>      P                 E
> 
> I created PGM1 with DFTACTGRP(*NO) ACTGRP(*CALLER).
> I created the service pgm cLCmdExec is in with ACTGRP(*CALLER).
> 
> The above doesn't override the file; when I open ORDHDR1 it 
> grabs the first
> ORDHDR1 in the library list which is in TESTLIB.  
> 
> The override _does_ work if I have the following in PGM1 
> instead of using a
> sub procedure.

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.