Is it possible by using the /if /elseif /else compiler directives to
compile for a target release e.g.
if tgtrls = 4.4 or higher compile
evalr x = z
else if lower
move z x
All of this in one program ?
On Thu, 14 Dec 2000 08:55:38 +0200, Henry Wallace
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
What you may do is:
IF DEFINED new_releases
For that you have to pre-define "new_releases" at the DEFINE keyword of the
CRTBNDRPG or CRTRPGMOD command. Probably you can write a command shell for
the CRTRPDMOD command that pre-defines "new_releases" after having looked
at the target release specified. RTVCMDSRC made by Dave McKenzie may give
you a good start.
But that is nothing new for you, I guess.
Lets see if some else has a better idea for that interesting problem.
Henry Wallace schrieb:
> Is it possible by using the /if /elseif /else compiler directives to
> compile for a target release e.g.
> if tgtrls = 4.4 or higher compile
> evalr x = z
> else if lower
> move z x
> All of this in one program ?
If you have a lot of target-release specific code, for several different
releases, you could compile like this:
CRTBNDRPG TGTRLS(V3R2M0) DEFINE(V3R2M0)
and then use a /copy file like this, with a 4-line block in order for
each release that you're interested in. Defining releases would end
when the release that was define on the command was reached. So if you
said DEFINE(V3R2M0), it would skip the first /IF, it would define
V3R1M0, and then it would jump out at the second /IF /EOF, and not
define V3R6M0 etc.
Note that it has to be a /COPY file, otherwise /EOF would terminate the
then in your code
By the way, there will probably be support for this in the next release
of RPG, so I wouldn't advise people to set this up unless they have a
lot of release-specific code.
And anyway, supporting release-specific code can get very ugly very
fast, and easily become practically unmaintainable. If the MOVE code
produces the same result as the EVALR code, I wouldn't recommend trying
to keep two versions of the code. You could put in a comment like
* CHG-V4R4 change the next 4 lines to EVALR
and then when you didn't need to compile earlier than V4R4, you could
scan for CHG-V4R4 and change the code.
> I do not think that it is possible since I think that there is no way to
> get the target release information into the program so that you can query
> it with a IF compiler directive. In addition there is no way to use a
> GREATER AS statement.
> What you may do is:
> IF DEFINED new_releases
> do this
> ELSE IF
> do that
> For that you have to pre-define "new_releases" at the DEFINE keyword of the
> CRTBNDRPG or CRTRPGMOD command. Probably you can write a command shell for
> the CRTRPDMOD command that pre-defines "new_releases" after having looked
> at the target release specified. RTVCMDSRC made by Dave McKenzie may give
> you a good start.
> But that is nothing new for you, I guess.
> Lets see if some else has a better idea for that interesting problem.
I'm testing to protect some document directories on a http-server.
When I start the server, I get to login window, but the server always
I cannot find out where I misconfigured the server.
Can someone point me out.
I'm at V4R3 ptf level uptodate untill 24/9.
Following are the protect subdirectives.
I'm using the default HTTP user.
Has it to do with mismatching CCSIDs ? Are are there other things to define
or are there special gotcha's ?
Thanks in advance.
00010 Protection ANNEX
00020 AuthType Basic
00030 ServerId TESTAnnex
00040 PasswdFile QUSRSYS/ABVVVLDL
00050 Groupfile /home/abvvgrp.grp
00060 GetMask informatica, entreprise, secretariaat
00070 PostMask informatica, entreprise, secretariaat
00080 Mask all
00100 Protect /home/annex/* ANNEX