HOW TO MAKE A PRTFILE - COBOL CODE
180 pts.
0
Q:
HOW TO MAKE A PRTFILE - COBOL CODE
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: Oct 28 2009  4:55 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
6350 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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.
Last Answered: Oct 28 2009  7:57 PM GMT by CharlieBrowne   6350 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Sylvana   180 pts.  |   Oct 28 2009  7:34PM GMT

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.

 

TomLiotta   7620 pts.  |   Oct 28 2009  8:28PM GMT

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

 

Sylvana   180 pts.  |   Nov 4 2009  4:13PM GMT

does exist a method to create a prtfile like sda for a display file?
please i need to create the reg.

thank you

sylvana

 

CharlieBrowne   6350 pts.  |   Nov 4 2009  6:15PM GMT

Yes, Report Layout Utility RLU
You can do a STRRLU

 

Sylvana   180 pts.  |   Nov 4 2009  8:53PM GMT

DO YO HAVE ANY EXAMPLE TO DO THIS

 

Sylvana   180 pts.  |   Nov 4 2009  9:22PM GMT

thank you CharlieBrowne.

sylvana

 
0