RPG O-specs vs. PRTFs

  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

From: Ed Smith To: All

Are there any opinions on when external printer files (attribute PRTF) are better suited for reports then RPG O-specs? I've used external printer files a few times and I'm still getting accustomed to RLU, but I have to fight off the urge to return to familiar ground.

From: Marc Salvatori To: Ed Smith

By and large, I prefer external printer files. Like display files, they are separately compiled. They offer a wide range of fonts and, with RLU, give you something to look at before compiling. One major drawback still exists; you can't use arrays in external printer files.

From: Ed Smith To: Marc Salvatori

How do you handle control groups? For instance, say you want a customer name or account title on the first line of a group. Since you can't use the L1 indicator in the DDS, at L1 total-time, I turn indicator 71 on. When L1 is off at detail-time, I turn 71 off. I still use the cycle for that kind of report.

From: Marc Salvatori To: Ed Smith

I define separate record formats for level breaks and headers. For example, look at 8.

I define separate record formats for level breaks and headers. For example, look at Figure 8.

As you can see, like display files, you must explicitly write a record to produce output.

What I like most about external printer files is the various fonts I can use together on one line or page. It also helps to have an IPDS printer like our 3816. Since my terminal doesn't provide a WYSIWYG display for printing, placement of these fonts is tricky at best. It takes patience, but can be worth the effort. I used it to put together a forecast worksheet for our sales team; it's almost as good as a more expensive, preprinted form.

Print files allow you to emphasize certain fields on a report. For example, we use a larger, bolder font for part numbers on our work order pick lists.

RPG O-specs vs. PRTFs

Figure 8 External Printer File Control Break Handling

 *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 C FSTIME IFNE 'N' FIRST TIME C *INOF OREQ *ON OVERFLOW C MOVE 'N' FSTIME 1 C WRITEHEADER C ENDIF * C *INL1 IFEQ *ON C WRITECUSHDR CUST HEADER C ENDIF C WRITECUSDTL DETAIL RECORD CL1 WRITECUSSUM SUMMARY TOTAL *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8