You are here:

AS400 Mid Range/How to change the attributes of a Program described Printer file

Advertisement


Question
Hello,

How to change the attributes of a Program described Printer file. I have a situation like this.
I am defining a printer file "Qprint" which is created in QGPL, inside RPGLE program. By default, the overflow line number is 60. I want to change it to 45. How can i do this.

I used CHGPRTF and OVRPRTF inside this RPGLE program, but its not working.
I used these commands thr' QCMDEXC API.

The parameters for these commands are like this:

CHGPRTF FILE(QGPL/QPRINT) OVRFLW(45)
OVRPRTF FILE(QGPL/QPRINT) OUTQ(QPRINT) OVERFLW(45)

Is anything wrong in these commands. Is there any other way to achieve this.
Please respond ASAP.

Thanks in Advance,
Prema


Answer
I control printer overflow by defining an INFDS for the printer file, with a field for line number.  Then I compare the line number to my preferred overflow line number and print headings.

LINE# IFGT 45
     WRITEHEADER
     END

There's nothing obviously wrong with your entries. Try using the CHGPRTF command, then recompile the program.

- Laird  

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.