× 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: Retrieving Spool File Name in RPG
  • From: Jon Erickson <jerickson@xxxxxxx>
  • Date: Wed, 24 May 2000 09:23:05 -0700

If you're refering to a spoolfile name within the same RPG program, you can
use the INFDS on the F spec.  E.G. Clipped from RPGLE Ref Manual


   |   FMYFILE    O    F  132        PRINTER INFDS(OPNFBK)
| 
   |
DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++C
omments++++++++++  | 
   |   DOPNFBK           DS
| 
   |   D ODP_TYPE               81     82
* ODP Type          | 
   |   D FILE_NAME              83     92
* File name         | 
   |   D LIBRARY                93    102
* Library name      | 
   |   D SPOOL_FILE            103    112
* Spool file name   | 
   |   D SPOOL_LIB             113    122
* Spool file lib    | 
   |   D SPOOL_NUM             123    124I 0
* Spool file num    | 
   |   D RCD_LEN               125    126I 0
* Max record len    | 
   |   D KEY_LEN               127    128I 0
* Max key len       | 
   |   D MEMBER                129    138
* Member name       | 
   |   D TYPE                  147    148I 0
* File type         | 
   |   D ROWS                  152    153I 0
* Num PRT/DSP rows  | 
   |   D COLUMNS               154    155I 0
* Num PRT/DSP cols  | 
   |   D NUM_RCDS              156    159I 0
* Num of records    | 
   |   D ACC_TYPE              160    161
* Access type       | 
   |   D DUP_KEY               162    162
* Duplicate key?    | 
   |   D SRC_FILE              163    163
* Source file?      | 
   |   D VOL_OFF               184    185I 0
* Vol label offset  | 
   |   D BLK_RCDS              186    187I 0
* Max rcds in blk   | 
   |   D OVERFLOW              188    189I 0
* Overflow line     | 
   |   D BLK_INCR              190    191I 0
* Blk increment     | 
   |   D FLAGS1                196    196
* Misc flags        | 
   |   D REQUESTER             197    206
* Requester name    | 
   |   D OPEN_COUNT            207    208I 0
* Open count        | 
   |   D BASED_MBRS            211    212I 0
* Num based mbrs    | 
   |   D FLAGS2                213    213
* Misc flags        | 
   |   D OPEN_ID               214    215
* Open identifier   | 
   |   D RCDFMT_LEN            216    217I 0
* Max rcd fmt len   | 
   |   D CCSID                 218    219I 0
* Database CCSID    | 
   |   D FLAGS3                220    220
* Misc flags        | 
   |   D NUM_DEVS              227    228I 0
* Num devs defined  | 
   

HTH,
> Regards,
> Jon A. Erickson
> Sr. Programmer Analyst
> 800.COM Inc.
> 1516 NW Thurman St
> Portland, OR  97209-2517
> 
> Direct: 503.944.3613
> Fax: 503.944.3690
> Web: http://800.com
> 


-----Original Message-----
From: Arlene M Soderlund [mailto:Arlene_M_Soderlund/NFCNA.COM@nfcna.com]
Sent: Wednesday, May 24, 2000 7:29 AM
To: RPG400-L@midrange.com
Subject: Re: Retrieving Spool File Name in RPG








Now, I realise I could use one of the Spool file API's retrieve a list of
the spool files for the job and search for a spool file with a matching
spool file number but this seums an unnecessary amount of work to go to. I
would have thought that the information I want is relatively easily
obtained from somewhere within the RPG.

Does anyone have any thoughts on how I would accomplish this ?

Regards
Evan Harris

Either use QCMDEXC or a bound CLLE.


Printer File is not Opened  it is under USER control

Define an array at the Bottom of your program

Move your User DATA in the array


PRTOPN    IFEQ YES
          CLOSEPRINTER
          MOVE NO        PRTOPN
          ENDIF

CALL 'QCMDEXC' CHGPRT

PRTOPN    IFEQ NO
          OPEN PRINTER
          MOVE YES       PRTOPN
          ENDIF




OVRPRTF  FILE(----------)  TOFILE(----------)  OUTQ(----------)
USRDTA(----------) SECURE(*YES)



ILE  even easier   ........

Printer is Open is still controlled in RPG

Bind in a CLLE  that does the ovrprtf with a callb

Pass in your Parmeters, for file, tofile outq, & usrdta and anything else.















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