Printer File query

425 pts.
Tags:
AS/400
I believe Printer File DDS will be written in the RPG source itself. In that case, what is the necessity in creating the Printer File by using command CRTPRTF? Actullay why the program is not taking care of the creating the PRTF object when is defined as Program Defined in F spec.

Software/Hardware used:
Iseries

Answer Wiki

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

The only time you need to CRTPRTF is if in your RPG program you use that file name and code it as ‘E” externally defined.
They you do WRITE to the formats that you coded in the DDS for the PRTF.
If you do not code your Printer as externally defined, then you use ‘O’ specs do produce your output.

===========================================================

The RPG compiler <b>does not</b> write the DDS into the RPG source. The compiler retrieves the attributes from the compiled printer file. If no printer file is compiled (with CRTPRTF), the RPG compiler can’t find the attributes. The RPG compiler has no idea where the DDS would be for a printer file.

This is the same for a disk file — the disk file must already be compiled. And display files must already be compiled. Printer files are no different.

That is what “externally described” files are all about. The descriptions are retrieved from compiled file objects.

A “program described” file has the description coded in the RPG source. The descriptions for those are not taken from the file objects.

The RPG compiler doesn’t create external file objects. File objects are created either by the DDS compiler or by a specific additional component such as SQL.

Tom

Discuss This Question:  

 
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

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