Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 32
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
References
PostPosted: Tue Mar 11, 2008 4:57 pm    Post subject: Re: Doubt In TGT Reply with quote

dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6756
Location: 221 B Baker St

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: 2325
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

Global Moderator


Joined: 23 Nov 2006
Posts: 6756
Location: 221 B Baker St

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: 32
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: 2325
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

Active User


Joined: 14 Jan 2008
Posts: 211
Location: Orlando, FL, 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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1