[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: use of curdate within MVS - should it work?



In any case if U want to findout the current date then
just write a select statement and get the currentdate

select sysdate into today_date from dual;

Or

U can use the date functions defined in the SQR.


lakshman.
--- Venkat Goda <vgoda@HOTMAIL.COM> wrote:

<HR>
<html><DIV>
<P><BR><BR></P>Try using CURRENT DATE instead of the
date function.</DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: Steve Rogers <SROGERS@KBTOYS.COM>
<DIV></DIV>&gt;Reply-To: sqr-users@list.iex.net
<DIV></DIV>&gt;To: SQR-USERS@list.iex.net
<DIV></DIV>&gt;Subject: use of curdate within MVS -
should it work?
<DIV></DIV>&gt;Date: Tue, 10 Apr 2001 13:14:11 -0400
<DIV></DIV>&gt;
<DIV></DIV>&gt;We are in the process of converting
AS-400 version 7.5 of PeopleSoft HRMS to
<DIV></DIV>&gt;MVS. While testing an SQR containing
the following code -
<DIV></DIV>&gt;
<DIV></DIV>&gt; FROM PS_JOBCODE_TBL JC
<DIV></DIV>&gt; WHERE JC.SETID = SETID !
<DIV></DIV>&gt; AND JC.JOBCODE like 'K%'
<DIV></DIV>&gt; AND JC.EFFDT = (SELECT MAX(JC1.EFFDT)
<DIV></DIV>&gt; FROM PS_JOBCODE_TBL JC1
<DIV></DIV>&gt; WHERE JC1.JOBCODE = JC.JOBCODE
<DIV></DIV>&gt; AND JC1.EFFDT &lt;= curdate() )
<DIV></DIV>&gt; AND JC.EFF_STATUS = 'A'
<DIV></DIV>&gt;
<DIV></DIV>&gt; I received an error that indicated
that MVS could not handle curdate. Here
<DIV></DIV>&gt;is the error
<DIV></DIV>&gt;
<DIV></DIV>&gt;(SQR 5528) DB2 SQL PREPARE/DECLARE
error -440 in cursor 5:
<DIV></DIV>&gt; DSNT408I SQLCODE = -440, ERROR: NO
FUNCTION BY THE NAME CURDATE HAVING
<DIV></DIV>&gt;COMPATIBLE ARGUMENTS WAS FOUND IN THE
CURRENT PATH
<DIV></DIV>&gt;
<DIV></DIV>&gt; DSNT418I SQLSTATE = 42884 SQLSTATE
RETURN CODE
<DIV></DIV>&gt; DSNT415I SQLERRP = DSNXORFN SQL
PROCEDURE DETECTING ERROR
<DIV></DIV>&gt; DSNT416I SQLERRD = -100 0 0 -1 0 0 SQL
DIAGNOSTIC INFORMATION
<DIV></DIV>&gt; DSNT416I SQLERRD = X'FFFFFF9C'
X'00000000' X'00000000' X'FFFFFFFF' X'
<DIV></DIV>&gt; INFORMATION
<DIV></DIV>&gt;
<DIV></DIV>&gt; Can anyone tell me why this is
happening and how to resolve it?
<DIV></DIV>&gt;
<DIV></DIV>&gt; thanks,
<DIV></DIV>&gt; Steve
<DIV></DIV><br clear=all><hr>Get your FREE download of
MSN Explorer at <a
href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>


=====
This Message from gantalp(Chinni).
All The best.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/