*************************************************
* PRTDAT.CMD - V1.00 -
* THIS IS A UTILITY COMMAND TO PRINT THE RAW
* JOURNAL IN FIFTY LINE PAGES. 
* PRINTS ON WIDE CARRIAGE OR IN COMPRESSED TEXT.
* SEE NOTES BELOW IF COMPRESSED MODE DOESN'T WORK.
*************************************************
ERASE
SET TALK OFF
  ERASE
  USE B:GENJOURN
  ACCEPT "PACK THE GENERAL JOURNAL? (Y/N) <CR>" TO MANS
  IF MANS = "Y" .OR. MANS = "y"
    PACK
  ENDIF
  STORE " " TO MANS
  STORE " " TO MPRINT
  STORE " " TO MCOMP
  STORE 0 TO MDRAMT
  STORE 0 TO MCRAMT
  STORE " " TO MTAXREF
? " "
********
  ACCEPT "LIST ON WIDE CARRIAGE PRINTER? (Y/N) <CR>" TO MANS
  IF MANS = "Y" .OR. MANS = "y"
    STORE "Y" TO MANS
    STORE "Y" TO MPRINT
  ENDIF
  IF .NOT. MANS = "Y"
    ? " "
    ? "DOES YOUR PRINTER PRINT COMPRESSED TEXT? (Y/N) <CR>"
    ACCEPT TO MCOMP
  ENDIF
  IF MCOMP = "Y" .OR. MCOMP = "y"
    STORE "Y" TO MCOMP
    STORE "Y" TO MPRINT
  ENDIF
********
  IF .NOT. MPRINT = "Y"
    DISPLAY ALL
  ENDIF
*************************************************
IF MPRINT = "Y"
STORE 0 TO MPAGE
STORE 0 TO MRECDONE
USE B:GENJOURN
SET FORMAT TO PRINT
SET PRINT ON
IF MCOMP = "Y"
*************************************************
* NOTE: To set compressed print mode.
*       If CHR(15) doesn't work on your printer,
*       look in your printer manual for character
*       that sets compressed print mode.  Change
*       "? CHR(15)" to correct character.
*************************************************
  ? CHR(15)
  ? " "
  ? " "
ENDIF
DO WHILE .NOT. EOF
IF MRECDONE = (MPAGE * 50)
    ERASE
@ 2,8  SAY "DATE"
@ 2,18 SAY "DR:DESCR"
@ 2,37 SAY "DR:AN"
@ 2,44 SAY "DR:AMT"
@ 2,54 SAY "CR:DESCR"
@ 2,70 SAY "CR:AN"
@ 2,78 SAY "CR:AMT"
@ 2,88 SAY "NOTES1"
@ 2,108 SAY "NOTES2"
@ 3,1  SAY " "
    STORE MPAGE + 1 TO MPAGE
ENDIF
  STORE MRECDONE + 1 TO MRECDONE
  STORE DR:AMT TO MDRAMT
  STORE CR:AMT TO MCRAMT
  IF .NOT. MDRAMT = MCRAMT
    STORE TAXREF TO MTAXREF
    REPLACE TAXREF WITH "ERR"
  ENDIF
DISPLAY
  IF .NOT. MDRAMT = MCRAMT
    REPLACE TAXREF WITH MTAXREF
    STORE 0 TO MDRAMT
    STORE 0 TO MCRAMT
  ENDIF
  SKIP
  LOOP
ENDDO
ENDIF
IF MCOMP = "Y"
*************************************************
* NOTE: To return printer to regular print mode.
*       If CHR(18) doesn't work on your printer,
*       look in your printer manual for character
*       that sets regular print mode.  Change
*       "? CHR(18)" to correct character.
*************************************************
  ? CHR(18)
ENDIF
? CHR(12)
SET FORMAT TO SCREEN
SET PRINT OFF
RETURN
CANCEL
