#!/bin/bash
if [ "$1" = "" ]; then
 echo "usage: subjob jcl.file "
 exit 1
fi

if ! test -f $1 ; then
  echo file $1 does not exist
  exit 1
fi

cat $1 | a2e -p - >/tmp/copy$PPID.jcl

sub /tmp/copy$PPID.jcl
rm -f /tmp/copy$PPID.jcl
