
* Program..: VIDTAPE.CMD
* Author...: Lyle Burks
* 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 Tape No." TO pagehdg
STORE (80-LEN(pagehdg))/2 TO col:hdg
*
* ---Open the datafile and print the report.
USE VIDEOLOG INDEX VIDTAPE
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 "No."
      @ 4,  6 SAY "Title"
      @ 4, 39 SAY "Time"
      @ 4, 47 SAY "Hr"
      @ 4, 52 SAY "Mn"
      @ 4, 57 SAY "1st"
      @ 4, 64 SAY "End"
      @ 5,  0 SAY "==="
      @ 5,  6 SAY "=============================="
      @ 5, 39 SAY "====="
      @ 5, 47 SAY "=="
      @ 5, 52 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 $(STR(tape,3,0),1,  3)
   @ line,  6 SAY $(title,1, 30)
   @ line, 39 SAY $(timeleft,1,  5)
   @ line, 47 SAY $(hrs,1,  2)
   @ line, 52 SAY $(min,1,  2)
   @ line, 57 SAY $(indexstrt,1,  4)
   @ line, 64 SAY $(indexend,1,  4)
   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: VIDTAPE.CMD


      STORE 60 TO pagelen
   OTHERWISE
      ERASE
      SET BELL ON
      SET TALK ON
      RETURN
ENDCASE
* ---Enter FOR <expression> for the report, such as,
* ---STORE 