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



Evan Harris wrote:

>>Anyway, an option might be to make the printer files 
>>USROPN and do an override in *INZSR through 
>>QCMDEXC (or system()) before opening.
>
>I understand that it can be done this way. My 
>question was did anyone know  if there was 
>a simple method to retrieve the spool file 
>name from within an RPG. 

Evan,

DPrintInfds       ds     
D File              *FILE
D FILE_NAME              83     92
D LIBRARY                93    102
D SPOOL_NUM             123    124I 0 
D ROWS                  152    153I 0 
D COLUMNS               154    155I 0 
D OVERFLOW              188    189I 0
D CUR_LINE              367    368I 0
D CUR_PAGE              369    372I 0
D PRT_MAJOR             401    402   
D PRT_MINOR             403    404   

The file named on your F spec can be found in File, and the file actually
opened can be found in FILE_NAME and LIBRARY.  SPOOL_NUM contains the
spooled file number (SPLNBR parameter on CPYSPLF).  ROWS contains the page
length and COLUMNS the width.  CUR_LINE and CUR_PAGE refer to the actual
page and line number as of the most recent I/O.

If you are curious, you can see the spooled file as it is stored in QSPL by
inspecting these areas, but as Al says "It's not nice to fool with Mother
Nature"  (Look but do not touch!)
D SPOOL_FILE            103    112
D SPOOL_LIB             113    122
D MEMBER                129    138

Hope this is what you're after...

Buck Calabro
Aptis; Albany, NY
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| 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.