-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathilibcall.py
More file actions
42 lines (33 loc) · 1.32 KB
/
ilibcall.py
File metadata and controls
42 lines (33 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright contributors to the python-itoolkit project
# SPDX-License-Identifier: MIT
# -*- coding: utf-8 -*-
import warnings
from ..transport.direct import DirectTransport
class iLibCall(DirectTransport): # noqa N801 gotta live with history
"""
Transport XMLSERVICE direct job call (within job/process calls).
Args:
ictl (str): optional - XMLSERVICE control ['*here','*sbmjob']
ipc (str): optional - XMLSERVICE job route for *sbmjob '/tmp/myunique'
iccsid (int): optional - XMLSERVICE EBCDIC CCSID (0 = default jobccsid)
pccsid (int): optional - XMLSERVICE ASCII CCSID
"""
def __init__(self, ictl='*here *cdata', ipc='*na', iccsid=0, pccsid=1208):
warnings.warn(
"iLibCall is deprecated, "
"use itoolkit.transport.DirectTransport instead",
category=DeprecationWarning,
stacklevel=2)
if iccsid != 0:
raise ValueError("iccsid must be 0 (job ccsid)")
if pccsid != 1208:
raise ValueError("pccsid must be 1208 (UTF-8)")
super().__init__(ctl=ictl, ipc=ipc)
def call(self, itool):
"""Call XMLSERVICE with accumulated actions.
Args:
itool: An iToolkit object
Returns:
The XML returned from XMLSERVICE
"""
return super().call(itool)