Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRTF vs O-specs

Status
Not open for further replies.

Ju5

Programmer
May 25, 2007
85
PH
Which is better and which is best practice?

I've never used PRTF before and the client I used to work for used O-specs in their programs. Most of their printouts are only used by one program so PRTF weren't used.

When do you use PRTF? Ever worked with multiple programs that shared one PRTF?
 
It's considered best practice to use PRTF if you are doing new development or making significant changes to an application that warrants converting from O-specs. O-specs were the only way back in the early days (1960's & 1970's) of RPG. There was no such thing as externallly described files.

 
I've read in some forums that PRTF allows date and time printing without needing to code it. Is there anything else that can be done in PRTF that can't be done in O-specs?

Can you use indicators located in a PRTF inside a rpg program? For example: Print one line if an indicator is on and print another line if it is off.

Do you define O-specs and PRTF the same way in F-specs? i.e.:
FQSYSPRT O PRINTER
 
I've read in some forums that PRTF allows date and time printing without needing to code it. Is there anything else that can be done in PRTF that can't be done in O-specs?

Page numbers are automatic as well. I don't remember anything else at this time.

Can you use indicators located in a PRTF inside a rpg program? For example: Print one line if an indicator is on and print another line if it is off.

Yes. Indicators can be used.

Do you define O-specs and PRTF the same way in F-specs? i.e.:FQSYSPRT O PRINTER
You use the E to indicate an external file.

Code:
FMYFILE    O    E             PRINTER

A PRTF is an externally-described file much like a DSPF and PF. I use option 19 in SEU to design a report. It creates the printer file when you exit with F3. This is IBM's built-in report editor. It's not very user-friendly but you don't have to pay extra for it.
 
How do you use a PRTF inside an RPG Program? Can you still use EXCPT #record or do you use WRITE record?

Would appreciate it if anyone can show how to use PRTFs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top