Is there an easy way to do this.
I toyed with using CL and passing parm but would rather do it in ILE.
Printable View
Is there an easy way to do this.
I toyed with using CL and passing parm but would rather do it in ILE.
On Oct 1, 11:46*am, iseriesflorida <iseriesflor...@yahoo.com> wrote:[color=blue]
> Is there an easy way to do this.
>
> I toyed with using CL and passing parm but would rather do it in ILE.[/color]
Dont think so - however you can create ILE CL programs, source type
CLLE then create a srvpgm which can easily be included in your rpg by
using a function. You may have to add a binding directive to programs
which use it, I cant remember, we hardly use it (ILE that is) here as
we are very backward in adopting modern tech. We only use greenscreen
as the card punches wore out :)
Jonathan.
There are API's to do this. Take a look at the Date and Time API's in
the InfoCenter and you'll find which ones to call. I think you'll need
CEEDAYS and CEEDYWK and by doing some searching, you'll find code
examples of how to use them.
Matt
On Oct 1, 7:53*am, Jonathan Bailey <jonathan.bai...@tesco.net> wrote:[color=blue]
> On Oct 1, 11:46*am, iseriesflorida <iseriesflor...@yahoo.com> wrote:
>[color=green]
> > Is there an easy way to do this.[/color]
>[color=green]
> > I toyed with using CL and passing parm but would rather do it in ILE.[/color]
>
> Dont think so - however you can create ILE CL programs, source type
> CLLE then create a srvpgm which can easily be included in your rpg by
> using a function. You may have to add a binding directive to programs
> which use it, I cant remember, we hardly use it (ILE that is) here as
> we are very backward in adopting modern tech. We only use greenscreen
> as the card punches wore out :)
>
> Jonathan.[/color]
il 01/10/2008 12.46, Scrive iseriesflorida 43949016:[color=blue]
> Is there an easy way to do this.
>
> I toyed with using CL and passing parm but would rather do it in ILE.
>[/color]
You can use CEE APIs, as already told, or use QWCRSVAL API to retrieve
sysval QDAYOFWEEK as well.
--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre/Spammers loop
schijten/Spammers macht Euch vom Acker/Spamerzy wypierdalac'
Jonathan Bailey wrote:[color=blue]
> On Oct 1, 11:46 am, iseriesflorida <iseriesflor...@yahoo.com> wrote:[color=green]
>> Is there an easy way to do this.
>>
>> I toyed with using CL and passing parm but would rather do it in ILE.[/color]
>
> Dont think so - however you can create ILE CL programs, source type
> CLLE then create a srvpgm which can easily be included in your rpg by
> using a function. You may have to add a binding directive to programs
> which use it, I cant remember, we hardly use it (ILE that is) here as
> we are very backward in adopting modern tech. We only use greenscreen
> as the card punches wore out :)
>[/color]
As mentioned by others, APIs are probably simpler in this case. However
for future reference re ILE, while using a *SRVPGM or *BNDDIR are good
options, it can be as simple as binding a module (eg CLLE) into the same
*PGM object. For example:
CRTRPGMOD MYLIB/RPGMOD ...
CRTCLMOD MYLIB/CLMOD ...
CRTPGM PGM(MYLIB/ABC) MODULE(MYLIB/RPGMOD MYLIB/CLMOD) ...
ILE Concepts book:
[url]http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/books/sc415606.pdf[/url]
--
Karl Hanson
Good one! But sad...
"Jonathan Bailey" <jonathan.bailey@tesco.net> wrote in message
news:2f9dfcd2-9bea-4269-aa10-
We only use greenscreen as the card punches wore out :)
On Oct 1, 6:46*am, iseriesflorida <iseriesflor...@yahoo.com> wrote:[color=blue]
> Is there an easy way to do this.
>
> I toyed with using CL and passing parm but would rather do it in ILE.[/color]
D NamesOfDays s 9a Dim(7) Ctdata Perrcd(1)
D Any_Sunday c const(D'2006-01-01')
**
D ElapsedDays s 7 0
D DayNumber s 3
0
/Free
ElapsedDays = %diff(Input_Date: Any_Sunday: *days);
DayNumber = %rem(ElapsedDays: 7);
If DayNumber < 0;
DayNumber = DayNumber + 7;
Endif;
Name_of_Day_of_Week = NamesOfDays(DayNumber);
/End-Free
**
SUNDAY
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY