Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Multiple Entry

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Sat Jul 25, 2020 1:07 am    Post subject: Multiple Entry
Reply with quote

I have assembler program with

ENTRY labelA
ENTRY labelB
LabelA ... assembler code
LabelB ... assembler code

I understand this program can be called for LabelA or LabelB
Question - does execution of LabelA code includes execution of LabelB after or does execution of LabelA result in return to calling program
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1220
Location: Vilnius, Lithuania

PostPosted: Sat Jul 25, 2020 1:36 am    Post subject:
Reply with quote

That's entirely up to you. You can code it to do either.
Back to top
View user's profile Send private message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Sat Jul 25, 2020 2:21 am    Post subject: Reply to: Multiple Entry
Reply with quote

Thank you. It was the first I’ve seen of an assembler program with more than 1 ENTRY. Guess if I don’t want processing of LabelA to be followed by processing of LabelB I should a conditional Branch.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 860
Location: The Universe

PostPosted: Sat Jul 25, 2020 4:15 am    Post subject:
Reply with quote

As prino says, the mechanics are up to you.

I have one TSO command processor with 3 entry points. 90% of the processing is identical, and the code, obviously, is shared. Each entry point implies options, and the entry point that is used sets the options.

I have another program with 3 entry points. Each entry point is a subroutine with distinct code, There is no shared code between the 3 subroutines. The primary routine is used to format messages. One of its formats converts the decimal time of day as returned by TIME DEC to character strings in various formats. Not too long after I wrote the formatter I started working with SMF data. Its time of day is generally in the time of day format as returned by TIME BIN. The code to convert from binary time of day to packed decimal time of day is tricky enough I don't want to recode it all the time, so I wrote the conversion routine and added it as a fully independent subroutine with its own ENTRY statement. Even then I goofed. It takes its time of day in reg 0 (as from TIME BIN) and returns the decimal time of day in reg 0 (as from TIME DEC). So most of my programs that process SMF data have a subroutine to load the binary time of day from storage into reg 0, call the binary time of day to decimal time of day routine, and store the decimal time of day over the binary time of day.

The third entry point left justifies a character string that is right justified in a fixed length data area.
Back to top
View user's profile Send private message
josephineyeow

New User


Joined: 12 Mar 2020
Posts: 11
Location: USA

PostPosted: Mon Jul 27, 2020 8:15 pm    Post subject: Reply to: Multiple Entry
Reply with quote

Sure learning a lot of assembler. I'm basically a dinosaur cobol programmer now in a project to move assembler to cobol (worked on assembler eons ago and tried to forget the pain). It's nice to know I can count on support. THANK YOU. icon_lol.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1012
Location: Richmond, Virginia

PostPosted: Mon Jul 27, 2020 11:54 pm    Post subject:
Reply with quote

I learned a little FORTRAN in high school (1964).

When I took my first college computer course and learned assembler (Control Data 1604) I really got hooked - fun and also a good challenge.

My programming career was all non-assembler (mostly FORTRAN, COBOL, APL, BASIC, PL/I, SAS), but the few times I taught programming I always included assembler, even if a simple mock up on paper or simulated, so that my students always knew what was really going on.

Of course, languages like SAS are interpreted, rather than being compiled into pure machine language, but that's another issue.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating a single-record file with CO... Joerg.Findeisen DFSORT/ICETOOL 8 Tue Oct 06, 2020 8:19 pm
No new posts Read 4MB message and split into multi... myselfsk15 COBOL Programming 9 Fri Sep 25, 2020 7:24 am
No new posts Multiple Sums in one File Rick Ryan SYNCSORT 2 Wed Jul 29, 2020 1:30 am
No new posts Retrieve multiple records with metaco... Jose Juan J CA Products 0 Sat Jul 25, 2020 1:36 am
No new posts PKZIP - extracting multiple txt files drarem All Other Mainframe Topics 3 Tue Jul 07, 2020 8:47 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us