home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
A
/
DB2.ARC
/
MAILRPT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1989-09-27
|
3KB
|
100 lines
* Program..: MAILRPT.CMD
* Author...: Your Name
* Date.....: 03/21/86
* Notice...: Copyright 1986, All Rights Reserved
* Reserved.: pagenum, line, pagehdg, col:hdg, condition,
* lastrec
*
SET TALK OFF
SET BELL OFF
SET MARGIN TO 5
STORE 1 TO pagenum
STORE 254 TO line
STORE "AUTO HOTLINE MAIL LIST" TO pagehdg
STORE (72-LEN(pagehdg))/2 TO col:hdg
*
* ---Open the datafile and print the report.
USE MAIL
ERASE
@ 2, 0 SAY pagehdg
@ 2,72 SAY DATE()
@ 3, 0 SAY "========================================"
@ 3,40 SAY "========================================"
STORE " " TO select
@ 5,0 SAY "Output to the screen or printer? [S/P] ";
GET select PICTURE "!"
READ
DO CASE
CASE select = "S"
ERASE
STORE 22 TO pagelen
CASE select = "P"
SET FORMAT TO PRINT
STORE 56 TO pagelen
OTHERWISE
ERASE
SET BELL ON
SET TALK ON
RETURN
ENDCASE
* ---Enter FOR <expression> for the report, such as,
* ---STORE "STATE = 'CA'" TO condition
STORE " " TO condition
DO WHILE .NOT. EOF
IF line > pagelen
IF select = "S"
ERASE
ELSE
EJECT
ENDIF
@ 0,0 SAY "PAGE NO."
@ 0,9 SAY STR(pagenum,3)
@ 2,col:hdg SAY pagehdg
*
* ---Generate column headings.
@ 4, 0 SAY "NAME"
@ 4, 28 SAY "ADDRESS"
@ 4, 51 SAY "CITY"
@ 4, 74 SAY "COUNTY"
@ 5, 0 SAY "========================="
@ 5, 28 SAY "===================="
@ 5, 51 SAY "===================="
@ 5, 74 SAY "============"
STORE pagenum+1 TO pagenum
STORE 7 TO line
ENDIF
* ---Test to see if the condition exists.
IF condition <> " "
IF .NOT. (&condition)
SKIP
LOOP
ENDIF
ENDIF
*
* ---Print detail line.
@ line, 0 SAY $(NAME,1, 25)
@ line, 28 SAY $(ADDRESS,1, 20)
@ line, 51 SAY $(CITY,1, 20)
@ line, 74 SAY $(COUNTY,1, 12)
STORE line+1 TO line
SKIP
ENDDO
@ line+1,0 SAY " "
SET FORMAT TO SCREEN
RELEASE ALL
SET TALK ON
SET BELL ON
RETURN
* EOF: MAILRPT.CMD
╫£Éô┘ûïÜÆ╙╠╓╘ñ▀¼╛ª▀ó╘▀▀▀▀▀▀▀▀▀▀▀ñ█╫ó╘îïìûæÿ╘ñ╙╬╙ó╘¼½¡╫êû¢ïù╙╠╓╘ñ╓ó
ü
ïñ▀▀▀┐▀ôûæÜ╙ó╘¼½¡╫£Éô┘ûïÜÆ╙╠╓╘ñ▀¼╛ª▀ó╘▀▀▀▀▀▀▀▀▀▀▀ñ█╫¼½¡╫ó╘îïìûæÿ╘ñ╙ó╘¼½¡╫êû¢ïù╙╠╓╘▀▀▀▀▀▀▀▀▀▀▀ñ╙ó╘¼½¡╫╣ûÜô¢┼¢Ü£╙═╓╘ñ╓╙╬╙ó╘¼½¡╫êû¢ïù╙╠╓╘ñ╓ó
é
ü
┴┘¢₧ï₧ÖûôÜ
Ç╧▀┴▀½║¼½╫┘îïìûæÿ╓
ïñ▀▀▀┐▀ôûæÜ╙ó╘¼½¡╫£Éô┘ûïÜÆ╙╠╓╘ñ▀¼╛ª▀ó╘▀▀▀▀▀▀▀▀▀▀▀ñ█╫¼½¡╫ó╘îïìûæÿ╘ñ╙╬╧╙═╓╙╬╙ó╘¼½¡╫êû¢ïù╙╠╓╘ñ╓ó
ü
ïñ▀▀▀┐▀ôûæÜ╙ó╘¼½¡╫£Éô┘ûïÜÆ╙╠╓╘ñ▀¼╛ª▀ó╘▀▀▀▀▀▀▀▀▀▀▀ñ█╫ó╘îïìûæÿ╘ñ╙╬╙ó╘¼½¡╫êû¢ïù╙╠╓╘ñ╓ó
é