.ENABLE SUBSTITUTION
;  * MAILER HELPER *
;
TIME
.AGN:
;
.ASKS DEST ENTER DOCUMENT DESTINATION(S)
;
.NOFILE:
.ASKS DOC ENTER DOCUMENT FILE NAME
.SETN LEN <STRLEN>
.TESTFILE 'DOC'
.IF <FILERR> EQ 1 .GOTO FILEOK
.SETN L1 0
.LOOPCK:
.INC L1
.IF L1 GT LEN .GOTO TESTCK
.SETS X DOC['L1':'L1']
.IF X EQ "." .GOTO BDFILE
.IF X EQ ";" .GOTO BDFILE
.GOTO LOOPCK
.TESTCK:
.TESTFILE 'DOC'.W11
.IF <FILERR> EQ 1 .GOTO FILEOK
.BDFILE:
;
; NO SUCH FILE, ENTER ANOTHER NAME
;
.GOTO NOFILE
.FILEOK:
;
.SETN DOCNUM 1.
.LOOP:
.INC DOCNUM
.SETS ZERO "00"
.IF DOCNUM GT 9. .SETS ZERO "0"
.TESTFILE DOC'ZERO''DOCNUM'.W11
.IF <FILERR> EQ 1 .GOTO LOOP
.TESTFILE DOC001.W11
.IF <FILERR> EQ 1 DXF DOC.1/TYPE:TE:SPACES=DOC001.W11
.OPENA DOC.1
.DATA <n>'DEST' <#>'DOCNUM'<>
.CLOSE
DXF DOC001.W11=DOC.1/TYPE:TE:CP
PIP DOC'ZERO''DOCNUM'.W11;1='DOC'/RE
PIP DOC.1;0/DE
BMP SY:
;
.ASK TF ANY MORE DOCUMENTS TO REGISTER
.IFT TF .GOTO AGN
;
PIP *.W11/LI
;
TIME
;
;   * END OF MAILER HELPER ***
