HOW TO MAKE A PRTFILE – COBOL CODE

185 pts.
Tags:
AS/400
COBOL certifications
HI,

THANK you very much, your opinions always are good. In fact i found one right.

However i havea point  and i'd like to check.

how to make a cobol program using a prtfile? 

 

Regards.

Sylvana :)



Software/Hardware used:
AS400
ASKED: October 28, 2009  4:55 PM
UPDATED: November 4, 2009  9:22 PM

Answer Wiki

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

Sylvana
Recently you asked how to make a PRTF on AS400
And another question was how to use a DSPF in a COBOL program.
If you would please review those two answers, you would have your anser to this question.
1. Create your printer file.
2. In your COBOL program you wouyld do WRITES to the PRTF Formats.

Here is a sample of assigning a printer in COBOL
SELECT ACH-REPORT-FILE ASSIGN TO PRINTER-ACHRPT.

Discuss This Question: 6  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
  • Sylvana
    i have a printer file already, but i don't know how to send to the printer everything i see in dspfile. do you get it? thanks . Sylvana.
    185 pointsBadges:
    report
  • TomLiotta
    It will depend on how you defined your printer file. If you defined appropriate record formats, then you'd READ from the display file, MOVE field values from the display fields into the printer format fields, and WRITE the printer file format(s). Assuming that you have correctly created your printer file, you SELECT it as:
    SELECT ACH-REPORT-FILE ASSIGN TO FORMATFILE-ACHRPT.
    You might have one format that describes all of the header lines on your report, another format that defines a detail line on your report, maybe another format that defines total lines. Or you might define a single format in your printer file that defines all of the fields on the entire page. If your page is supposed to represent the fields on a display screen, then maybe a single printer file format is appropriate. If your printer file has detail lines to list more than one detail item: You WRITE once to print the header format. This format should define all lines that appear at the top of the page. You then WRITE once for each detail line format that you want to print. Use the WRITE ... END-OF-PAGE option if you want to use your printer file page-length to control execution of printing the next page header. This is probably done in a loop, once for each time you print a detail format. When you've printed all detail lines in the group, WRITE any total format that you defined. Before issuing a WRITE, MOVE any values into the format fields if you want the values to print. Regardless, if we don't know how you defined your printer file, we can't say how to print it. Tom
    125,585 pointsBadges:
    report
  • Sylvana
    does exist a method to create a prtfile like sda for a display file? please i need to create the reg. thank you sylvana
    185 pointsBadges:
    report
  • CharlieBrowne
    Yes, Report Layout Utility RLU You can do a STRRLU
    39,815 pointsBadges:
    report
  • Sylvana
    DO YO HAVE ANY EXAMPLE TO DO THIS
    185 pointsBadges:
    report
  • Sylvana
    thank you CharlieBrowne. sylvana
    185 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