Endevor

 View Only
  • 1.  Call NDVRC1 via batch REXX outside Endevor

    Posted Aug 09, 2019 07:04 PM
    Is it possible to call NDVRC1 from a REXX outside Endevor?  I've pre-allocated BSTIPT01 and QUEUEed it up with SCL and allocated C1MSGS1 and attempted to OUTTRAP it, but the call keeps failing. I've tried to call it two different ways: 

    call ndvparm = 'C1BM3000'

    method 1:
    ADDRESS ATTCHMVS "NDVRC1 ndvparm"

    method 2:
    ADDRESS TSO
    "CALL *(NDVRC1) '"||ndvparm||"'" 

    I'm starting to think it's not possible.

    ------------------------------
    Endevor Administrator
    Anthem Inc
    ------------------------------


  • 2.  RE: Call NDVRC1 via batch REXX outside Endevor
    Best Answer

    Broadcom Employee
    Posted Aug 10, 2019 05:22 PM
    Hi Michael,

    Calling Endevor from Rexx is certainly possible, the method 2 looks like the right way to go. The most likely failures the first time trying to get it to work will be making sure The Endevor libraries are Authorised, and your defaults etc are available.  There are so many ways that this can be accomplished, though without knowing your environment it'd be hard to give explicit advice. The most practical suggestion would be to start with a working regular batch job, and copy that. Put the same libraries in the steplib, allocate a CONLIB if used at your site, and maybe even start with a simple request like your batch job (a generate or API/CSV query are good starting points). 

    To diagnose further I'd need to see the outputs, if you get user abend U047 the problem will most likely be loss of authorisation.  If you are doing query only actions you might be able to use the non-authorised route using CONCALL (look for examples in the doc). 

    If you start running your Rexx as a batch job (under IRXJCL, or IKJEFTnn) it may be easier to capture output, manipulate stepsons etc. 
    Once it's running there you can run directly as a Rexx under Tso/ispf/etc. 

    Let me know if you want some sample code to play with or have a look at the FDP bundle which uses api calls under Rexx to work directly with Endevor. Search for fdp or LongName utility in communities for the download zip and instructions. 

    Eoin O'Cleirigh
    Broadcom
    Sr Principal Software Engineer

    CA CZ, s.r.o. | V Parku 2316/8 | Praha 4 | 148 00 
    Office: +420226207633 | Ext: 26133 | Mobile: +420775049833 | Eoin.OCleirigh@broadcom.com






  • 3.  RE: Call NDVRC1 via batch REXX outside Endevor

    Posted Aug 12, 2019 11:49 AM
    Doh!  It was as simple as adding the auth libraries to the JCL.  It's working fine now.  Thanks for pointing me in the right direction.

    ------------------------------
    Endevor Administrator
    Anthem Inc
    ------------------------------



  • 4.  RE: Call NDVRC1 via batch REXX outside Endevor

    Posted Aug 13, 2019 10:13 AM

    DO i = 1 TO elmStem.0

      PARSE VAR elmStem.i ele env sys sub typ junk

      CALL Pkgid

    END

     

    Get_Pkgid:

    ADDRESS TSO

    "ALLOC FI(BSTIPT01) LRECL(80) BLKSIZE(0) SPACE(5,5) ",

      "RECFM(F B) TRACKS NEW UNCATALOG REUSE "

    "ALLOC FI(PRINTELM) LRECL(133) BLKSIZE(0) SPACE(5,5) ",

      "RECFM(F B) TRACKS NEW UNCATALOG REUSE "

     DROP ndvStem.

    "DELSTACK"

    "NEWSTACK"

    QUEUE 'SET STOPRC 16 .'

    QUEUE 'PRINT ELE' ele

    QUEUE 'FROM ENV' env 'SYS' sys 'SUB' sub 'TYP' typ

    QUEUE 'STAGE NUMBER 2'

    QUEUE 'TO DDNAME PRINTELM'

    QUEUE 'OPTIONS MASTER NOSEARCH'

    QUEUE '.'

    ADDRESS TSO "EXECIO" QUEUED() "DISKW BSTIPT01 (FINIS"

    /* Call Endevor NDVCR1 Utility using Print Element Action */

    ndvparm = 'C1BM3000'

    ADDRESS TSO

    "CALL *(NDVRC1) '"||ndvparm||"'"

    Endevor_RC = RC

     IF Endevor_RC > 8 THEN

       Do Error handling

    ELSE

      "EXECIO * DISKR PRINTELM (STEM ndvStem. FINIS"

     DO i = 1 TO ndvStem.0

      Blah Blah Blah

    END

     "FREE FI(BSTIPT01)"

    "FREE FI(PRINTELM)"

    RETURN  



    ------------------------------
    Endevor Administrator
    Anthem Inc
    ------------------------------