@echo off

rem
rem Run IBSYS Job using tape as input.
rem usage: runibsys program listing
rem

if "%1%"=="" goto USAGE
if "%2%"=="" goto USAGE
del punch.* print.* sysou1.* sys*.bin %2 2>t.t

rem
rem Make sysin tape.
rem

gendate >date.txt
copy date.txt+%1+eof.dat+ibsys.ctl sysin.txt >t.t
txt2bcd sysin 84

rem
txt2bcd ibsys.ctl reader.bcd 80
bcd2cbn reader

rem
rem Run IBSYS in non-panel mode.
rem

s709 -p -cibsys.cmd -m7094 r=reader p=print u=punch a1=ASYS1.BIN a2=ASYS8.BIN a3=sysin.bcd a4=sysou1.bcd a5=sysut1.bin a6=sysut3.bin a7=sysut2.bin a8=syspp1.bin a9=sysut4.bin a10=sysck2.bin 

rem
rem Convert printed output
rem

bcd2txt print
bcd2txt -p sysou1.bcd %2
del reader.* sys*.bin print.bcd
del sysou1* sysin.* t.t date.txt
goto END

:USAGE
echo usage: runibsys program listing

:END
