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




On Tue, 31 Jan 2006, John Candidi wrote:

ME=MONTHEND.I want to start the library name with that


So for the January monthend, you'd like the library to be named ME200601?
I'd do that as follows:

/* NOTE:  This is ILE CL. Source type is CLLE (not CLP!)          +
                                                                  +
    To Compile:                                                   +
           CRTBNDCL PGM(ENDOFMON) SRCFILE(xxx/xxx)                */
PGM

    DCL VAR(&LILIAN)   TYPE(*CHAR) LEN(4)
    DCL VAR(&NOTUSED1) TYPE(*CHAR) LEN(8)
    DCL VAR(&NOTUSED2) TYPE(*CHAR) LEN(23)
    DCL VAR(&YYYYMM)   TYPE(*CHAR) LEN(6)
    DCL VAR(&LIBNAME)  TYPE(*CHAR) LEN(8)

    /* Get the Year & Month from 15 days ago.  For example, if    +
       today is Jan 5, 2006 get 200512, if today is Feb 16 2006, +
       get 200602 */

    CALLPRC PRC(CEELOCT) PARM(&LILIAN &NOTUSED1 &NOTUSED2 *OMIT)
    CHGVAR VAR(%BIN(&LILIAN)) VALUE(%BIN(&LILIAN) - 15)
    CALLPRC PRC(CEEDATE) PARM(&LILIAN 'YYYYMM' &YYYYMM *OMIT)
    CHGVAR VAR(&LIBNAME) VALUE('ME' *CAT &YYYYMM)

    /* Create the "End of Month" library */

    CRTLIB LIB(&LIBNAME)

ENDPGM


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.