Question

  Asked: Jan 14 2008   12:30 AM GMT
  Asked by: JohnnyMooch


iSeries AFP Page Rotation within the printer file


AFPDS, AFP, PAGRTT, AS/400 printing

I have a printer file devtype(*afpds) in which I would like to print one page in profile & then the next in landscape. I am trying to do this within the dds with different records. I create the prtf with PAGRTT(0). Then, in the dds on a given record format, I specify PAGRTT(90) to achieve landscape. It's not working. Please HELP!!!!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



The page rotation keyword is only valid for 3812, 3816, 3820, 3825, 3827, 3835, & 4028 printers.

You must be sure you at a page boundry when you try to print the record format (w/ pagrtt keyword) otherwise a diag msg is issued.

As an example: You would use a SKIPB(1) command to skip to line 1 to ensure you are starting a new page. Assume this print file was created with PAGRTT(0)

A R RECORD1
A SKIPB(1)
A PAGRTT(90)
A FIELD1 3A 2 01
A R RECORD2
A FIELD2 3A 6 01
A R RECORD3
A FIELD3 3A 5 01



RECORD1 starts a new page w/ 90 deg rotation and prints FIELD1 on line 2,
RECORD2 prints FIELD2 on line 6 also at 90 deg rotation because it is still on the same page, RECORD3 prints FIELD3 on line 5 of a NEW PAGE w/ zero deg rotation.
RECORD3/FIELD3 prints on a new page because FIELD2 is printed on line 6 and the next line 5 is on the next page.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

JohnnyMooch  |   Jan 17 2008  12:49PM GMT

Thanks for the response. Your answer looks like it came right out of the book!!!
Do you have a working example? I’ve coded things just like the example you gave, and I am not receiving any diagnostic warnings. Yet the rotation keyword declared in the record format is ignored.
Thanks for any help……

 

Kevleemor  |   Jan 17 2008  4:52PM GMT

Hey that’s funny… it did come from the book! I coded this example and it worked on my IBM Infoprint 1145 printer
Display File

A******************************************************
A R PRTH011 SKIPB(1)
A SPACEA(001)
A 22'EDI'
A SPACEA(001)
A 30'PURCHASE +
A ORDER'
A*
A R PRTH021 SKIPB(1)
A PAGRTT(90)
A SPACEA(001)
A 8'Product '
A SPACEA(001)
A 71'Delivery '

RPG Program

H/TITLE Page Rotation Test printout
FZZPAGROTP O E PRINTER OFLIND(*IN79)
F INFDS(SRPRT)
D SRPGM ESDS EXTNAME(SRDPGM)
D SRPRT E DS EXTNAME(SRDPRT)
C WRITE PRTH011
C WRITE PRTH021
C WRITE PRTH011
C WRITE PRTH021
C EVAL *INLR = *ON
C RETURN

 

JohnnyMooch  |   Jan 18 2008  9:23AM GMT

Thanks Kev,

I failed to mention one detail - I am also working with Overlays!!!!

The example you provided works like a charm. I am able to go from port to land just the way you explained - I now have that working - thanks!

Here’s what’s happening when I introduce the overlays;

Page1
Portrait with Overlay and positionally defined variable data - prints the way I like.
Page2
Landscape without Overlay and the variable data is defined as line - prints the way I like.
BUT……
Page2
Landscape with Overlay and line data - reverts back to default or ignores pagrtt(90) - not what I want….

Any thoughts, suggestions, advice, moral support?

Thanks for any assistance,
John