Entry Point in load module

73 views
Skip to first unread message

Janko Kalinic

unread,
Mar 14, 2023, 4:51:29 PM3/14/23
to ASSEMBL...@listserv.uga.edu
I had 2 ASM steps and a LKED step (with no ENTRY statement). Binder
assigned entry point to second CSECT (nonzero location). WAD?

Dave Clark

unread,
Mar 14, 2023, 5:01:44 PM3/14/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
03/14/2023 04:51:16 PM:
> I had 2 ASM steps and a LKED step (with no ENTRY statement). Binder
> assigned entry point to second CSECT (nonzero location). WAD?


That happens to me if I leave the END statement blank with no
entry point specified.


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331





*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************

Janko Kalinic

unread,
Mar 14, 2023, 5:52:07 PM3/14/23
to ASSEMBL...@listserv.uga.edu
Ahhhh. Second CSECT had an expression on the END statement.

Phil Smith III

unread,
Mar 15, 2023, 12:14:49 AM3/15/23
to ASSEMBL...@listserv.uga.edu
Dave Clark wrote:
>That happens to me if I leave the END statement blank with no
>entry point specified.

Over 35 years ago, I was taught to put the name on the END statement, but I now realize I didn't know why! Thanks.

Peter Relson

unread,
Mar 15, 2023, 8:53:16 AM3/15/23
to ASSEMBL...@listserv.uga.edu
This is not a question for assembler-list as it has nothing to do with the assembler itself.
The binder is a z/OS function and questions about it would be better suited for ibm-main.

Since you did not show either your program (or a snippet thereof) or your binder JCL it is impossible to answer your question.
The "design" is not "set the entry point to the start of the 2nd CSECT if there are two CSECTs". The design includes various things including ENTRY binder control statements, a name on an END statement, the order in which OBJs and/or loadmods are included. But in its simplest form, the default is to set the entry point to the start of the first section.

For example,

IEW2322I 1220 1 INCLUDE SYSOBJS(TEST1) -- where CSECT is TEST1
IEW2322I 1220 2 INCLUDE SYSOBJS(TEST2) -- where CSECT is TEST2
IEW2322I 1220 3 NAME TEST(R)
IEW2650I 5102 MODULE ENTRY NOT PROVIDED. ENTRY DEFAULTS TO SECTION TEST1.

And if you reversed the includes, entry would default to TEST2.

In the absence of a name on an END statement, I'd think it unwise to rely on whatever rule might exist, when you have multiple CSECTs.

Peter Relson
z/OS Core Technology Design

Paul Gilmartin

unread,
Mar 15, 2023, 10:51:54 AM3/15/23
to ASSEMBL...@listserv.uga.edu
If there are two or more END statements, which dominates?

Note that the name needn't be a CSECT or even a declared ENTRY; any symbol
(expression?) will do. I did that once and a co-worker re-linked my load
module for better BLKSIZE. Linkage Editor lost the entry point with no
command to restore it. Binder has an option to fix that, I believe.

--
gil

Paul Gilmartin

unread,
Mar 15, 2023, 11:01:41 AM3/15/23
to ASSEMBL...@listserv.uga.edu
On 3/15/23 06:53:11, Peter Relson wrote:

> This is not a question for assembler-list as it has nothing to do with the assembler itself.
> The binder is a z/OS function and questions about it would be better suited for ibm-main.
>
A factor in the decision might be which Bookshelf describes the feature.

Many Rexx questions go IBM-MAIN which might better go to tSO-rEXX.

Many UNIX questions go to IBM-MAIN which might better go to MVS-OE. But
that list has such low traffic that writers expect more attention
on IBM-MAIN.

What's the best list for questions about BPXWUNIX? About zSeries hardware?

I see a need for "advocacy" and "nostalgia" lists.

> In the absence of a name on an END statement, I'd think it unwise to rely on whatever rule might exist, when you have multiple CSECTs.

Particularly because SMP/E can permute CSECTs.

--
gil

Dave Clark

unread,
Mar 15, 2023, 11:37:50 AM3/15/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
03/15/2023 10:51:47 AM:
> >> That happens to me if I leave the END statement blank with no
> >> entry point specified.
>
> If there are two or more END statements, which dominates?


In my case I was compiling an assembler subroutine that statically
called another assembler subroutine. The 1st-level subroutine was missing
the entry point declaration on the END statement but the 2nd-level
subroutine did have an entry point on its END statement. They, of course,
got linked together as a single module but the entry point for the module
was the 2nd-level subroutine -- completely bypassing the 1st-level
subrotuine.

Paul Gilmartin

unread,
Mar 15, 2023, 11:53:18 AM3/15/23
to ASSEMBL...@listserv.uga.edu
On 3/15/23 09:37:42, Dave Clark wrote:

> "IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
> 03/15/2023 10:51:47 AM:
>>>> That happens to me if I leave the END statement blank with no
>>>> entry point specified.
>>
>> If there are two or more END statements, which dominates?

I should have asked more clearly, If two or more END statements, both contain
expressions, which dominates, primacy or recency?

