Skip to main content

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, automatically converting them to EBCDIC as needed.

Features

  • Execute TSO commands via IKJEFT1B
  • Automatic ASCII to EBCDIC conversion for input files
  • Optional STEPLIB support
  • Optional DBRMLIB 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

With STEPLIB and Verbose Output

batchtsocmd --systsin systsin.txt --sysin input.txt \
            --steplib DB2V13.SDSNLOAD --verbose

With STEPLIB and DBRMLIB

batchtsocmd --systsin systsin.txt --sysin input.txt \
            --steplib DB2V13.SDSNLOAD --dbrmlib DB2V13.DBRMLIB

With Concatenated STEPLIB Datasets

batchtsocmd --systsin systsin.txt --sysin input.txt \
            --steplib DB2V13.SDSNLOAD:DB2V13.SDSNLOD2:DB2V13.SDSNLOD3

With Concatenated STEPLIB and DBRMLIB Datasets

batchtsocmd --systsin systsin.txt --sysin input.txt \
            --steplib DB2V13.SDSNLOAD:DB2V13.SDSNLOD2 \
            --dbrmlib DB2V13.DBRMLIB:DB2V13.DBRMLI2

Command Line Options

  • --systsin PATH - Path to SYSTSIN input file (required)
  • --sysin PATH - Path to SYSIN input file (required)
  • --systsprt PATH - Path to SYSTSPRT output file or 'stdout' (optional, defaults to stdout)
  • --sysprint PATH - Path to SYSPRINT output file or 'stdout' (optional, defaults to stdout)
  • --steplib DATASET - Optional STEPLIB dataset name(s). Use colon (:) to concatenate multiple datasets (e.g., DB2V13.SDSNLOAD or DB2V13.SDSNLOAD:DB2V13.SDSNLOD2)
  • --dbrmlib DATASET - Optional DBRMLIB dataset name(s). Use colon (:) to concatenate multiple datasets (e.g., DB2V13.DBRMLIB or DB2V13.DBRMLIB:DB2V13.DBRMLI2)
  • -v, --verbose - Enable verbose output

Notes

  • Input files can be ASCII (ISO8859-1) or EBCDIC (IBM-1047)
  • Encoding is auto-detected via file tags; untagged files are assumed to be EBCDIC
  • Output files will be tagged as IBM-1047
  • Both --systsprt and --sysprint default to 'stdout'
  • When stdout is used, SYSTSPRT output is written first, then SYSPRINT output

License

Apache License 2.0

Author

Mike Fulton

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batchtsocmd-0.1.9.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

batchtsocmd-0.1.9-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file batchtsocmd-0.1.9.tar.gz.

File metadata

  • Download URL: batchtsocmd-0.1.9.tar.gz
  • Upload date:
  • Size: 23.6 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

Hashes for batchtsocmd-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8c0d0ef2e8c168992f20ac4fb50653c5c324a13d0c8bb2d7c94a1996adc810dd
MD5 b9a2da817cf42546fa865beed8d83a65
BLAKE2b-256 66f1a464754c6b96f8c559905786380537fde008a09ef3503b80078edb586787

See more details on using hashes here.

File details

Details for the file batchtsocmd-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: batchtsocmd-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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

Hashes for batchtsocmd-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b18b9fa1170dd6f9081deb07863720bd27108d3a9202dda21bd88db6e1a18046
MD5 519707aeb73b10aad06a6075046a4984
BLAKE2b-256 c2673259ecc65f547d91161b081be82004bf931b667356f11a1a80a29afb2880

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page