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



Add this to your C-specs and all will be well.....


                                                         
 C/Exec SQL                                              
 C+           Set Option DatFmt = *ISO, TimFmt = *ISO    
 C/End-Exec                                              
                                                         



-----Original Message-----
From: Joel Cochran [mailto:jrc@xxxxxxxxxx] 
Sent: Tuesday, October 14, 2003 8:21 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: SQL loval date/timestamp

Ahhhhh... that explains it...

Do you change the DATSEP option as well?  Mine says *JOB, but if I
change DATFMT to *ISO will it know what to do?

Thanks,

Joel
http://www.rpgnext.com

On Tue, 2003-10-14 at 16:03, Schadd Gray wrote:
> Joel,
> 
> I have ran into this issue and the only solution that has worked for
me is
> to prompt the compile and change the parameter DATFMT to *ISO.  In my
shop,
> I changed the command default so I would not have to remember to do
this
> every time.
> 
> Adding DATFMT(*ISO) to the H spec does not help because it is the
> precompiler that is causing the issue and it does not look at the H
specs.
> 
> Schadd Gray
> Damon Technologies, Inc.
> 
> ----- Original Message ----- 
> From: "Joel Cochran" <jrc@xxxxxxxxxx>
> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
> Sent: Tuesday, October 14, 2003 6:41 AM
> Subject: RE: SQL loval date/timestamp
> 
> 
> > I've tried that but with no effect, I still get SQLState = '22008'.
> >
> > Still churning...
> >
> > Joel
> > http://www.rpgnext.com
> >
> > On Tue, 2003-10-14 at 15:01, DeLong, Eric wrote:
> > > Joel,
> > > Can you simply add DATFMT(*ISO) to your Control spec (H)?
> > >
> > > Eric DeLong
> > > Sally Beauty Company
> > > MIS-Project Manager (BSG)
> > > 940-898-7863 or ext. 1863
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Joel Cochran [mailto:jrc@xxxxxxxxxx]
> > > Sent: Tuesday, October 14, 2003 4:31 AM
> > > To: RPG programming on the AS400 / iSeries
> > > Subject: RE: SQL loval date/timestamp
> > >
> > >
> > > Here is the basic layout of the program in psuedo-code:
> > >
> > > d mainDS        e ds                  extname( MYFILE )
> > >
> > >  // prepare and declare the cursor...
> > >
> > > c/exec SQL
> > > c+  fetch next from mainCursor into :mainDS
> > > c/end-exec
> > >
> > > The layout of MYFILE includes a Date field (defined as "L" in the
DDS).
> > > Since Date fields themselves do not have data types this should
not be
> > > an issue.
> > >
> > > Just to be sure I checked the compiler settings for CRTSQLRPGI and
> > > DATFMT is *JOB.  Since the system always defaults to *ISO I
assumed that
> > > so would the program ... BUT ... when I DSPSYSVAL(QDATFMT) it says
that
> > > the value is MDY.  In fact, the option list doesn't even include
ISO.
> > >
> > > I think this must be the problem, maybe I need to specify *ISO
when I
> > > create an SQLRPG module.  This is something you do not have to do
in
> > > RPGIV, so to say this bothers me a little is an understatement.
I'm
> > > going to try and test this some more today and I'll share the
results.
> > >
> > > Thanks Eric,
> > >
> > > Joel
> > > http://www.rpgnext.com
> > >
> >
> >
> > _______________________________________________
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list
> > To post a message email: RPG400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> > or email: RPG400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> >
> >
> 
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.