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



Frank,

Which release is your system on?

This works OK on mine (V5R3)
***********
PGM
DCL VAR(&F1) TYPE(*CHAR) LEN(6)
DCL VAR(&FJ) TYPE(*CHAR) LEN(7)
CHGVAR VAR(&F1) VALUE('123110')
CVTDAT DATE(&F1) TOVAR(&FJ) FROMFMT(*MDY) +
TOFMT(*LONGJUL) TOSEP(*NONE)
DMPCLPGM
ENDPGM
***********

It gives a correct value of '2010365'

Regards,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


On Wed, Dec 30, 2009 at 8:16 AM, <fbocch2595@xxxxxxx> wrote:


Hi Folks, Merry Christmas/Happy Hannukah...etc. and Happy New Year to all.

My company runs a CL pgm that has been running for many years that reads a
date file and converts it to julian but when converting 123110 the pgm is
returning CPF0555 due to 123110 being converted to invalid julian date
2010366. Has anyone seen this type of behavior b4 and how is it best
resolved?

Thanks, Frank


Display Spooled File
File . . . . . : QPJOBLOG
Page/Line 3/11

*NONE Command 12/30/09 05:00:00.292320 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 004F
Message . . . . : 8500 - CVTDAT
DATE('122410') TOVAR(&HOLJUL)
FROMFMT(*MDY) TOFMT(*LONGJUL)
TOSEP(*NONE)
*NONE Command 12/30/09 05:00:00.292360 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 006A
Message . . . . : 9000 - CVTDAT
DATE('2010359') TOVAR(&CAL_HOLDAT)
FROMFMT(*LONGJUL) TOFMT(*MDY)
TOSEP(*NONE)
*NONE Command 12/30/09 05:00:00.292384 QCLDMIO
QSYS 026F T2817C ASA2TOPGM 003D
Message . . . . : 7200 - RCVF
DEV(*FILE) RCDFMT(*FILE) WAIT(*YES)
OPNID(CAL) /* File name is
T2687PF. */
*NONE Command 12/30/09 05:00:00.292424 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 004F
Message . . . . : 8500 - CVTDAT
DATE('123110') TOVAR(&HOLJUL)
FROMFMT(*MDY) TOFMT(*LONGJUL)
TOSEP(*NONE)
*NONE Command 12/30/09 05:00:00.292464 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 006A
Message . . . . : 9000 - CVTDAT
DATE('2010366') TOVAR(&CAL_HOLDAT)
FROMFMT(*LONGJUL) TOFMT(*MDY)
TOSEP(*NONE)
CPF0555 Escape 40 12/30/09 05:00:00.304040
QCLCNVDT QSYS 01ED T2817C ASA2TOPGM 006A
Message . . . . : Date not in
specified format or date not valid.
Cause . . . . . : The date is not
valid. Attempt to convert the date has
failed. Recovery . . . : Correct
the syntax of the date field. More
information on date fields can be
found in the CL Reference manual.
*NONE Command 12/30/09 05:00:00.304144 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 008A
Message . . . . : 11500 - OVRPRTF
FILE(QPQUPRFIL) OUTQ(SICASA1)
FORMTYPE('D-499') HOLD(*NO)
*NONE Command 12/30/09 05:00:00.304248 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 008E
Message . . . . : 11800 - OVRPRTF
FILE(QPUSRPRF) PRTTXT('*** DELIVER TO
STEVEN LUKE ***') OUTQ(EMAILSIC1)
FORMTYPE('D-499') HOLD(*NO)
*NONE Command 12/30/09 05:00:00.304312 QCADRV
QSYS 03B7 T2817C ASA2TOPGM 0092
Message . . . . : 12200 - CRTPF
FILE(QTEMP/T2817TMP) RCDLEN(132)
CPC7301 Completion 00 12/30/09 05:00:00.339192 QDDCPF
QSYS 0567 T2817C ASA2TOPGM 0092
Message . . . . : File T2817TMP
created in library QTEMP.
CPC7305 Completion 00 12/30/09 05:00:00.379520 QDDCPFM
QSYS 005B T2817C ASA2TOPGM 0092

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.