Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

EX instruction in a reentrant program?

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

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 11:32 am    Post subject: EX instruction in a reentrant program?
Reply with quote

Is it permissible to use EX(execute) instruction in a program that is supposed to be re-entrant?
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 12:29 pm    Post subject:
Reply with quote

From the POP :

The single instruction at the second-operand
address is modified by the contents of general
register Ri, and the resulting instruction, called
the target instruction, is executed.

When the Ri field is not zero, bits 8-15 of the
instruction designated by the second-operand
address are ORed with bits 56-63 of general register
Ri The ORing does not change either the
contents of general register Ri or the instruction in
storage, and it is effective only for the interpretation
of the instruction to be executed. When the
Ri field is zero, no ORing takes place.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Jun 07, 2011 12:30 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

Nice to check, but what is your worry?
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 12:48 pm    Post subject: Re: Reply to: EX instruction in a reentrant program?
Reply with quote

Bill Woodger wrote:
Nice to check, but what is your worry?


Out of curiosity.

EX does change the body of the program. If we are not permitted to amend local storage in a reentrant assembler program then we should not be allowed to use EX as well. That's what my logical feeling suggests.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Jun 07, 2011 1:11 pm    Post subject:
Reply with quote

Are you not permitted to amend local storage, or are you not permitted to rely on any amendments to local storage?

Anyway, a digression there.

Although you effectively "amend" the instruction being executed, it will operate in the manner you intend (as long as you establish things correctly before issuing the EX) whether starting from a fresh copy of the module or from a previously-used module.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 1:12 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

reread Peter reply and amend Your feelings ( from logical to plain wrong )

EX does not change anything

and if You do not trust Peter cut and paste skills reread the same here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/CCONTENTS?SHELF=DZ9ZBK03&DN=SA22-7832-03&DT=20040504121320
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 1:20 pm    Post subject:
Reply with quote

Enrico, thanks for the compliment regarding my cut/paste skills.

I could have said it in my own words, but why would i if its all there on the internets. If only people would take some pains to do some research
themselves.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 1:23 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

that' s also my point...
no need to rewrite what trained Information Developers have done in a ( usually ) better way icon_biggrin.gif
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 3:21 pm    Post subject: Re: Reply to: EX instruction in a reentrant program?
Reply with quote

I tested it and the change is just temporary.

Earlier I did have a look at the manual, but somehow missed "..temporarily modify...". icon_sad.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 4:00 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

Quote:
I tested it and the change is just temporary.

horse manure... You still do not understand it do You ?
seem pretty clear
Quote:
When the Ri field is not zero, bits 8-15 of the instruction designated by the second-operand address are ORed with bits 56-63 of general register Ri
The ORing does not change either the contents of general register Ri or the instruction in storage,
and it is effective only for the interpretation of the instruction to be executed.
When the Ri field is zero, no ORing takes place.


if the EX instruction would change even if temporarily main storage
zillions of line of code residing in write protected storage would have never worked
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 4:31 pm    Post subject: Re: Reply to: EX instruction in a reentrant program?
Reply with quote

enrico-sorichetti wrote:
horse manure... You still do not understand it do You ?


I do.
I am just referring to the explanation given in quick reference:
"The EXECUTE instruction executes the single instruction
at the second operand address, using the value in the
rightmost byte of the first operand register as a
modifier value. The 8 bits in the rightmost byte of
the first operand register are used to temporarily
modify
bits 8 through 16 of the executed instruction.
Depending on the instruction that is the target of
EXECUTE, this may be a length, a register number, or a
byte of immediate data. If the first operand specifies
R0, then the target instruction is executed, but no
temporary modification takes place. An EXECUTE
instruction cannot be the target of EXECUTE; a S0C3
ABEND will occur if this is attempted.
"
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 4:42 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

again I confirm ... Your understanding is wrong

again ( cut and paste from the POP )
Quote:
The single instruction at the second-operand address is modified by the contents of general register R1, and the resulting instruction, called the target instruction, is executed.
When the R1 field is not zero, bits 8-15 of the instruction designated by the second-operand address are ORed with bits 56-63 of general register R1.
The ORing does not change either the contents of general register R1 or the instruction in storage,
and it is effective only for the interpretation of the instruction to be executed. When the R1 field is zero, no ORing takes place.


what is that is not clear ?
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 4:51 pm    Post subject: Re: Reply to: EX instruction in a reentrant program?
Reply with quote

enrico-sorichetti wrote:
what is that is not clear ?


Thanks for the information related to EX. I have no doubts with it now.

The thing is I have pasted a piece of information in my previous reply I get when I do a "QW EX" on my tso command line. The information in blue fonts in the previous reply is what pops up after that. My point is: "Is the information there(on mainframe QW) incomplete in a sense?"


I confirm again I have no doubts with EX anymore. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 4:53 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

it would be nice that when somebody is told that he/she is wrong
he/she would not stand by his/her stubbornness an listen to people with much more experience

or at least if they do not want to believe people at least believe the IBM manuals
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 4:55 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

it is universally known that QW is too often wrong !
and must never be taken as a substitute for the official manuals and docs
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Jun 07, 2011 5:04 pm    Post subject:
Reply with quote

Quote:
it is universally known that QW is too often wrong !
and must never be taken as a substitute for the official manuals and docs
enrico -- WIDELY known, but (obviously) not UNIVERSALLY known! icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 07, 2011 5:20 pm    Post subject: Reply to: EX instruction in a reentrant program?
Reply with quote

Ok, I sit corrected ( more comfortable than standing ) icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 5:59 pm    Post subject:
Reply with quote

I expected after my response at least something like "peterholland, you are a wizard/genius. thanks a lot". Nothing like that. Im not sure if im going to support this TS in the future. icon_evil.gif
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Tue Jun 07, 2011 7:15 pm    Post subject:
Reply with quote

PeterHolland wrote:
I expected after my response at least something like "peterholland, you are a wizard/genius. thanks a lot". Nothing like that. Im not sure if im going to support this TS in the future. icon_evil.gif

thanks a lot peter! Sorry for the delay icon_smile.gif. I am away from my pc and writing thru a mobile device.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jun 07, 2011 10:43 pm    Post subject:
Reply with quote

Thats ok, one compliment i can live with.
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 I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us