INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

New page for duplex printing

New page for duplex printing

(OP)
Hello, i'm using mainframe Focus 7.3.5 -
my program generates a number of reports which are printed in duplex.  How can I control each report to start on a new page instead of the possibility of printing on the back side of the previous report?  Thanks!

RE: New page for duplex printing

Here's the IB solution

How can we do double-sided printing, but insert blank pages if major sort ends on odd-numbered page.


Solution:

One technique has been documented for several years, which involves two passes of the data.  However,  a new feature NEWPAGE, makes this easier.
 
 
 
TABLE FILE filename
"PAGE <TABPAGENO "
PRINT verb_object
COMPUTE EVENODD/I1 = IMOD(TABPAGENO,2,'I1'); NOPRINT
-*   SKIP is alpha to supress subtotalling with the WHEN
COMPUTE SKIP/A1 = IF EVENODD EQ 0 THEN 'N' ELSE 'Y'; NOPRINT
BY byfield PAGE-BREAK REPAGE
BY by2 ...
ON byfield SUBFOOT NEWPAGE
"THIS PAGE LEFT BLANK"
WHEN SKIP EQ 'Y'
END

HTH

RE: New page for duplex printing

(OP)
Thanks, it's a good technique, but I'm experiencing counter effect:

(1) The headings also print on this back page.  Is it possible to make it a blank back page?

(2) Using SET PAGE = NOPAGE will remove the 2 reserved printing lines on top, but also remove the printing control character (cc).  How to retain the cc for proper printing?

(2) Originally, my report has nice totals at the end, now the formatting and spacing are distorted.

Original coding:
===============
TABLE FILE filename
HEADING
.
.
.
PRINT field
   BY byfield1  NOPRINT
   BY byfield2  UNDER-LINE
   BY byfield3  SUBTOTAL  MULTILINES
   BY byfield4  SKIP-LINE
   BY byfield5
   ON TABLE SUBTOTAL
   ON TABLE SUBFOOT
   " "
   "*TOTAL TYPE 1 = <TOT.type1 "
   "*TOTAL TYPE 2 = <TOT.type2 "
END


Original End of Report:
======================

*TOTAL byfield3               nnnnn.nn   (field value)
----------------------------------------

TOTAL                      nnnnnnnn.nn   (report subtotal)

*TOTAL TYPE 1 =  nnnn.nn
*TOTAL TYPE 2 = nnnnn.nn



Modified coding:
===============
DEFINE FILE filename
  DUMMY1 /A1 = ' ';
  DUMMY2 /A2 = ' ';
END
TABLE FILE filename
HEADING
"PAGE <TABPAGENO "
.
.
.
PRINT field
      COMPUTE EVENODD/I1= ......
      COMPUTE SKIP/A1= .........
   BY DUMMY1    NOPRINT
   BY DUMMY2    NOPRINT
   BY byfield1  NOPRINT
   BY byfield2  UNDER-LINE
   BY byfield3  SUBTOTAL  MULTILINES
   BY byfield4  SKIP-LINE
   BY byfield5
   ON DUMMY2 SUBTOTAL AND SUBFOOT
   " "
   "*TOTAL TYPE 1 = <TOT.type1 "
   "*TOTAL TYPE 2 = <TOT.type2 "
   ON DUMMY1 SUBFOOT NEWPAGE
   " "
   WHEN SKIP EQ 'Y'
END


Modified End of Report:
======================

*TOTAL byfield3               nnnnn.nn   (field value)
TOTAL                      nnnnnnnn.nn   (report subtotal)

*TOTAL TYPE 1 =  nnnn.nn
*TOTAL TYPE 2 = nnnnn.nn

[new page]
headings
.
.
.

----------------------------------------

TOTAL                      nnnnnnnn.nn   (rpt subtot again)
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close