IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Doubt In TGT


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Tue Mar 11, 2008 4:57 pm
Reply with quote

Hi Guys,

Recently I have read one CICS document in that they given purpose TGT table like below
"In case application program altered by the program itself during execution of the program for a task, the information for the program alteration will be kept in TGT table"

Can anyone tell me How can application program altered by the program itself??
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 11, 2008 10:14 pm
Reply with quote

Hello,

It is possible (though strongly discouraged - even prohibited most places) to write self-modifying code.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 12, 2008 1:32 am
Reply with quote

Looks like the people who wrote that document are missing a bit of information ...

It would be nice to find where they got then idea that a program can modify itself

http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhp3/dfhp3r3.htm

or, please, if I got it wrong reword/clarify a bit Your original question
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 12, 2008 9:33 am
Reply with quote

Hello,

Quote:
It would be nice to find where they got then idea that a program can modify itself
Though self-modifying code was usually assembler, using the ALTER statement a COBOL program could change instruction execution order during the run.

Again, not permitted at most places anymore. . .

Thank goodness icon_smile.gif
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Wed Mar 12, 2008 10:56 am
Reply with quote

Hi Enrico,

I have read in CICS user Guide PDF. In that they have given about TGT. But still am not clear how its possible.

Any guys have sample code for this??
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 12, 2008 11:45 am
Reply with quote

The wording was very poor

http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com.ibm.cics.ts31.doc/dfhs1/dfhs14i.htm

from the above
Quote:
For each invocation of the COBOL program, CICS copies the static TGT from program storage into CICS dynamic storage (the COBOL area) and uses the dynamic copy instead of the static one. CICS also copies working storage from program storage to the COBOL area, above the TGT. Task-related COBOL areas thus enable the single copy of a COBOL program to multithread as if it were truly reentrant.

TGT ( Task Global Table ) is related to cobol only and its inherent stupidity,
so after all the document was referring only to the data part being shuffled around for the reentrancy requirement

again in any case it is forbidden to modify the einstruction part of a running program
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 13, 2008 7:05 pm
Reply with quote

FWIW, R9 points to the TGT in a CICS transaction dump (and maybe Batch, but I'm not 100%) and at that R9 address, you'll also find a COBOL (not CICS) eyecatcher as it relates to the version/release.

Been there, done that, got the tee-shirt. icon_wink.gif

Regards,

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
No new posts doubt when executing a file when logg... TSO/ISPF 2
No new posts Doubt in MFS IMS DB/DC 2
No new posts Doubt on GETMAIN, FREEMAIN behaviour CICS 3
No new posts Doubt in using command code O IMS DB/DC 4
Search our Forums:

Back to Top