Printer File

770 pts.
Tags:
AS/400
AS/400 Printer File
I am able generate a report using printer file.Now the concern is how to make second or more page when the records are too many.

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

If the page layout is the same, just need more detail lines, you use OVERFLOW just as you would with a internally defined printer file.
If additional pages are different that than Page 1, your define a different format and use that for overflow.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    ...the concern is how to make second or more page when the records are too many. That depends on how you defined the printer file. If you defined a printer file record format that manages a whole page, just write the format a second time to get a second page. If you have a record format that only defines a single printed line or a small number of lines for each input record, then you might also have a second format that defines page and column headers. In such a case, you might also have another format that defines page footers. You might write a page footer format whenever you reach the overflow line that you defined in the printer file. Then you'll write the page header format for the next page, and then you'll write each detail format as you input more records. Or you might have a record format that defines a single printed line (or a small number of lines) for each input record. That format might include all of the page and column headers, also, but those header elements might be conditioned so that they only print when the printer file indicates overflow. In short, you need to show us the definition of a printer file before we can guess how multiple pages might be printed. It will probably also be necessary to know what language will be used to write the printer file records. Tom
    125,585 pointsBadges:
    report
  • ankit2002
    It is an externally defined Printer file. I guess OVERFLOW indicator can only be use in the Program-defined Printer Files.
    770 pointsBadges:
    report
  • ankit2002
    0001.00 A*%%*********************************************************************** 0002.00 A*%%TS RD 20120329 153452 USTBATCH5 REL-V5R3M0 5722-WDS 0003.00 A*%%FI+10660100000000000000000000000000000000000000000000000000 0004.00 A*%%FI 0000000000000000000000000000000000000000000000000 0005.00 A*%%*********************************************************************** 0006.00 A R HEADER 0007.00 A*%%*********************************************************************** 0008.00 A*%%RI 00000 0009.00 A*%%FS 001 0010.00 A*%%*********************************************************************** 0011.00 A 2 20 0012.00 A 'EMPLOYEE REPORT' 0013.00 A 4 5 0014.00 A 'EMPID' 0015.00 A 4 15 0016.00 A 'DATE' 0017.00 A 4 25 0018.00 A 'HOURS' 0019.00 A 4 35 0020.00 A 'PAY' 0021.00 A 4 45 0022.00 A 'STATUS' 0023.00 A 4 65 0024.00 A 'COMMENT' 0025.00 A*%%*********************************************************************** 0026.00 A*%%SS 0027.00 A*%%CL 002 0028.00 A*%%*********************************************************************** 0029.00 A R DETAIL 0030.00 A*%%*********************************************************************** 0031.00 A*%%RI 00000 0032.00 A*%%*********************************************************************** 0033.00 A SKIPA(002) 0034.00 A SPACEB(001) 0035.00 A EMPIDP 6A 5 0036.00 A DATEP 10A 14 0037.00 A HOURSP 2A 25 0038.00 A PAYP 3A 35 0039.00 A STATUSP 20A 45 0040.00 A COMMENTP 20A 65 0041.00 A SPACEA(001) 0042.00 A*%%*********************************************************************** 0043.00 A*%%SS 0044.00 A*%%CL 001 0045.00 A*%%*********************************************************************** 0046.00 A R MESSAGE 0047.00 A*%%*********************************************************************** 0048.00 A*%%RI 00000 0049.00 A*%%*********************************************************************** 0050.00 A SPACEB(001) 0051.00 A 20 0052.00 A 'NO RECORDS FOUND' 0053.00 A*%%*********************************************************************** 0054.00 A*%%SS 0055.00 A*%%*********************************************************************** 0056.00 A R FOOTER 0057.00 A*%%*********************************************************************** 0058.00 A*%%RI 00000 0059.00 A*%%*********************************************************************** 0060.00 A SPACEB(001) 0061.00 A 20 0062.00 A '********END OF THE REPORT********' 0063.00 A*%%*********************************************************************** 0064.00 A*%%SS 0065.00 A*%%***********************************************************************
    770 pointsBadges:
    report
  • philpl1jb
    In the f spec for the printer file add the keyword OFLIND(*IN60) this assigns the overflow indicator the indicator number can be any indicator form 1 to 99. In your code you would have: If *IN60; except heads <-- the heads record begins with a skipb (2) ..which will move you to row two (on the next page unless you were on line 1. endif Phil except detail
    50,860 pointsBadges:
    report
  • philpl1jb
    belay that, matty! with an external printer file EXFMT should be WRITE. but you knew that.! lihP
    50,860 pointsBadges:
    report
  • philpl1jb
    that would be the excepts that shold be writes!!! exfmts have nothing to do with printers. Two senior moments in a row, And I don't start to collect ssn until ..oh I forget. .
    50,860 pointsBadges:
    report
  • CharlieBrowne
    Here are a couple of links with sample code http://www2.systeminetwork.com/resources/clubtech/TNT400/bo400ng/AS400Q0225.htm http://www.code400.com/forum/showthread.php/4574-using-RLU-in-RPG-logic-cycle
    41,380 pointsBadges:
    report
  • TomLiotta
    I guess OVERFLOW indicator can only be use in the Program-defined Printer Files. An OVERFLOW indicator is valid for externally-described printer files. Any problem would be in how it is used to condition your instructions. We need to see examples of code. Tom
    125,585 pointsBadges:
    report
  • ankit2002
    [...] 5. CharlieBrown, TomLiotta, and Philpl1jb work together to create an AS/400 printer file with too many records. [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following