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



MWalter@xxxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
14/11/2003 07:27 AM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     rpg400-l@xxxxxxxxxxxx
        cc: 
        Subject:        A good one.


I've got a good one. V5R2. CLLE.

pgm parm(&year &month)
dcl var(&year) type(*char) len(4)
Dcl var(&month) type(*char) len(4)
dcl var(&frdate) type(*char) len(7)
dcl var(&todate) type(*char) len(7)

chgvar var(&frdate) +
 value('1' *cat %sst(&year 3 2) *cat &month *cat '01')
chgvar var(&todate) +
 value('1' *cat %sst(&year 3 2) *cat &month *cat "31")

ovrdbf file(Imhist) share(*yes)

opnqryf file(Imhist ppgItems) +
        format(Imhist) +
        jfld((1/itnbr 2/itnbr)) +
        jdftval(*no) +
        qryslt('(tcode = "RP") *and +
                (trndt *eq %range(' *tcat &frdate *bcat &todate *tcat 
'))')
+
        keyfld(itnbr trndt) +
        mapfld((itnbr '1/itnbr') +
               (prqoh '2/disc'))

when run, the QRYSLT looks like this in the joblog.

  700 - OPNQRYF FILE((IMHIST) (PPGITEMS)) FORMAT(IMHIST) QRYSLT('(tcode =
 "RP") *and (trndt *eq %range(10311 10311))') KEYFLD((ITNBR) (TRNDT))
 JFLD((1/ITNBR 2/ITNBR)) JDFTVAL(*NO) MAPFLD((ITNBR '1/itnbr') (PRQOH
 '2/disc'))

question: Where are my days? 2003 is passed in as the year, 11 is passed 
in
as the month.

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


It lookes as though your from and to date are incorrect.  Shouldn't the 
from date look something like 1031101 and the to date look something like 
1031131?  Does it have something to do with the month field being 4 
characters long instead of 2?

Rick Pezzimenti
Programmer/Analyst
Denso International Australia
+613 9244-3627

#########################################################################
Attention:

The information contained in this message and or attachments is intended 
only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material. Any review, retransmission, 
dissemination or other use of, or taking of any action in reliance upon, 
this information by persons or entities other than the intended recipient 
is prohibited. Opinions expressed in this email and any attachment are 
those of the sender and not necessarily the opinions of DENSO.  If you 
received this in error, please contact the sender and delete the material 
from any system and destroy any copies.

The DENSO Australia Group of companies does not represent, warrant or 
guarantee that the integrity of this communication has been maintained 
nor that the communication is free of errors, virus or interference.
##########################################################################

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.