MordernRPGSoldier
MordernRPGSoldier

Reputation: 83

How to view Printer file contents during debug (in IBM i)

I am working on a program where there is a Program described Printer file(and this is the first time I've been blessed with a Printer file assignment :P) as shown below:

fPrnfnam  O    F  155        Printer oflind(*INOF)

I cant post the entire Printer file definition as it has my company specific details such as names, manufacturing codes etc.

The program seems to print parts of the Printer file using the Except Op-Code. For example, the below portion is output using a statement like Except DetL.

O          E            DetL           1
o                       sday                 8
o                       sdat          y     14
o                       day(1)         b    25 '    ,   -'
o                       day(2)         b    35 '    ,   -'
o                       day(3)         b    45 '    ,   -'
o                       day(4)         b    55 '    ,   -'
o                       day(5)         b    65 '    ,   -'
o                       day(6)         b    75 '    ,   -'
o                       day(7)         b    85 '    ,   -'
o                       day(8)         b    95 '    ,   -'
o                       day(9)         b   105 '    ,   -'
o                       day(10)        b   115 '    ,   -'
o                       day(11)        b   125 '    ,   -'
o                       day(12)        b   135 '    ,   -'
o                       day(13)        b   145 '    ,   -'
o                       day(14)        b   155 '    ,   -'

I am not sure if this would be possible, but what I want to know is if it would be possible to see how the printer file contents are populated during runtime (i.e. when I am running in Debug). Something similar to what we can do a PF (see individual records being written during run time). Why I am looking to find out a method to do this is to understand how the Printer file gets built during the program run dynamically.

Upvotes: 0

Views: 807

Answers (1)

jmarkmurphy
jmarkmurphy

Reputation: 11473

Sure, just stop execution at the except, and view the variables. You can't see the output line itself, but you can see the values. BTW, this isn't a printer file, it is o-specs. A printer file uses the traditional WRITE op code to output. Printer files are a bit more capable that o-specs in that they can print bar codes, lines, different fonts, colors, etc.

Upvotes: 1

Related Questions