|
I read too much into the manual prohibition -
Note:
Indicators *INOA through *INOG, and *INOV are not valid for externally described files.
I thought it was the keyword itself, not the indicator I was trying to use. I didn't try 01-99
Thanks for the information, I had looked through several manuals for a decent explanation of the overflow on EXT files,
but didn't find much.
Figured the CL had to specify a valid queue.
In this case the program had already ended. I thought it would not let me look at the spool
entry because it had junk in it. Or perhaps it was empty.
I>>> charles.wilt@xxxxxxxxx 7/10/2009 1:27:38 PM >>>
1) You don't have an OFLIND keyword on the printer file's f-spec to
specify an indicator to be used to indicate overflow.
2) Why are you doing an OVRPRTF TOFILE() on the CL?
Once you have the overflow indicator defined, you simply check it
before printing to determine when you've gotten to the overflow line
and if so you write your headings again to get to the next page.
If you're trying to look at an open spool file, ie. while the program
is still running, the OS often won't allow you to do so until a few
pages have been written. I believe this is because the output is
buffered which means the data isn't immediately in the actual spool
file.
HTH,
Charles
On Fri, Jul 10, 2009 at 1:54 PM, Buddy
McClean<Buddy.McClean@xxxxxxxxxxxx> wrote:
Good Day,--
I am just starting on Externally described print files and my first attempt is not very satisfying.
The code below prints generic heading and then detail lines (if any).
The 'Write HEAD' executes but apparently is writing something weird. If I 'Write Head' enough times to trigger overflow, I get a
halt that tells me I did, but I suppose failed to handle it properly. So it writes something.
If I have detail - the detail prints fine and when I look at the spool entry - no output visible by 'write head'.
If I have no detail ( but 'write head' executes ) - the spool file exists but it won't let me browse, print, or copy the entry. I assume it put out
something - trash maybe.
In Addition, If anyone could point me to a good explanation of handling overflow, that would be nice.
Thanks
H DftActGrp(*No) ActGrp(*Caller)
H*Debug(*No) Optimize(*Basic)
H Debug Optimize(*None)
H InDent('>') Text(*SrcMbrTxt)
H Option(*NoXref :*NoShowCpy : *NoExpDDS : *Ext : *Showskp :
H *NoDebugIO)
0004 FPOMASTER IPE E K Disk
0003 FPOASN IF E K DISK
0005 FTST117PRT O E PRINTER
0019 D RecDate S D INZ(*SYS)
0019 D TodayDate S D Inz(*SYS)
D ASNPo S Like(PAPon)
D ASNItem S Like(PAItem)
D EOFASN S N
* below in lieu of ext desc print file
D*ponum S 5 0
D*item S 5 0
D*line S 3
D*part S 30
D*qtyleft S 5 0
D*ORDN S 10
D*ASNDAT S L Datfmt(*MDY)
D*firm S 15
D*asnqty S 5 0
D once S N
IPORec1 01
/FREE
// Eval once = *On;
if not Once;
Eval once = *On;
write HEAD;
endIf;
If *IN01 and
PODEL = ' ' and
POLnk = 0 and
PORDat > 0;
//
// CONVERT Rec Date
//
Eval RecDate = %Date(PORDat:*CMDY);
//
// Find Matching date and print po heading
//
If RecDate = TodayDate and
(POQty - POQtr) > 0;
Eval Ponum = POPon;
Eval Item = POItm;
Eval Line = POLin1;
Eval Part = POPrt1;
Eval QtyLeft = POQty - POQtr;
Write PODetail;
//
// Read POASN to find matching entry
//
Eval ASNPO = PoPon;
Eval ASNItem = PoItm;
Setll(E)KeyASN POASN;
Eval EOFASN = *Off;
Dow Not EOFASN;
Read POASN;
If %Error or %EOF;
Eval EOFASN = *On;
Iter;
EndIf;
If PAPon <> PoPon or
PAItem <> PoItm;
Eval EOFASN = *On;
Iter;
EndIf;
//
// Print ASNDetail for Matching PO/Item
//
Eval OrdN = PAOrdN;
Eval AsnDat = PADate;
Eval Firm = PAFirm ;
Eval ASNQty = PAQty;
Write ASNDetail;
EndDo;
EndIf;
EndIf;
/End-free
CSR *INZSR Begsr
C KeyASN KList
C KFLD ASNPo
C KFLD ASNItem
C EndSr
PRTF
A*%%TS DD 20090709 162645 buddy REL-V5.0.1 WDSc
A*%%PR 2066132I
A*%%EC
A* CRTPRTF FILE(MARR/OPN117PRT) SRCFILE(MARR/QRPGLESRC) SRCMBR(OPN117PRT) D
A* OPTION(*EVENTF) PAGESIZE(66 80 *ROWCOL) REPLACE(*YES)
A*
A R HEAD SKIPB(02) SKIPA(05)
A*%%TS DD 20090630 110016 buddy REL-V5.0.1 WDSc
A*%%RI 00000
A 4' OPN117'
A 43'Daily ASN Report'
A* 70DATE
A* EDTCDE(Y)
A* SPACEA(1)
A* 4'P.O. Number'
A* UNDERLINE
A* 17'Item'
A* UNDERLINE
A* 25'Line'
A* UNDERLINE
A* 35'Part Number'
A* UNDERLINE
A* 66'Qty Remaining'
A* UNDERLINE
A R PODETAIL
A*%%TS DD 20090630 110016 buddy REL-V5.0.1 WDSc
A*%%RI 00000
A PONUM 5 0O 5EDTCDE(3)
A ITEM 5 0O 17EDTCDE(3)
A LINE 3 O 26
A PART 30 O 32
A QTYLEFT 5 0O 70EDTCDE(3)
A SPACEA(1)
A R ASNDETAIL
A*%%TS DD 20090709 162645 buddy REL-V5.0.1 WDSc
A*%%RI 00000
A 5'Order# -'
A ORDN 10 O 14
A 26'Date -'
A ASNDAT L O 33TEXT('ASN Date')
A DATFMT(*MDY)
A 44'Firm -'
A FIRM 15 O 51
A 67'Qty -'
A ASNQTY 5 0O 73EDTCDE(3)
A SPACEA(2)
CL
OVRPRTF FILE(TST117PRT) TOFILE(QPRINT) DEV(P2)
CALL TST117
DLTOVR FILE(*ALL)
ENDPGM
Buddy McClean
IT Director
Ext 106
Marr Bros Inc
214.948.7387
1.800.627.7276
Ext 106
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.