× 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.


  • Subject: Re: [RE: Reprinting Invoices]
  • From: Bill Robins <BillZBubb@xxxxxxxxxxxx>
  • Date: 10 Aug 99 14:51:13 PDT

"Wayne Sheehan" <wayne.sheehan@powerbar.com> wrote:
We have a requirement to reprint many invoices . . .

Wayne, here is the CL we use in our 4.0.5 CD environment.  Hope you know SQL. 
The overview of the program is to gather a list of invoice numbers according
to whatever criteria is required.  In this example, every invoice created on
March 4.

---------------------------------------

             PGM                                                      
                                                                      
             DCLF       FILE(RERUNINVCS)                              
             DCL        VAR(&STMT) TYPE(*CHAR) LEN(22)                
                                                                      
             RUNSQLSTM  STM('create table mislib/reruninvcs (icust +  
                          char(6), hodpx char(2), invn char(8), +     
                          hodtp char(1), hodyr char(4), icomp +       
                          char(2))')                                  
             MONMSG     MSGID(CPF0000)                                
                                                                      
             CLRPFM     FILE(RERUNINVCS)                              
                                                                      
             RUNSQLSTM  STM('insert into reruninvcs select +          
                          digits(sicust), ihodpx, digits(siinvn), +   
                          digits(ihodtp), digits(ihodyr), +           
                          digits(sicomp)  from sih   where +          
                          siinvd = 19990304')                         
                                                                      
 RDLOOP:                                                              
             RCVF                                                    
             MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDLOOP))    
                                                                     
/* SET UP THE LDA WITH THE DOCUMENT INFO - THE 1 MEANS DON'T SUBMIT +
       TO BATCH */                                                   
                                                                     
             CHGVAR     VAR(&STMT) VALUE(&icust *cat &hodpx *cat +   
                          &invn *cat &hodtp *cat &hodyr *cat &icomp +
                          *cat '1')                                  
             CHGDTAARA  DTAARA(*LDA (20 22)) VALUE(&STMT)            
             CALL       PGM(BIL561C)                                 
                                                                     
             GOTO       CMDLBL(RDLOOP)                               
 endloop:                                                            
             ENDPGM                                                  

-----------------------------------------------------------------

It's just an automated call to the Invoice reprint program.  Be aware if you
don't know it already that the reprinted invoice doesn't always look exactly
like the original (the quanitites and dollars are okay, usually problems with
shipping information or customer contact).

Bill
+---
| This is the BPCS Users Mailing List!
| To submit a new message, send your mail to BPCS-L@midrange.com.
| To subscribe to this list send email to BPCS-L-SUB@midrange.com.
| To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: dasmussen@aol.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.