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
 

 

Doubt In TGT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Doubt In TGT
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

Site Director


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

PostPosted: Tue Mar 11, 2008 10:14 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Mar 12, 2008 1:32 am    Post subject: Reply to: Doubt In TGT
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

Site Director


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

PostPosted: Wed Mar 12, 2008 9:33 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Mar 12, 2008 11:45 am    Post subject: Reply to: Doubt In TGT
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Mar 13, 2008 7:05 pm    Post subject: Doubt In TGT
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts Doubt on GETMAIN, FREEMAIN behaviour Arunkumar Chandrasekaran CICS 3 Sun Aug 30, 2015 9:22 pm
No new posts Doubt in using command code O Appu IMS DB/DC 4 Tue Jan 13, 2015 3:14 pm
No new posts Doubt in using command code D and N t... Appu IMS DB/DC 7 Mon Dec 29, 2014 5:52 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT macro command doubt sakrat TSO/ISPF 60 Wed Feb 05, 2014 6:47 pm


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