home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
dbaseii
/
vidlog20.lbr
/
VIDTITLE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1986-08-31
|
3KB
|
108 lines
* Program..: VIDTITLE.CMD
* Author...: Your Name
* Date.....: 05/27/85
* Notice...: Copyright 1985, 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 "Videolog Listing by Title" TO pagehdg
STORE (80-LEN(pagehdg))/2 TO col:hdg
*
* ---Open the datafile and print the report.
USE VIDEOLOG INDEX VIDTITLE
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 60 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 "Title"
@ 4, 33 SAY "Tape"
@ 4, 40 SAY "Hr"
@ 4, 45 SAY "Mn"
@ 4, 50 SAY "Star"
@ 4, 57 SAY "End"
@ 4, 64 SAY "Time"
@ 5, 0 SAY "=============================="
@ 5, 33 SAY "===="
@ 5, 40 SAY "=="
@ 5, 45 SAY "=="
@ 5, 50 SAY "===="
@ 5, 57 SAY "===="
@ 5, 64 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 $(title,1, 30)
@ line, 33 SAY $(STR(tape,3,0),1, 3)
@ line, 40 SAY $(hrs,1, 2)
@ line, 45 SAY $(min,1, 2)
@ line, 50 SAY $(indexstrt,1, 4)
@ line, 57 SAY $(indexend,1, 4)
@ line, 64 SAY $(timeleft,1, 5)
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: VIDTITLE.CMD
STORE 60 TO pagelen
OTHERWISE
ERASE
SET BELL ON
SET TALK ON
RETURN
ENDCASE
* ---Enter FOR <expression> for the report, such as,
* ---STORE "S