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


  • Subject: RE: RPGLE question
  • From: Bob Cozzi <BobCozzi@xxxxxxx>
  • Date: Thu, 3 Jul 1997 00:06:42 -0500

Venu,

There are two choices to do what you want.  Here's the code:

********** OPTION 1
     D MyDateVal       S               D
     D MyCharVal       S              8A
     D MyDecVal        S              8S 0

     C     *ISO          Move      MyDateVal     MyDecVal
     C                   Move      MyDecVal      MyCharVal

     C                   return    MyCharVal

********** OPTION 2
     D MyDateVal       S               D
     D MyCharVal       S              8A

     C     *ISO0         Move      MyDateVal     MyCharVal
     C                   return    MyCharVal


Option 1 works with any release of RPG IV.
Option 2 works with the lastest V3R7 release of RPGIV.

Option 2 uses the extended *ISO0 date code. That's the letters "ISO" 
followed by the number Zero 0.
This is an enhancement to the regular date format codes in that the 0 
following the date format, indicates that there are zero separators in the 
date field.

Hope this helps.

Bob Cozzi


On Wednesday, July 02, 1997 7:12 PM, Venu Gopal 
[SMTP:Venu_Gopal@countrywide.com] wrote:
>
> Hi All,
>
>      I want to know is there any built in function (BIF) in ROG IV that
> does the same function as the DIGITS function will do in SQL. My
> requirement is I have a L type date field in *ISO format. The dates are
> coming in ccyy-mm-dd format. I want to return only ccyymmdd without the
> separators. Is there any BIF that returns ccyymmdd as a character field?
>

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.