× 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: Looking for program that will adjust a given date
  • From: "Bernard Burchell" <burchelb@xxxxxxxxxxxxxxx>
  • Date: Sat, 12 Jun 1999 22:31:04 +1000

The program you are after is SYS903B.  You will have to call this program
twice: once to convert a Date into Days, then add the number of days you
want to increment it by, then call SYS903B to convert the Days into a new
Date.  The 'Days' referred to here is the number of days since an arbitrary
date (I believe it's 1/1/1901).

To see what the parameters are, have a look at (just about) any AS/SET
program.  In there is a subroutine called A0DATE which calls SYS903B.  The
first time you call it you will need a From date format of '*CYMD' and a To
date format of '*DAYS'.  The second time around you will reverse these
formats.  If you are on a V405 release, the equivalent program might be
SYS903 (unless they still use those RPG- '$POPE' and '$ROME' routines).

SYS903B works by calling the system-API QWCCVTDT, so it's not terribly
efficient (2 call operations per date-conversion).  Hence you may want to
write your own program-internal routine to do conversions if performance is
an issue.

- Bernard

-----Original Message-----
From: Hancock, Teri <THANCOCK@accuridecorp.com>
To: 'BPCS-L@midrange.com' <BPCS-L@midrange.com>
Date: Saturday, June 12, 1999 9:04 AM
Subject: Looking for program that will adjust a given date


>
>I know that there has to be a BPCS program out there that will allow you to
>pass in a date, number of days to adjust, and return back the revised or
>adjusted date. Would anyone know the program name?
>
>For example: I want to send in 1999/02/25 and add 14 days to the date.  The
>returned result should be 1999/02/10.
>
>I know that I can write something using the CVTDAT adding the number of
days
>and then reconverting to the YYYYMMDD format within the same CLP.  I was
>just hoping to use a BPCS program. ( I know, I must be crazy.)
>
>Yours truly,
>
>Teri

+---
| This is the BPCS Users Mailing List!
| To submit a new message, send your mail to BPCS-L@midrange.com.
| To subscribe to this list send email to BPCS-L-SUB@midrange.com.
| To unsubscribe from this list send email to BPCS-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: dasmussen@aol.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.