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



Hi Peter

I don't suppose the QMQRY definitions explicitly specify the library as
QTEMP do they ?

In my experience this may cause problems where the initial query specifies
*LIBL for the file to be created and the file ends up created in whatever
the *CURLIB is.

Subsequent queries expecting (and specifying) QTEMP as the files library
will fail.

Hope this helps

Regards
Evan Harris

>"Sounds as if you may be submitting 4 jobs and not one.  4 jobs mean 4
>different QTEMPs.  If that's what is happening, wrap them all in a single CL
>and submit that."
>
>That is true Buck; however, I have just one job doing this four tasks:
>
>START:      PGM        PARM(&TDATE)
>
>DCL        VAR(&TDATE) TYPE(*CHAR) LEN(6)
>DCL        VAR(&TRN_DATE) TYPE(*CHAR) LEN(7)
>
>CVTDAT     DATE(&TDATE) TOVAR(&TRN_DATE) FROMFMT(*MDY) +
>                          TOFMT(*CYMD) TOSEP(*NONE)
>
>FI041Q1:    STRQMQRY   QMQRY(FI041Q1) ALWQRYDFN(*ONLY) +
>                          SETVAR((TRN_DATE &TRN_DATE))
>FI041Q2:    STRQMQRY   QMQRY(FI041Q2) ALWQRYDFN(*ONLY) +
>                          SETVAR((TRN_DATE &TRN_DATE))
>FI041Q3:    STRQMQRY   QMQRY(FI041Q3) ALWQRYDFN(*ONLY) +
>                          SETVAR((TRN_DATE &TRN_DATE))
>
>FI041Q4:    RUNQRY     QRY(FI041Q4)
>
>END:        ENDPGM
>
>When FI041Q2 runs, it is expecting to have file FI041Q2F as the input file but
>is not there.  However, if I run the query interactively (with the values), it
>runs OK.  I also did another test (as I mentioned before) and I am using now a
>work library ( I named it PETERTEST) to create the work files there and ... is
>working OK (batch and interactive)!
>
>To respond to somebody's idea, I cannot create the files from the STRQMQRY
>command neither because I want to keep using the different report summary
>functions that are defined on the queries.  If I do that on the command, I
>will
>loose that.
>
>PETER VIDAL



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.