• Please review our updated Terms and Rules here

xsub

archeocomp

Experienced Member
Joined
Apr 29, 2012
Messages
416
Location
EU/SK
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?
 
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
 
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
 
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
 
There is/was a peculiar interaction between PIP and XSUB, so be warned:

Consider the following file:
Code:
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.
 
Thanks, but Chuck I do not get what you mean. This is my cp.sub
Code:
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.
 
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 may solve your other problem. Caution: it does involve patching PIP.
 
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

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

dir
 
Back
Top