(Yes, that's a Binder question, not Assembler.)

> .... They, of course,
> got linked together as a single module but the entry point for the module
> was the 2nd-level subroutine -- completely bypassing the 1st-level
> subroutine.

Exactly as documented.

--
gil

Dave Clark

unread,
Mar 15, 2023, 11:58:59 AM3/15/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
03/15/2023 11:53:11 AM:
> I should have asked more clearly, If two or more END statements, both
contain
> expressions, which dominates, primacy or recency?


If each CSECT has an END statement with an entry point declaration
then the order of the modules takes precedence -- the first becoming the
entry point for the module.

Phil Smith III

unread,
Mar 15, 2023, 12:31:45 PM3/15/23
to ASSEMBL...@listserv.uga.edu
Paul Gilmartin wrote, in part, in response to Peter's comment about whether
this belongs on this list:

>What's the best list for questions about BPXWUNIX? About zSeries hardware?



Well, for zSeries hardware, you'll want a time machine, since that hasn't
been produced in 18 years.



But in this case, Peter, I'd argue that since it's an assembler statement
that controls the result, it's not *incorrect* here. And there is no BINDER
list.

Paul Gilmartin

unread,
Mar 15, 2023, 12:56:58 PM3/15/23
to ASSEMBL...@listserv.uga.edu
On 3/15/23 10:31:36, Phil Smith III wrote:
>
>> What's the best list for questions about BPXWUNIX? About zSeries hardware?
>
> Well, for zSeries hardware, you'll want a time machine, since that hasn't
> been produced in 18 years.

Fix my vocabulary. What should I call contemporary IBM mainframe hardware?
And what was zSeries hardware 18 years ago?

> But in this case, Peter, I'd argue that since it's an assembler statement
> that controls the result, it's not *incorrect* here. And there is no BINDER
> list.

A fortuitous accident: a non-assembler had an assembler answer.

--
gil

Dave Clark

unread,
Mar 15, 2023, 1:04:33 PM3/15/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
03/15/2023 12:56:49 PM:
> > But in this case, Peter, I'd argue that since it's an assembler
statement
> > that controls the result, it's not *incorrect* here. And there is no
BINDER
> > list.
>
> A fortuitous accident: a non-assembler had an assembler answer.


Yep, the linker/loader/binder did it but an assembler statement
change "fixed" it. Interestingly enough, a linker/loader/binder ENTRY
statement would have fixed it, too.

Seymour J Metz

unread,
Mar 15, 2023, 1:04:35 PM3/15/23
to ASSEMBL...@listserv.uga.edu
(Checks watch) IBM z.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBL...@LISTSERV.UGA.EDU] on behalf of Paul Gilmartin [00000014e0e4a59...@LISTSERV.UGA.EDU]
Sent: Wednesday, March 15, 2023 12:56 PM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Entry Point in load module

Phil Smith III

unread,
Mar 15, 2023, 1:06:10 PM3/15/23
to ASSEMBL...@listserv.uga.edu
Seymour J Metz wrote:

>(Checks watch) IBM z.



Your watch is slow. "IBM zSystems", because Russia and the Z symbol.

Charles Mills

unread,
Mar 15, 2023, 1:17:24 PM3/15/23
to ASSEMBL...@listserv.uga.edu
The Assembler List has long hosted questions that are really hardware architecture questions, not Assembler *Language* questions.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Paul Gilmartin
Sent: Wednesday, March 15, 2023 8:02 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Entry Point in load module

Janko Kalinic

unread,
Mar 15, 2023, 2:45:34 PM3/15/23
to ASSEMBL...@listserv.uga.edu
Mea culpa on the lack of doc. I was on my iPhone when I drafted the
message. Here it is.

//ASM1 EXEC PGM=ASMA90
LMOD CSECT
. . .
END
//ASM2 EXEC PGM=ASMA90
EPUTL CSECT
. . .
END EPUTL
//LKED EXEC PGM=IEWL
//IN DD DSN=&&X,DISP=(OLD,DELETE) <== ASM.SYSLIN DISP=(MOD,PASS)
//SYSLIN DD *
INCLUDE IN
NAME LMOD(R)

Dave Clark

unread,
Mar 15, 2023, 3:01:47 PM3/15/23
to ASSEMBL...@listserv.uga.edu
"IBM Mainframe Assembler List" <ASSEMBL...@LISTSERV.UGA.EDU> wrote on
03/15/2023 02:45:18 PM:
> Mea culpa on the lack of doc. I was on my iPhone when I drafted the
> message. Here it is.
>
> //ASM1 EXEC PGM=ASMA90
> LMOD CSECT
> . . .
> END
> //ASM2 EXEC PGM=ASMA90
> EPUTL CSECT
> . . .
> END EPUTL
> //LKED EXEC PGM=IEWL
> //IN DD DSN=&&X,DISP=(OLD,DELETE) <== ASM.SYSLIN DISP=(MOD,PASS)
> //SYSLIN DD *
> INCLUDE IN
> NAME LMOD(R)

This would have worked. But filling in the END statement keeps
this information with the source.

//SYSLIN DD *
NAME LMOD(R)
ENTRY LMOD
INCLUDE IN
Reply all
Reply to author
Forward
0 new messages