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



We'd all like to do that kind of thing.
The only way out is to allow some form of special value to go into the
parameter, such as -1 or 0 for *TODAY

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Wilt, Charles
Sent: Tuesday, February 15, 2005 7:42 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: PROTOTYPING - What type of data are values as *MONTH, *DAY,
*SYS

Igor,

I've wanted to be able to do that myself.  Unfortunately, it doesn't seem to
be possible at present.



Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of 
> Igor.Beslic@xxxxxxxxxxxx
> Sent: Tuesday, February 15, 2005 4:59 AM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: PROTOTYPING - What type of data are values as 
> *MONTH, *DAY, *SYS
> 
> 
> Hello!
> 
> Please, can somebody explain me what are exactly *MONTH, *DAY, *SYS, 
> *YEAR, *OMIT, *NOPASS etc. values?? Where are they stored 
> when program 
> runs??
> 
> I have subprocedure that does some time calculations. I would 
> like to pass 
> optional parametar to it (*MONTH,*DAY,*YEAR) but if I pass it 
> as in PI 
> (10A) builtin function wont accept it because it has no same 
> parametar 
> type. I wonder is there any way to make call to 
> getInnerPeriodLength on 
> this way getInnerPeriodLength(d1,d2,d3,d4,*MONTH).
> 
> Here is te code (for now I just *DAYS):
> 
> 
>      P getInnerPeriodLength...
>      P                 B                   EXPORT
>      D getInnerPeriodLength...
>      D                 PI             5P 0
>      D  dateZStart                     D
>      D  dateZEnd                       D
>      D  dateKStart                     D
>      D  dateKEnd                       D
>      D  resultUnit                   10A   OPTIONS(*NOPASS) VALUE
>      D  checkWildCard  S               N   inz(*off)
> 
>       /free
>         
>         If dateZEnd<dateZStart;
>            return 0;
>         EndIf;
>         
>         If dateKEnd<dateKStart;
>            return 0;
>         EndIf;
>         
>         If %Parms()>4;
>            checkWildCard=*ON;
>         EndIf;
> 
> 
>         Select;
> 
>         
>           WHen dateZStart>dateKStart AND dateKEnd>dateZStart
>                AND dateKEnd<dateZEnd;
>                return %Diff(dateKEnd:dateZStart:*DAYS)+1;
> 
>         
>           WHen dateZStart<dateKStart AND dateKEnd<dateZEnd;
>                return %Diff(dateKEnd:dateKStart:*DAYS)+1;
> 
>         
>           WHen dateZStart<dateKStart AND dateKEnd>dateZEnd;
>                return %Diff(dateZEnd:dateKStart:*DAYS)+1;
> 
>         
>           WHen dateZStart>dateKStart AND dateKEnd>dateZEnd;
>                return %Diff(dateZEnd:dateZStart:*DAYS)+1;
> 
>           Other;
>                return 0;
>         EndSl;
> 
>       /end-free
>      P                 E 
> 
> Thank you!
> 
> Igor Bešlić, dipl. ing. rač. 
> Zelinska 2, 10000 Zagreb
> tel: +385 1 6326422
> -- 
> 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-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.