IBMi (AS400) fans only * How to print with a externally described printer file
This is a wery simple example How to print with a externally described printer file
Member Type
First of all look at this post and compile and populate these files to use this example.
Then copy e compile the following sources.
Member Type
PRTCUSTP PRTF
*************** Beginning of data *****************************
A REF(*LIBL/CLANA00F)
A R HEADER
A SKIPB(01)
A 18'CUSTOMER NUMBER:'
A CLCCL0 R O + 1
A SPACEA(1)
A R DETAIL
A CLNOM0 R 001
A SPACEA(1)
Member Type
PRTCUST RPGLE
*************** Beginning of data ****************************
**FREE
// ********************************************
// RPG Free Format Minimalist example *
// How to print with a externally described *
// printer file *
// Parameters: *
// ppCCL0 7:0 Customer code *
// ********************************************
// CALL PGM(PRTCUST) PARM(X'0000001F') *
// ********************************************
ctl-opt DFTACTGRP(*NO);
dcl-f CLANA01L keyed;
dcl-f PRTCUSTP printer;
// PARAMETRI RICEVUTI (EX *ENTRY PLIST PARM)
dcl-pi PRTCUST;
ppCCL0 packed(7:0);
end-pi;
chain (ppCCL0) CLANA01L;
write HEADER;
write DETAIL;
*inlr = *on;
I appreciate all the comments made on this blog.
Excellent !
ReplyDelete