Page 1 of 2

Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 4:28 am
by belkin99
I am asking if is there any example showing how to load object module in the Assembly. Using LOAD module.

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 4:55 am
by steve-myers
The LOAD macro will just load load modules or program objects. It cannot deal with object modules. You can call the Binder to "load" an object module.This manual will tell you how to do it. Appendix A in the same manual has a description of the contents of an object module if you want to attempt to do it yourself, though I think you'll find it's harder than you expect.

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 4:56 am
by enrico-sorichetti
Using LOAD module.


LOAD is not a module is a macro and its usage is described here
z/OS V1R10.0 MVS Programming Assembler Services Guide
http://publibz.boulder.ibm.com/cgi-bin/ ... 0523015946

and here
z/OS V1R10.0 MVS Assembler Services Reference IAR-XCT
http://publibz.boulder.ibm.com/cgi-bin/ ... 0523015946

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 5:37 am
by belkin99
+ For steve-myers , you are right in this appendix, I have all the records TXT, ESDS, and the RLD including the V-Con and A-Con, and I did it by hand it was difficult first time but later you understand the concept so become easy. But this is not the subject for this topic.

+ For enrico-sorichetti, you are right it is a typo-error and I am sorry for that.
So to be more accurate I have in assembler after the standard linkage the
LOAD EP=ENTRPONT           AS ENTRY POINT
LTR 15,15                                     TESTING MY LOAD
LA  13,SAVEAERA
LA  1,PLIST
LR  15,0
BALR 14,15

AFTER THIS STEP I LOST AND DO NOT KNOW WHAT I SHOULD ?

tHANKS FOR THE REPLY

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 6:33 am
by steve-myers
Basically, you've called what amounts to a subroutine, but you are depending on the subroutine following normal conventions' registers 2 through 14 should have been restored to their contents before your BALR, register 15 should have a return code.

There is one possible serious problem with your code. It is ignoring RMODE/AMODE issues.

The LOAD macro always sets reg 15 = 0; since there is no conditional branch following the LTR instruction, there is no point in having the LTR there.

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 7:03 am
by belkin99
Thanks, actually
I have after LTR
BNZ    LOADFAIL 

and before BR R14
LOADFAIL  DS   0H
                 L   R13,4(R13)
                 LM  R14,R12,12(R13)
EXIT          BR    R14     

I am still do not know what I should do next ?

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 7:51 am
by Robert Sample
After reviewing the entire thread, it is not at all clear what you are asking, especially why you are asking what you should do next.

What is the problem you are having? Describe, in as much detail as you can, what you want to accomplish, what you have tried so far, and what is not working about your approach (just posting that something does not work is useless -- there could be, in some cases, hundreds of reasons for something to not work and knowing all the details of error messages is helpful).

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 8:13 am
by belkin99
To Robert Sample -
As I explained in my first post "I am asking if is there any example showing how to load object module in the Assembly. Using LOAD module." which is not an specific exist problem as other usual posts.
Then through the conversation I put it some sample code that I wrote, in order to get input from expert people in this forum, and at the END we will get a full discussion that cover most topics about the LOAD macro with an simple example.

So the main Idea, is that I am not looking for solving a problem, but I am looking for implementing code and steps that required to use this macro.
I am sorry that my words does not reflect my idea.

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 8:20 am
by dick scherrer
Hello,

I am sorry that my words does not reflect my idea.
One of the biggest challenges we have in the forum is language/communication.

How might a "LOADed" object module be used? As has been mentioned LOAD modules are loaded rather than object modules. If this worked for you what would it do?

Re: Load object module in assembly using LOAD Module

PostPosted: Wed Feb 02, 2011 8:28 am
by belkin99
Good Catch,

This is Using Assembler with a "Load macro" to load & execute the "load module" that created in JCL steps.
Thats all Folks