home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMIGA PD 1
/
AMIGA-PD-1.iso
/
Programme_zum_Heft
/
Anwendungen
/
Workshops
/
GoldED
/
data
/
tools
/
HiSpeed
/
arexx
/
Join.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-05-27
|
2KB
|
84 lines
/* Join jobs together. Useful to save some paper */
options results
shell
address HISPEED.1
SET REQUESTER ON
QUERY JOBS
JOBS = RESULT
if JOBS < 2 then
SET WARN "At least two jobs (files) required !"
else
do
SET ASK "This macro will join your files together, creating|a file T:DOCUMENT. The files will be separated by|form feed codes. Proceed ?"
if RESULT = 1 then
do
COMMAND = 'JOIN '
do N = 0 to JOBS-1
QUERY JOBNAME N
parse var RESULT PATH NAME REST
TEMP = 'T:' || NAME
if OPEN('HEAD', 'T:HEADER', 'WRITE') = FALSE then
SET WARN "Couldn't open temporary header file !"
else
if OPEN('HEAD', 'T:HEADER', 'WRITE') = FALSE then
SET WARN "Couldn't open temporary header file !"
else do
if (N ~= 0) then
do
R = WRITELN('HEAD', '' )
R = WRITELN('HEAD', '' )
R = WRITECH('HEAD', '') /* form feed */
end
R = WRITELN('HEAD', CENTER(COPIES('*', 60), 70))
R = WRITELN('HEAD', CENTER(('*' || COPIES(' ', 58) || '*'), 70))
R = WRITELN('HEAD', CENTER(('*' || CENTER('File: ' || PATH || NAME, 58) || '*'), 70))
R = WRITELN('HEAD', CENTER(('*' || COPIES(' ', 58) || '*'), 70))
R = WRITELN('HEAD', CENTER(COPIES('*', 60), 70))
R = WRITELN('HEAD', '')
R = WRITELN('HEAD', '')
R = WRITELN('HEAD', '')
R = CLOSE('HEAD')
shell
JOIN '>NIL: T:HEADER "' || PATH || NAME || '" AS ' || TEMP
address HISPEED.1
COMMAND = COMMAND || TEMP || ' '
end
end
shell
COMMAND || 'AS T:DOCUMENT'
address HISPEED.1
SET PERFORMFF
CLR
SET FILE 'T:DOCUMENT'
end
end