PDA

View Full Version : xsub



archeocomp
December 11th, 2016, 08:47 AM
Right now I have file cp.sub which contains many pip b:=a:something lines. When I run "submit cp" it copies all the files to B: drive. The problem is, pip is loaded every time for each file which is very slow. XSUB might enable me to load pip into memory and then feed only file names to the pip, I hope. Can anyone give me an example please?

Is it also possible to ask user after a bunch of files if next bunch should be copied to make the copying more customizable?

deramp5113
December 11th, 2016, 10:28 AM
Below is a sample .SUB file using XSUB so you don't have to re-load PIP every time. If the file were called "FASTPIP.SUB", then it would be executed as follows:

A>SUBMIT FASTPIP

File content of FASTPIP.SUB:

XSUB
PIP
B:=STAT.COM
B:=ED.COM
B:=ASM.COM
B:=SUBMIT.COM
B:=XSUB.COM

Mike

archeocomp
December 11th, 2016, 12:18 PM
Thank you, that is what I was expecting, will try it tomorrow, my 8" drive is too loud now in the night:-)
1. There is not such a thing as asking user whether to continue or not I assume. Or branching based on parameter.
2. What was the CP/M EOL char? I am making the file on Windows and it works, when I try UNIX EOL it does not work.
3. an empty line was causing strange behaviour/error in plain submit, will see if it is allowed with XSUB

deramp5113
December 11th, 2016, 04:18 PM
You are correct, the standard CP/M SUBMIT utility does not have branching capability, though it does support command line parameters.

Typically CR/LF are used at the end of each line in CP/M as with MS-DOS and Windows. Unix uses the single LF character.

SUBMIT does not like empty lines at all! You may want to use SUPERSUB instead of SUBMIT. It was pretty common and fixed a few issues with SUBMIT.

Mike

Chuck(G)
December 11th, 2016, 05:15 PM
There is/was a peculiar interaction between PIP and XSUB, so be warned:

Consider the following file:

XSUB
PIP
B:=A:ZOOP.DAT
...


If this is run from drive A:, no files will be copied and PIP will end with the B: drive being the currently logged drive.
Strange stuff, but this comes from an old DRI memo.

archeocomp
December 12th, 2016, 08:42 AM
Thanks, but Chuck I do not get what you mean. This is my cp.sub

xsub
pip
b:=asm.com
b:=a:ddt.com
z
dir
I run it from A: and it copies both files. I also tried to change drive to B: and everything was working.

But I do not know how to tell pip to exit:-( Empty line makes submit screw everything. "z" is not working either, ^z makes submit complain about invalid control character.

Chuck(G)
December 12th, 2016, 09:03 AM
I was just relaying the content of a support bulletin that I had on hand. It could well be that DRI patched the problem in a later release.

However, I think that this (http://maben.homeip.net/static/S100/software/rlee/D/DIGITAL%20RESEARCH/CPM_2-2/PATCHES/PIP-XSUB.PAT) may solve your other problem. Caution: it does involve patching PIP.

archeocomp
December 12th, 2016, 09:36 AM
Thank you, great!

deramp5113
December 12th, 2016, 11:58 AM
SUBMIT's issue with blank lines is one reason I put SUPERSUB on all my machines and just name it SUBMIT. For example, your file with a blank line after the last file copy will exit PIP exactly as expected and then process the DIR command.

Mike


xsub
pip
b:=asm.com
b:=a:ddt.com

dir

archeocomp
December 12th, 2016, 09:37 PM
Yup I tested this yesterday, thanks for pointer to SUPERSUB.