×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
It looks like everything in your 'HEAD' is commented out, except the first
2 lines.
Thanx,
Nick
Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx
"Buddy McClean" <Buddy.McClean@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/10/2009 01:03 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
<rpg400-l@xxxxxxxxxxxx>
cc
Subject
Ext Print Files - In the Beginning
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;
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
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: Ext Print Files - In the Beginning *SPAM: 4*, (continued)
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.