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



>Buck try writing a program that first
>calls the exported getrec() procedure
>directly, and THEN calls the program.
>You should get an error.

No error here.  V5R1.  I devolved my code to fixed for the benefit of those
on earlier releases.

Source member AA is the caller of both the subprogram and the getrec
procedure:
     h debug
      * dbgview(*list)

     fqrpglesrc if   e             disk    usropn
     f                                     rename(qrpglesrc: src)

     d getrec          pr             6s 0

     d seq             s              6s 0

     c                   if        not %open(qrpglesrc)
     c                   open      qrpglesrc
     c                   endif

     c                   eval      seq = getrec
     c     seq           dsply

     c                   call      'A'
     c                   read      src
     c     srcseq        dsply


     c                   seton                                        lr

source member A is the subprogram and the export for the getrec procedure:
     h debug
      * dbgview(*list)

     fqrpglesrc if   e             disk    usropn
     f                                     rename(qrpglesrc: src)

     d getrec          pr             6s 0

     d seq             s              6s 0

     c                   eval      seq = getrec
     c     srcseq        dsply
     c                   seton                                        lr

     p getrec          b                   export
     d getrec          pi             6s 0

     c                   if        not %open(qrpglesrc)
     c                   open      qrpglesrc
     c                   endif


     c                   read      src

     c                   return    srcseq

     p                 e

I did a crtrpgmod on both A and AA.
I did a CRTBNDPGM on A, ACTGRP(QILE)
I did a CRTPGM on AA, MODULE(AA A) ACTGRP(QILE)

call aa
DSPLY       1
DSPLY     100
DSPLY     100
call aa
DSPLY       2
DSPLY     100
DSPLY     100
rclactgrp qile
ovrdbf qrpglesrc share(*yes)
call aa
DSPLY       1
DSPLY     200
DSPLY     300
call aa
DSPLY       4
DSPLY     500
DSPLY     600

I then pulled out all references to QRPGLESRC in AA and re-ran it with
identical results.

call aa
DSPLY       1
DSPLY     100
call aa
DSPLY       2
DSPLY     100
rclactgrp qile
ovrdbf qrpglesrc share(*yes)
call aa
DSPLY       1
DSPLY     200
call aa
DSPLY       3
DSPLY     400

Is this unexpected?
  --buck


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.