Michael Knigge wrote:
All,
I have a C-Program that is compiled to a DLL and stored in a PDSE, so it
is stored as a "program object" (if I got all this stuff right).
In my program I have some static areas (name it "eye cathers"), for
example like this:
static char *Foo = "123456\0MY_EYE_CATHER";
This way, the String "123456[null]MY_EYE_CATCHER" is contained within my
program object. Now I create a XMIT-File from my program object and then
I change some bytes in this generated XMIT.
For example, I look for "MY_EYE_CATCHER" and I replace the "123456" in
front of this eye-catcher to something different. Same length of course.
Now when I restore the program object from this edited XMIT, I get an
error fetching this DLL:
CSV031I LIBRARY ACCESS FAILED FOR MODULE XYZ, RETURN CODE 20, REASON
CODE 26130003, DDNAME STEPLIB
I swear by my [whatever you like] that no other bytes than my "123456"
are changed. why the hell can't this DLL noe be fetched anymore? Are
there some "checksums" within the program object that are now not correct?
The funny thing is, that this happens just on a few modules (I have
around 20 that are going to be "patched" by this method), mostly
everything goes well....
Any ideas? Or a better way to "patch" a module?
Bye & thanks,
Michael
P.S.: If you wonder why I need to do this: We compile a product,
generate a XMIT and if we ship it to a client we want to "patch" a
client-id and date into all shipped modules - and using this method we
can do this under windows/unix and don't need to recompile+relink under
z/OS....
XMIT does some internal reformatting; if the
bytes you "patch" happen to get folded across
data boundaries, you may well not get what
you expect.
If you do your patching under Windows or Unix,
of course, you need to be aware of ASCII/EBCDIC
issues, too.
Why avoid the recompile/relink under z/OS? It's
simple enough to set up a relink job that
INCLUDEs the client info for each module (and
you certainly do not need to recompile each
module if you have a single module containing
the client info). I think you have a faulty
design in your approach to managing your
client info.
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
z/OS Application development made easier
* Our classes include
+ How things work
+ Programming examples with realistic applications
+ Starter / skeleton code
+ Complete working programs
+ Useful utilities and subroutines
+ Tips and techniques
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html