batchtsocmd 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. When redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include src *.py
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: batchtsocmd
3
+ Version: 0.1.2
4
+ Summary: Run TSO commands via IKJEFT1B
5
+ Author: Mike Fulton
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/MikeFultonDev/batchtsocmd
8
+ Project-URL: Repository, https://github.com/MikeFultonDev/batchtsocmd
9
+ Project-URL: Issues, https://github.com/MikeFultonDev/batchtsocmd/issues
10
+ Keywords: zos,tso,mainframe,ebcdic,ikjeft1b
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: Other OS
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Classifier: Topic :: System :: Systems Administration
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: zoautil-py
31
+ Requires-Dist: zos-ccsid-converter>=0.1.7
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
34
+ Requires-Dist: build>=0.10.0; extra == "dev"
35
+ Requires-Dist: twine<4.0.0,>=3.0.0; extra == "dev"
36
+ Requires-Dist: readme-renderer<35.0,>=21.0; extra == "dev"
37
+ Provides-Extra: test
38
+ Requires-Dist: pytest>=7.0.0; extra == "test"
39
+ Dynamic: license-file
40
+
41
+ # batchtsocmd
42
+
43
+ Run TSO commands via IKJEFT1B with automatic encoding conversion.
44
+
45
+ ## Description
46
+
47
+ `batchtsocmd` is a Python utility for z/OS that executes TSO commands through IKJEFT1B with automatic ASCII/EBCDIC encoding conversion. It handles SYSIN and SYSTSIN inputs from files or named pipes, automatically converting them to EBCDIC as needed.
48
+
49
+ ## Features
50
+
51
+ - Execute TSO commands via IKJEFT1B
52
+ - Automatic ASCII to EBCDIC conversion for input files
53
+ - Support for named pipes (FIFOs)
54
+ - Optional STEPLIB support
55
+ - Configurable output destinations (SYSTSPRT, SYSPRINT)
56
+ - Verbose mode for debugging
57
+
58
+ ## Requirements
59
+
60
+ - Python 3.8 or higher
61
+ - z/OS operating system
62
+ - IBM Z Open Automation Utilities (ZOAU)
63
+ - zoautil-py package
64
+ - zos-ccsid-converter package
65
+
66
+ ## Installation
67
+
68
+ **Note:** This package can only be installed and run on z/OS systems.
69
+
70
+ ```bash
71
+ pip install batchtsocmd
72
+ ```
73
+
74
+ ## Usage
75
+
76
+ ### Basic Usage
77
+
78
+ ```bash
79
+ batchtsocmd --systsin systsin.txt --sysin input.txt
80
+ ```
81
+
82
+ ### With Output Files
83
+
84
+ ```bash
85
+ batchtsocmd --systsin systsin.txt --sysin input.txt \
86
+ --systsprt output.txt --sysprint print.txt
87
+ ```
88
+
89
+ ### Using Named Pipes
90
+
91
+ **Important:** When using named pipes, you must specify the `--source-encoding` parameter because z/OS pipes cannot store encoding metadata.
92
+
93
+ ```bash
94
+ mkfifo /tmp/systsin.pipe /tmp/sysin.pipe /tmp/systsprt.pipe /tmp/sysprint.pipe
95
+ batchtsocmd --systsin /tmp/systsin.pipe --sysin /tmp/sysin.pipe \
96
+ --systsprt /tmp/systsprt.pipe --sysprint /tmp/sysprint.pipe \
97
+ --source-encoding IBM-1047
98
+ ```
99
+
100
+ ### With STEPLIB and Verbose Output
101
+
102
+ ```bash
103
+ batchtsocmd --systsin systsin.txt --sysin input.txt \
104
+ --steplib DB2V13.SDSNLOAD --verbose
105
+ ```
106
+
107
+ ## Command Line Options
108
+
109
+ - `--systsin PATH` - Path to SYSTSIN input file or named pipe (required)
110
+ - `--sysin PATH` - Path to SYSIN input file or named pipe (required)
111
+ - `--systsprt PATH` - Path to SYSTSPRT output file or named pipe (optional, defaults to DUMMY)
112
+ - `--sysprint PATH` - Path to SYSPRINT output file or named pipe (optional, defaults to stdout)
113
+ - `--steplib DATASET` - Optional STEPLIB dataset name (e.g., DB2V13.SDSNLOAD)
114
+ - `--source-encoding ENCODING` - Source encoding for pipe inputs: `ISO8859-1` or `IBM-1047` (required for pipes, auto-detected for files)
115
+ - `-v, --verbose` - Enable verbose output
116
+
117
+ ## Notes
118
+
119
+ - Input files can be ASCII (ISO8859-1) or EBCDIC (IBM-1047)
120
+ - For regular files: encoding is auto-detected via file tags; untagged files are assumed to be EBCDIC
121
+ - For named pipes: you **must** specify `--source-encoding` because z/OS pipes cannot store encoding metadata
122
+ - Output files will be tagged as IBM-1047
123
+ - If --systsprt is not specified, output goes to DUMMY
124
+ - If --sysprint is not specified, output goes to stdout (tagged as IBM-1047)
125
+
126
+ ## License
127
+
128
+ Apache License 2.0
129
+
130
+ ## Author
131
+
132
+ Mike Fulton
@@ -0,0 +1,92 @@
1
+ # batchtsocmd
2
+
3
+ Run TSO commands via IKJEFT1B with automatic encoding conversion.
4
+
5
+ ## Description
6
+
7
+ `batchtsocmd` is a Python utility for z/OS that executes TSO commands through IKJEFT1B with automatic ASCII/EBCDIC encoding conversion. It handles SYSIN and SYSTSIN inputs from files or named pipes, automatically converting them to EBCDIC as needed.
8
+
9
+ ## Features
10
+
11
+ - Execute TSO commands via IKJEFT1B
12
+ - Automatic ASCII to EBCDIC conversion for input files
13
+ - Support for named pipes (FIFOs)
14
+ - Optional STEPLIB support
15
+ - Configurable output destinations (SYSTSPRT, SYSPRINT)
16
+ - Verbose mode for debugging
17
+
18
+ ## Requirements
19
+
20
+ - Python 3.8 or higher
21
+ - z/OS operating system
22
+ - IBM Z Open Automation Utilities (ZOAU)
23
+ - zoautil-py package
24
+ - zos-ccsid-converter package
25
+
26
+ ## Installation
27
+
28
+ **Note:** This package can only be installed and run on z/OS systems.
29
+
30
+ ```bash
31
+ pip install batchtsocmd
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ### Basic Usage
37
+
38
+ ```bash
39
+ batchtsocmd --systsin systsin.txt --sysin input.txt
40
+ ```
41
+
42
+ ### With Output Files
43
+
44
+ ```bash
45
+ batchtsocmd --systsin systsin.txt --sysin input.txt \
46
+ --systsprt output.txt --sysprint print.txt
47
+ ```
48
+
49
+ ### Using Named Pipes
50
+
51
+ **Important:** When using named pipes, you must specify the `--source-encoding` parameter because z/OS pipes cannot store encoding metadata.
52
+
53
+ ```bash
54
+ mkfifo /tmp/systsin.pipe /tmp/sysin.pipe /tmp/systsprt.pipe /tmp/sysprint.pipe
55
+ batchtsocmd --systsin /tmp/systsin.pipe --sysin /tmp/sysin.pipe \
56
+ --systsprt /tmp/systsprt.pipe --sysprint /tmp/sysprint.pipe \
57
+ --source-encoding IBM-1047
58
+ ```
59
+
60
+ ### With STEPLIB and Verbose Output
61
+
62
+ ```bash
63
+ batchtsocmd --systsin systsin.txt --sysin input.txt \
64
+ --steplib DB2V13.SDSNLOAD --verbose
65
+ ```
66
+
67
+ ## Command Line Options
68
+
69
+ - `--systsin PATH` - Path to SYSTSIN input file or named pipe (required)
70
+ - `--sysin PATH` - Path to SYSIN input file or named pipe (required)
71
+ - `--systsprt PATH` - Path to SYSTSPRT output file or named pipe (optional, defaults to DUMMY)
72
+ - `--sysprint PATH` - Path to SYSPRINT output file or named pipe (optional, defaults to stdout)
73
+ - `--steplib DATASET` - Optional STEPLIB dataset name (e.g., DB2V13.SDSNLOAD)
74
+ - `--source-encoding ENCODING` - Source encoding for pipe inputs: `ISO8859-1` or `IBM-1047` (required for pipes, auto-detected for files)
75
+ - `-v, --verbose` - Enable verbose output
76
+
77
+ ## Notes
78
+
79
+ - Input files can be ASCII (ISO8859-1) or EBCDIC (IBM-1047)
80
+ - For regular files: encoding is auto-detected via file tags; untagged files are assumed to be EBCDIC
81
+ - For named pipes: you **must** specify `--source-encoding` because z/OS pipes cannot store encoding metadata
82
+ - Output files will be tagged as IBM-1047
83
+ - If --systsprt is not specified, output goes to DUMMY
84
+ - If --sysprint is not specified, output goes to stdout (tagged as IBM-1047)
85
+
86
+ ## License
87
+
88
+ Apache License 2.0
89
+
90
+ ## Author
91
+
92
+ Mike Fulton
@@ -0,0 +1,61 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "batchtsocmd"
7
+ version = "0.1.2"
8
+ description = "Run TSO commands via IKJEFT1B"
9
+ readme = "README.md"
10
+ authors = [{name = "Mike Fulton"}]
11
+ license = {text = "Apache-2.0"}
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "Intended Audience :: System Administrators",
17
+ "License :: OSI Approved :: Apache Software License",
18
+ "Operating System :: Other OS",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.8",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ "Topic :: System :: Systems Administration",
29
+ ]
30
+ keywords = ["zos", "tso", "mainframe", "ebcdic", "ikjeft1b"]
31
+ requires-python = ">=3.8"
32
+ dependencies = [
33
+ "zoautil-py",
34
+ "zos-ccsid-converter>=0.1.7",
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ dev = [
39
+ "pytest>=7.0.0",
40
+ "build>=0.10.0",
41
+ "twine>=3.0.0,<4.0.0",
42
+ "readme-renderer>=21.0,<35.0",
43
+ ]
44
+ test = [
45
+ "pytest>=7.0.0",
46
+ ]
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/MikeFultonDev/batchtsocmd"
50
+ Repository = "https://github.com/MikeFultonDev/batchtsocmd"
51
+ Issues = "https://github.com/MikeFultonDev/batchtsocmd/issues"
52
+
53
+ [project.scripts]
54
+ batchtsocmd = "batchtsocmd.main:main"
55
+
56
+ [tool.setuptools]
57
+ package-dir = {"" = "src"}
58
+
59
+ [tool.setuptools.packages.find]
60
+ where = ["src"]
61
+ include = ["batchtsocmd*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,11 @@
1
+ """
2
+ Setup script for batchtsocmd package.
3
+ This file is maintained for backward compatibility.
4
+ Configuration is in pyproject.toml.
5
+ """
6
+
7
+ from setuptools import setup
8
+
9
+ setup()
10
+
11
+ # Made with Bob
@@ -0,0 +1,12 @@
1
+ """
2
+ batchtsocmd - Execute TSO commands via IKJEFT1B with encoding conversion
3
+ """
4
+
5
+ __version__ = "0.1.2"
6
+ __author__ = "Mike Fulton"
7
+
8
+ from .main import execute_tso_command, main
9
+
10
+ __all__ = ["execute_tso_command", "main"]
11
+
12
+ # Made with Bob