*     ***************  IOREVIEW COMMAND FILE  ************
* Provides insertion insertion order displays and printout.
*      The operator can select all the insertions for the client.
* or can select only those for a particular magazine.
***************************************************************
 

SET TALK OFF
USE B:Inserts

STORE ' ' TO Again
DO WHILE !(Again) <> 'F'
   STORE '   ' TO MClient
   STORE '              ' TO MMagazine
   STORE ' ' TO Hardcopy
   STORE ' ' TO Other
   ERASE
   @  2,11 SAY '    MEDIA SUMMARY:'
   @  4,11 SAY 'ENTER CLIENT CODE' GET MClient
   @  5,11 SAY '   MAGAZINE NAME?' GET MMagazine
   @  6,11 SAY '       P to PRINT' GET Hardcopy
   READ
   IF MClient = ' '
      @  9, 0 SAY ' '
      ? '     CLIENT missing.'
      ? '     F if Finished,'
      ? '  <Return> to continue.'
      WAIT TO Again
   ELSE
      STORE !(MClient) TO MClient
      STORE !(MMagazine) TO MMagazine
      STORE !(Hardcopy) TO Hardcopy
      @ 4,29 SAY MClient
      @ 5,29 SAY MMagazine
      @ 6,29 SAY Hardcopy
      @ 9, 0 SAY ' '
      ?
      ?
      ACCEPT 'Type C to CHANGE any entries' TO Changes
      IF !(Changes) = 'C'
         STORE ' ' TO Again
         ERASE
      ELSE
         IF MMagazine >'              '
            STORE TRIM(MMagazine) TO MMagazine
            STORE '.AND. Magazine=MMagazine' TO Condition
         ELSE
            STORE CHR(0) TO Condition
         ENDIF

         IF !(Hardcopy) = 'P'
            STORE 'TO PRINT' TO Hardcopy
         ELSE
            STORE CHR(0) TO Hardcopy
         ENDIF Hardcopy

         SET HEADING TO MEDIA SUMMARY FOR &MClient &MMagazine
         REPORT FORM Media &Hardcopy FOR Client=MClient &Condition
         ?
         ? '     F if Finished,'
         ? '  <Return> to continue.'
         WAIT TO Again
         ERASE
   ENDIF okay to do the report
ENDIF
ENDDO Again

ERASE
RELEASE All
RETURN
