|
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 mailing list archive is Copyright 1997-2025 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.