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
------------------------------
Original Message:
Sent: 08-12-2019 11:49 AM
From: MICHAEL SWANSON
Subject: Call NDVRC1 via batch REXX outside Endevor
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
Original Message:
Sent: 08-10-2019 05:21 PM
From: Eoin O'Cleirigh
Subject: Call NDVRC1 via batch REXX outside Endevor
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.
Original Message------
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
------------------------------