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



>I have an OUTQ defined specifically for
>emailing spool files

-snip-

>The thing is, if the print  file was defined with
>a SAVE attribute I want to still retain the file
>otherwise I simply remove the spoolfile from
>the system.

This second bit is the "want to do" bit, right?  One way to do this is to
use the USRDTA attribute of the spooled file.  You can use OVRPRTF to "tag"
the keepers, and QUSRSPLA could readily retrieve it.  Here's a snippet of
code from the old IBM TAA tools that does this using CL:

             DCL        &SPLF *CHAR LEN(10)
             DCL        &JOB *CHAR LEN(10)
             DCL        &USER *CHAR LEN(10)
             DCL        &JOBNBR *CHAR LEN(6)
             DCL        &SPLNBR *CHAR LEN(6)

             DCL        &DS *CHAR LEN(1000)
             DCL        &DSLEND *DEC LEN(9 0)
             DCL        &DSLENB *CHAR LEN(4)
             DCL        &QLFJOB *CHAR LEN(26
             DCL        &INTJOB *CHAR LEN(16
             DCL        &INTSPLF *CHAR LEN(16)
             DCL        &SPLNBRD *DEC LEN(9 0)
             DCL        &SPLNBRB *CHAR LEN(4)

             DCL        &USRDTA *CHAR LEN(10)

             CHGVAR     &QLFJOB (&JOB *CAT &USER *CAT &JOBNBR)  /* qual'd
job */

                        /* Determine SPLF number */
             IF         (&SPLNBR *EQ '*ONLY') DO /* ONLY */
             CHGVAR     &SPLNBRD 0
             GOTO       CVTSPLN
             ENDDO      /* ONLY */

             IF         (&SPLNBR *EQ '*LAST') DO /* LAST */
             CHGVAR     &SPLNBRD -1
             GOTO       CVTSPLN
             ENDDO      /* LAST */

                        /* If not *ONLY or *LAST, convert the nbr */
             CHGVAR     &SPLNBRD &SPLNBR

 CVTSPLN:    CHGVAR     %BIN(&SPLNBRB 1 4) &SPLNBRD

                        /* Use 1000 byte len for DS - Cvt to bin */
             CHGVAR     &DSLEND 1000
             CHGVAR     %BIN(&DSLENB 1 4) &DSLEND

             CALL       QUSRSPLA PARM(&DS &DSLENB 'SPLA0100' +
                          &QLFJOB &INTJOB &INTSPLF &SPLF &SPLNBRB)

 USRDTA:     CHGVAR     &USRDTA %SST(&DS 91 10)

Buck


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.