Skip to content

Commit ff49f4a

Browse files
committed
Reorganized content and improved README text.
1 parent a52983d commit ff49f4a

File tree

12 files changed

+47
-48
lines changed

12 files changed

+47
-48
lines changed

endevor/ServiceNow-Interface/COBOL+REXX+Python-Example/README.md

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ServiceNow interface to Endevor
2+
3+
## Overview
4+
Items in this folder are example Endevor objects for interfacing with ServiceNow. This interface assumes that the automated activity begins in Endevor.
5+
6+
Processing is exit-based and is initiated by Endevor for element actions, where a CCID must be validated, or by a package action, where a portion of the package name must be validated. Details of the actions of Endevor Exits can be found [here](https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-endevor-software-change-manager/19-0/reference/api-and-user-exits-reference/exits-reference.html). Note that Endevor supports "exits that are written in either assembler or in high-level languages such as COBOL". The exits provided here are written in COBOL, but there is no requirement to have knowledge of COBOL. All processing logic for this solution is coded in the Rexx, and the Python or Golang subroutines.
7+
8+
## Where to start
9+
If you have not yet loaded the Python "requests" package, make that be your first step. If you are not sure whether the "requests" package is installed, you can use this step to find out.
10+
11+
If you have already installed the "request" package, then comment out the sys.path line in the python. For example:
12+
13+
# Name the directory where the 'requests' are found
14+
# sys.path.append('/usslocation/forpython/uptoNotIncludingrequest')
15+
16+
Test your python or GoLang access to ServiceNow. For example, copy the Python code into a USS directory and using OMVS, issue a command like this one:
17+
18+
python Servicenow.py CHG1234567
19+
20+
## Installing the "requests" package
21+
22+
If you know that the python "request" package has not been installed, or if you receive a message indicating that it cannot be found, then execute these steps:
23+
24+
- On USS issue this command:
25+
26+
python -m pip install requests
27+
- Within the python code enter the name of the uss directory that contains the "requests" folder
28+
# Name the directory where the 'requests' are found
29+
sys.path.append('/usslocation/forpython/uptoNotIncludingrequests')
30+
31+
32+
33+
Other items in this folder are Endevor exit code examples that query ServiceNow. Endevor functions listed below, each use a COBOL exit, a REXX subroutine and a Python subroutine. Functions include:
34+
- **Exit 2**. Before element action exit code to validate a CCID value with ServiceNow (C1UEXT02 / C1UEXTR2 / ServiceNow.py)
35+
- **Exit 7**. Package exit code to validate (a portion of) a package namee with ServiceNow. (C1UEXT07 / C1UEXTR7 / ServiceNow.py)
36+
37+
Processing starts with an Endevor action, such as an element Generate or a package create. Endevor then calls a COBOL exit. The COBOL examples collect exit block information from Endevor and pass it to a REXX subroutine. Rexx then calls the python code to query ServiceNow. The results of the query return as a JSON string, which is visible to both the Python and REXX.
38+
39+
REXX examples contain code that allows on-demand REXX tracing to be invoked - without modifying the REXX code. The examples allow you to limit the tracing to a list of userids. You can create your own list of userids or eliminate it altogether. Then, simply allocate the name of the REXX program to DUMMY. For example, to engage the Trace for C1UEXTR2, then allocate C1UEXTR2 to DUMMY. There are two ways to do the allocation:
40+
41+
- In TSO forground, enter "TSO ALLLOC F(C1UEXTR2) DUMMY"
42+
- In batch, include a JCL line "//C1UEXTR2 DD DUMMY"

0 commit comments

Comments
 (0)