home *** CD-ROM | disk | FTP | other *** search
- /*---------------------------- Start REXX Source ----------------------------*/
-
- /* *********************************/
- /* * Print spooler utility program */
- /* * using ARexx v1.06 */
- /* * by */
- /* * Dan Schenck */
- /* * 22-SEP-88 */
- /* * v 1.00 */
- /* ***************************/
-
- copy_dir = "vd0:"
- copy_cntl = "rexx:spooler.copydir"
- text = center("Enter Spooler Directory",35) || "\" || center("or CANCEL to ""Copy-In-Place""",35)
- address command
- arg task .
-
- select
- when task = "INSTALL" then
- do
- do until(copy_dir ~= "")
- name = request(200,200,text,copy_dir,"OKAY","CANCEL")
- if name = "" then
- copy_dir = "IN-PLACE"
- else if exists(name) then
- do
- if left(statef(name),1) = 'D' then
- copy_dir = name
- else
- copy_dir = ""
- end
- else copy_dir = ""
- end
- call get_file_separator
- last_chr = right(copy_dir,1)
- if (last_chr ~= ":" & last_chr ~= "/") then copy_dir = copy_dir || "/"
- 'delete' copy_cntl || " quiet"
- call open('out',copy_cntl,'Write')
- call writeln('out',copy_dir)
- call writech('out',cc)
- call close('out')
- 'newcli' "CON:0/20/400/100/SPOOLER rexx:spooler.cntl"
- end
- when (task = "KILL" | task = "EXIT" | task = "QUIT") then
- address "SPOOLER" "EXIT"
- when task = "NEWSEPARATOR" then
- do
- call get_file_separator
- cc = translate(cc,'15'X,' ')
- address "SPOOLER" "NFS" cc
- end
- otherwise
- say 'Invalid operation "' || task || '" requested of Spooler_Utility'
- end
- exit(0)
-
- get_file_separator: procedure expose cc
- cc = '/f'
- cc = request(200,200,'Enter File Separator String\CANCEL = Form Feed\/n = NewLine\/f = Form Feed',cc,"OKAY","CANCEL")
- if cc = "" then cc = '/f'
- return
- /*----------------------------- End REXX Source -----------------------------*/
-