×
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.
Al,
I must say... that BPCS date handling code with converting to Julian and
all that jazz is VERY bloated and cumbersome. Hence the reason I convert
my 8,0 dates to actual date fields and use RPG's awesome date routines.
Sometimes (most from my experience with crappy ASSET generated BPCS code)
its best to just write a separate routine and call out from the BPCS code.
Doing the way BPCS does it just because that's what the BPCS code looks
like is not a good way to "enhance" BPCS. It just causes crappy ASSET
generated code to get more brittle.
Please consider using the code I sent you. Its been in production for
over 2 years and its sooooo stinking simple that the logic can be desk
checked. Not to mention that its ready to be put into a module, and
compiled into a service program.... which is then reusable everywhere. I
wish I could retrofit all of BPCS code with my shop floor date stuff.
Major codebase reductions would occur. Not to mention speed increases due
to calling subprocedures instead of subroutines and a whole lot less code
to run.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
"Al" <macwheel99@xxxxxxxxxx>
Sent by: bpcs-l-bounces@xxxxxxxxxxxx
06/06/2011 02:23 PM
Please respond to
BPCS ERP System <bpcs-l@xxxxxxxxxxxx>
To
"'BPCS ERP System'" <bpcs-l@xxxxxxxxxxxx>
cc
Subject
Re: [BPCS-L] Date Math 405 CD 5.1
Thanks for the great input from many people, including some code I will be
exploring.
I now think the DayOfWeek was a misdirection when it was being explained
to
me what they needed. It has been eons since I had to dig into the nuts &
bolts of how date math is actually done. Also, I am still doing most of
my
coding in RPG/400 since that's what 405 CD is written in. I have done a
little ILE, and some embedded SQL, but almost no API.
The initial programs, to be modified, produce something which looks like a
spread sheet, with customer order data, work-in-progress, other info
arranged sideways based on request date. They want the data arranged
based
on the request date minus X business days. Once that working, there's
some
other software to get a similar service.
Over the weekend, I concluded I need:
* Use /COPY because there are over a score of variants of
this
program. Get one variant working, then this makes it simpler to implement
others.
* Set Business days Variable in $INIT, since they intend to
change
this from time to time.
* Before the current logic, which goes from request date to
what
bucket column, the corresponding quantities need to go into:
* Interject subroutine(s) with this modification flow.
* Move request date into a work date, because later I will
need to use
this same logic on other dates, like shop order dates.
* Get YYYY. Use # days from Jan-01 of YYYY to deduce
Julian YYYY DDD
date since DDD needed for FSC array lookup, not the cave man days logic
from
beginning of century. Then maybe DEBUG check I not screwed this up.
* Business Days Loop against FSC for current year.
* Check if we counted down to beginning of year, in which
case handle
prior YYYY refresh FSC controls. Maybe another DEBUG validation.
* Final Julian YYYY DDD back to familiar CCYYMMDD format.
* Replace contents of date to be used by rest of
pre-existing program.
-----Original Message-----
From: bpcs-l-bounces@xxxxxxxxxxxx [mailto:bpcs-l-bounces@xxxxxxxxxxxx] On
Behalf Of Bryce Martin
Sent: Monday, June 06, 2011 9:57 AM
To: BPCS ERP System
Subject: Re: [BPCS-L] Date Math 405 CD 5.1
Al,
I have written some shop calendar loading procedures that gets the shop
calendar into the proper RPGLE data structures for doing work based on
that. I don't have a routine to do DayOfWeek calculations though. But if
you get a DayOfWeek program, I can give you the other procedure.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
"Al" <macwheel99@xxxxxxxxxx>
Sent by: bpcs-l-bounces@xxxxxxxxxxxx
06/03/2011 03:36 PM
Please respond to
BPCS ERP System <bpcs-l@xxxxxxxxxxxx>
To
"'BPCS ERP System'" <bpcs-l@xxxxxxxxxxxx>
cc
Subject
[BPCS-L] Date Math 405 CD 5.1
I have been requested to do a modification, and I am having difficulty
locating good tools to support it. We are BPCS 405 CD, IBM 5.1.
* Is there a standard subroutine, like in QSTD, or native
IBM, where
we feed in date and it returns if that Date is a Monday Wednesday or
whatever day of week? This is because they want something to happen based
on business days, not calendar days.
* Is there a standard subroutine, where I can feed in some
date from
some BPCS data, and some # of business days (3 days is their current
interest, but that could change), access the FSC shop calendar, and figure
that out ... like if the BPCS date is for a Monday, then 3 business days
prior to that is the previous Wednesday.
-
Al Mac
Assuming no one has any objections, I plan to be deleting work e-mail
which
is over a year old, because my e-mail is getting sluggish.
As an Amazon Associate we earn from qualifying purchases.
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.