Skip to content

dasta400/mvssplitspl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mvssplitspl

File splitter for MVS 3.8j TK4- Spool files.

With optional Web UI (see below).


Description

  • Takes print outputs generated by MVS 3.8j TK4-.
    • either from an already ASCII file.
    • or by listening directly to a sockdev.
  • Splits it into one file per job.
  • Converts each job printout to PDF (by using enscript and ps2pdf).
  • Can separate printouts per MSGCLASS and/or ROOM.
  • Only tested in Linux.
  • There is an optional WebUI, with which you can manage (list, open, delete) generated PDFs.

Usage

mvssplitspl [-h] [-v] [-in INFILE] [-a ADDRESS] [-p PORT] [-r] [-c] [-d] outdir

positional arguments:
  outdir                destination directory for PDFs

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -in INFILE, --infile INFILE
                        input file (file generated by MVS)
  -a ADDRESS, --address ADDRESS
                        IP address of host's sockdev
  -p PORT, --port PORT  Port of host's sockdev
  -r, --seproom         Separate outputs per ROOM. Directory created if
                        needed.
  -c, --sepmsgclass     Separate outputs per MSGCLASS. Directory created if
                        needed.
  -d, --debug           Do not delete .prt files

To separate by room (-r, --seproom) the JCL must have, right after the JOB card: /*JOBPARM ROOM=xxxx

Where xxxx is a 1 to 4 characters descriptor.


Examples

  • mvssplitspl -a 192.168.0.74 -p 1403 ~/spool/MVS/ -c -r
    • Connects to 192.168.0.74 at port 1403 and creates PDF files, separated by MSGCLASS and ROOM into a directory called spool in your home directory.
  • mvssplitspl -in prt00e.txt ~/spool/MVS/
    • Processes a file called prt00e.txt and creates PDF files into a directory called spool in your home directory.

Dependencies

enscript and ps2pdf need to installed and in the path of your computer running this.



WebUI

WebUI

Description

Reads all files and subdirectories under the variable path set by the variable $path (See Installation below), and shows them in the browser. Files are ordered by filename and clustered by directory.

Clicking in the filename, a new window will be opened with the PDF.

Clicking in the bin icon will delete the file from your disk.

If a folder contains no files (number shown in parenthesis), a bin icon will appear and you can delete the folder from your disk.

If the jobdate is today, the row is highlighted for easy identification.

Installation

  • Put all the files in the a directory one level above the directory where the PDFs are created.
    • For example; my PDFs are created in ~/spool/MVS/, so I put the files in ~/spool/
  • Edit index.php and change the variable $path to your subfolder. In my example, $path should be "./MVS"
  • Start PHP Built-in web server (for PHP >= PHP 5.4.0): php -S localhost:8000
  • Point your browser to http://localhost:8000

About

File splitter for MVS 3.8j TK4- Spool files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published