Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
Captain_Paralytic
Captain_Paralytic
4 Posts
ACCEPTED ANSWER

Pinned topic COBOL Dynamic subroutines in ISPLLIB for REXX execution

‏2011-12-21T12:05:06Z |
This is quite a deep situation so I hope I manage to explain it correctly.

I have a COBOL program which normally runs in batch under JCL. Let's call it MAINPROG.
Now MAINPROG calls a dynamic subroutine RNCAL which in turns calls the dynamic subroutine POSTB.
MAINPROG also calls POSTB directly.

In the JCL the STEPLIB contains the library PRDQ.B.LOADLIB which contains MAINPROG and it also contains PROD.B.LOADLIB which contains RNCAL and POSTB.

In my REXX program, I allocate all the files required by MAINPROG, POSTB & RNCAL and then call MAINPROG thus:
"CALL 'PRDQ.B.LOADLIB(MAINPROG)'"
This fails because it cannot find RNCAL and POSTB, which I would expect.
If I copy RNCAL and POSTB to a library that is already in my ISPLLIB concatenation, all is well.

However, what I would rather do is to temporarily add the PROD.B.LOADLIB library to my ISPLLIB so that I always pick up the current versions of POSTB & RNCAL.

My reading of the subject seems to suggest that invoking:
address ISPEXEC "LIBDEF ISPLLIB EXCLDATA ID('PROD.B.LOADLIB')"
should achieve what I require, but MAINPROG still complains that it cannot find the dynamic subroutines.

I know that the LIBDEF call is doing something because if I change it to:
address ISPEXEC "LIBDEF ISPLLIB EXCLDATA ID('PRDQ.B.LOADLIB','PROD.B.LOADLIB')"
then I can change the call to:
CALL MAINPROG
and MAINPROG is found, but the execution still fails to fine the subroutines.
Does anyone here have any idea as to what magic words I need to chant to achieve my aim?

TIA
Updated on 2012-02-03T19:16:35Z at 2012-02-03T19:16:35Z by tonysam
  • tonysam
    tonysam
    2 Posts
    ACCEPTED ANSWER

    Re: COBOL Dynamic subroutines in ISPLLIB for REXX execution

    ‏2012-02-03T19:16:35Z  in response to Captain_Paralytic
    Have you tried allocating your subroutine library to TASKLIB?