Just wanted to post something
Convert date to Julian in CLP
The following is an alternative program that uses the ILE bindable API, Get
Current Local Time (CEELOCT), to convert a date to Julian format. To create this
program, you must use the CRTBNDCL command alone or the CRTCLMOD
command and the CRTPGM command together.
PGM
DCL &LILDATE *CHAR LEN(4)
DCL &PICTSTR *CHAR LEN(5) VALUE(YYDDD)
DCL &JULDATE *CHAR LEN(5)
DCL &SECONDS *CHAR 8 /* Seconds from CEELOCT */
DCL &GREG *CHAR 23 /* Gregorian date from CEELOCT */
/* */
CALLPRC PRC(CEELOCT) /* Get current date and time */ +
PARMS (&LILDATE) /* Date in Lilian format */ +
&SECONDS /* Seconds field will not be used */
&GREG /* Gregorian field will not be used */
*OMIT /* Omit feedback parameter so exceptions +
are signalled */
CALLPRC PRC(CEEDATE) +
PARMS (&LILDATE) /* Todayâ??s date */ +
&PICTSTR /* How to format */ +
&JULDATE /* Julian date */ +
*OMIT
ADDPGM LIB1/FILEX MBR(â??MBRâ?? *CAT &JULDATEâ??)
ENDPGM
Convert date to Julian in CLP
The following is an alternative program that uses the ILE bindable API, Get
Current Local Time (CEELOCT), to convert a date to Julian format. To create this
program, you must use the CRTBNDCL command alone or the CRTCLMOD
command and the CRTPGM command together.
PGM
DCL &LILDATE *CHAR LEN(4)
DCL &PICTSTR *CHAR LEN(5) VALUE(YYDDD)
DCL &JULDATE *CHAR LEN(5)
DCL &SECONDS *CHAR 8 /* Seconds from CEELOCT */
DCL &GREG *CHAR 23 /* Gregorian date from CEELOCT */
/* */
CALLPRC PRC(CEELOCT) /* Get current date and time */ +
PARMS (&LILDATE) /* Date in Lilian format */ +
&SECONDS /* Seconds field will not be used */
&GREG /* Gregorian field will not be used */
*OMIT /* Omit feedback parameter so exceptions +
are signalled */
CALLPRC PRC(CEEDATE) +
PARMS (&LILDATE) /* Todayâ??s date */ +
&PICTSTR /* How to format */ +
&JULDATE /* Julian date */ +
*OMIT
ADDPGM LIB1/FILEX MBR(â??MBRâ?? *CAT &JULDATEâ??)
ENDPGM