× 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: Write to printer working strange in subprocedure
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Fri, 2 Apr 1999 11:29:49 -0500

I am having a situation in where I can write a line to the printer file and 
only one of the values prints.

...
FXSNL01    O    E             DISK                 
FPLSORDO   O    E             PRINTER OFLIND(*IN80)
...
D DoNotes         PR                                      
D  Note01                             CONST like(dsphnt01)
D  PrintOnAck                         CONST like(snprt)   
D  PrintOnPick                        CONST like(snpic)   
D  PrintOnInvoic                      CONST like(sninv)   
D  PrintOnStmt                        CONST like(snstmt)  
...
D NoteHdg         S              6A   inz('Notes:') 
D Note01          s                   like(dsphnt01)
...
C                   Eval      NoteHdg = 'Notes:'
...
C                   CallP     DoNotes(phpjn:'Y':'Y':'Y':'Y')
...
 /eject                                                   
P DoNotes         B                                       
D DoNotes         PI                                      
D  note01                             like(dsphnt01) CONST
D  PrintOnAck                         CONST like(snprt)   
D  PrintOnPick                        CONST like(snpic)   
D  PrintOnInvoic                      CONST like(sninv)   
D  PrintOnStmt                        CONST like(snstmt)  
                                                          
C                   If        note01<>*blanks             
C                   eval      SNSEQ = SNSEQ + 1           
C                   setoff                                       50
C                   If        echrecord                   
C     esnkey        klist                                
C                   kfld                    SNTYPE       
C                   kfld                    SNCUST       
C                   kfld                    SNSHIP       
C                   kfld                    SNSEQ        
C     esnkey        chain(e)  esnl02                     
C                   if        %error or esnsndesc<>note01
C                   seton                                        50
C                   endif                                
C                   endif                                
C                   if        bpcsorder                  
C                   eval      sndesc=note01              
C                   eval      snprt=PrintOnAck           
C                   eval      snpic=PrintOnPick          
C                   eval      sninv=PrintOnInvoic        
C                   eval      snstmt=PrintOnStmt
C                   write(e)  IPX100SN          
C                   If        %error            
C                   eval      FileStatus=%status
C                   Callp     OXOF              
C                   write     oxxsnw            
C                   EndIf                       
C                   EndIf                       
C                   callp     oof               
C                   write     onotes            
 * During debug NOTE01 has a value here.
C                   eval      notehdg=*blanks   
C                   endif                       
                                                
P DoNotes         E                             

File xsnl01 is successfully updated and snprt and the rest have values in them.
File PLSORDO is written and I see that word 'Notes:' at the left.  But I do NOT
see the value within NOTE01, it's blank.
The only warning messages in my compile is variables not used and that RPG 
handles 
blocking.
There were no warning errors in my printer file compile.  Which looks like:
...
R ONOTES                                           
  NOTEHDG        6A        1TEXT('Notes:')         
  NOTE01    R              9REFFLD(PLNT01 PLORDDL1)
                            SPACEA(1)              



Rob Berendt, CCP

Group Dekko Services, LLC
Dept 01.073
Rob Berendt, CCP
PO Box 2000
6928N-400E, Dock 108
Kendallville IN 46755
Voice:  219-347-3100 ext 70560
Fax:    219-349-2005
email:  rob@dekko.com

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.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.