Run TSO commands via IKJEFT1B
Project description
batchtsocmd
Run TSO commands via IKJEFT1B with automatic encoding conversion.
Description
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.
Features
- Execute TSO commands via IKJEFT1B
- Automatic ASCII to EBCDIC conversion for input files
- Support for named pipes (FIFOs)
- Optional STEPLIB support
- Configurable output destinations (SYSTSPRT, SYSPRINT)
- Verbose mode for debugging
Requirements
- Python 3.8 or higher
- z/OS operating system
- IBM Z Open Automation Utilities (ZOAU)
- zoautil-py package
- zos-ccsid-converter package
Installation
Note: This package can only be installed and run on z/OS systems.
pip install batchtsocmd
Usage
Basic Usage
batchtsocmd --systsin systsin.txt --sysin input.txt
With Output Files
batchtsocmd --systsin systsin.txt --sysin input.txt \
--systsprt output.txt --sysprint print.txt
Using Named Pipes
Important: When using named pipes, you must specify the --source-encoding parameter because z/OS pipes cannot store encoding metadata.
mkfifo /tmp/systsin.pipe /tmp/sysin.pipe /tmp/systsprt.pipe /tmp/sysprint.pipe
batchtsocmd --systsin /tmp/systsin.pipe --sysin /tmp/sysin.pipe \
--systsprt /tmp/systsprt.pipe --sysprint /tmp/sysprint.pipe \
--source-encoding IBM-1047
With STEPLIB and Verbose Output
batchtsocmd --systsin systsin.txt --sysin input.txt \
--steplib DB2V13.SDSNLOAD --verbose
Command Line Options
--systsin PATH- Path to SYSTSIN input file or named pipe (required)--sysin PATH- Path to SYSIN input file or named pipe (required)--systsprt PATH- Path to SYSTSPRT output file or named pipe (optional, defaults to DUMMY)--sysprint PATH- Path to SYSPRINT output file or named pipe (optional, defaults to stdout)--steplib DATASET- Optional STEPLIB dataset name (e.g., DB2V13.SDSNLOAD)--source-encoding ENCODING- Source encoding for pipe inputs:ISO8859-1orIBM-1047(required for pipes, auto-detected for files)-v, --verbose- Enable verbose output
Notes
- Input files can be ASCII (ISO8859-1) or EBCDIC (IBM-1047)
- For regular files: encoding is auto-detected via file tags; untagged files are assumed to be EBCDIC
- For named pipes: you must specify
--source-encodingbecause z/OS pipes cannot store encoding metadata - Output files will be tagged as IBM-1047
- If --systsprt is not specified, output goes to DUMMY
- If --sysprint is not specified, output goes to stdout (tagged as IBM-1047)
License
Apache License 2.0
Author
Mike Fulton
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file batchtsocmd-0.1.4.tar.gz.
File metadata
- Download URL: batchtsocmd-0.1.4.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/34.0 requests/2.32.5 requests-toolbelt/1.0.0 urllib3/2.6.0 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b309798f2f4ac56e0ed1847ec72ccb8bb9db4627cf77df6f68f9237f16569c3c
|
|
| MD5 |
ea3c66ad2b998d4cd5daa07160b69ac4
|
|
| BLAKE2b-256 |
9d81d38b915d13c308437ad3cfb52c903442d5dff4659c4ba2869583cea9a21c
|
File details
Details for the file batchtsocmd-0.1.4-py3-none-any.whl.
File metadata
- Download URL: batchtsocmd-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/34.0 requests/2.32.5 requests-toolbelt/1.0.0 urllib3/2.6.0 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.7.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb5e6aebb13177557834c7f40202680e8b5e96274b8828d8c000b1dfc553df1
|
|
| MD5 |
778aeed53bd755327db7f91944599ddf
|
|
| BLAKE2b-256 |
79983991bd9ed2c0f698c02d91a7a22b725cde640daf1c88ad1f48cf4739c290
|