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
 

 

Need help in understanding EXEC CICS Load

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Thu Aug 12, 2010 7:30 pm    Post subject: Need help in understanding EXEC CICS Load
Reply with quote

I am new to CICS and I have the following code in my COBOL program:


Code:
EXEC CICS LOAD
                PROGRAM('BCE208OT')
                SET(ADDRESS OF LKBE-TABLE)
                HOLD
END-EXEC



and program BCE208BT is as follows:


Code:
BCE208OT CSECT
                 DC    C'****** START OF KBE TABLE ******'
                 DS    F                         NUMBER OF TABLE ENTRIES
KBETABLE         DS    200CL40              200 40 BYTE ENTRIES
                 DC    C'******  END OF KBE TABLE  ******'
                 END



I want to know is it necessary to write BCE208BT in assembler.
Can BCE208BT be written in COBOL? If yes, how?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 12, 2010 7:34 pm    Post subject:
Reply with quote

Quote:
I want to know is it necessary to write BCE208BT in assembler.
yes
Quote:

Can BCE208BT be written in COBOL? If yes, how?
can't
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 12, 2010 7:46 pm    Post subject:
Reply with quote

now, an analysis of BCE208BT needs to be done.

how is it used in your program?
is it used by other programs?

Since it can not be updated,
and contains no data,
it appears to be a hold-over from older cics where storage was a premium.

depending upon how it is used, it could be replaced by
  • an internal cobol table (internal to your cobol program)
  • getmain
Back to top
View user's profile Send private message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Thu Aug 12, 2010 8:04 pm    Post subject:
Reply with quote

Thanks for the quick response.

I just wanted to know if we can write a COBOL program in the program parameter of the EXEC CICS LOAD statement

So can I conclude that BCE208BT Program in EXEC CICS LOAD statement should be written in assembler only.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 12, 2010 8:08 pm    Post subject:
Reply with quote

Quote:

I just wanted to know if we can write a COBOL program in the program parameter of the EXEC CICS LOAD statement


a quick look of the manual would tell you, that that is correct.
there is more than 1 reason to LOAD a program, or load anything.

if the purpose is to load an assembler table via the LOAD API, then yes,
the user-prepared table needs to be written in assembler.

you need to read the manual before making too many conclusions.
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 Aug 12, 2010 8:13 pm    Post subject: Reply to: Need help in understanding EXEC CICS Load
Reply with quote

How does the number of entries in the CSECT get populated?

This will not yield itself as Threadsafe.

If you change -

Code:

BCE208OT CSECT
                 DC    C'****** START OF KBE TABLE ******'
                 DS    F                         NUMBER OF TABLE ENTRIES
KBETABLE  DS    200CL40              200 40 BYTE ENTRIES
                 DC    C'******  END OF KBE TABLE  ******'
                 END

to -

Code:

BCE208OT  CSECT
          DC    C'****** START OF KBE TABLE ******'
          DC    A(KBETABLN/40) NUMBER OF TABLE ENTRIES
KBETABLE  DS    200CL40        200 40 BYTE ENTRIES
KBETABLN  EQU   *-KBETABLE     LENGTH OF TABLE-RELATED STG
          DC    C'******  END OF KBE TABLE  ******'
          END

Then, the fullword will always be correct after Assembly and will resolve to 200.

Is there a particular reason why there are static literals surrounding the table information?

I trust the DSECT (COBOL LINKAGE COPYBOOK) are defined for these?

But, they don't make any sense, unless they're used as eyecatcher's....

Bill
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: Fri Aug 13, 2010 12:43 am    Post subject: Reply to: Need help in understanding EXEC CICS Load
Reply with quote

I see that you're issuing a LOAD PROGRAM HOLD. Are you using HOLD because you're then loading the 200 entries with data?

Note that when you use HOLD, the table becomes permanent in memory, unless you issue a RELEASE PROGRAM.

How do other programs/tasks know whether the table has been loaded or is in the process of being loaded? You can really cause some serious EUDSA shortages if many other tasks issue a HOLD as well.

Then, you'll having many copies of this table in memory.

There's a better way to make the table core-resident and that's to use a PLT-PI program, which issues a START of a TRANSID and then this transid is invoked when CICS receive control and loads the table with data in background.

In the PPT entry, have your Tech Support personnel define this table as core-resident.

It will be a better use of resources....

Bill
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Aug 13, 2010 12:55 pm    Post subject:
Reply with quote

Quote:
How do other programs/tasks know whether the table has been loaded or is in the process of being loaded? You can really cause some serious EUDSA shortages if many other tasks issue a HOLD as well.

Then, you'll having many copies of this table in memory.

This would apply where the program is defined with RELOAD=YES. With RELOAD=NO, once the program has been loaded, subsequent EXEC CICS LOADs will return the memory address of the already-loaded program.

Garry.
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: Fri Aug 13, 2010 3:23 pm    Post subject: Reply to: Need help in understanding EXEC CICS Load
Reply with quote

Quote:
This would apply where the program is defined with RELOAD=YES. With RELOAD=NO, once the program has been loaded, subsequent EXEC CICS LOADs will return the memory address of the already-loaded program.

Garry.

Yes, should have elaborated on this more....

Bill
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Aug 14, 2010 5:37 am    Post subject:
Reply with quote

FYI:
it is possible to write a cobol program to load the assembler table
and access its values.

The how requires understanding the layout of the assember table
and maybe a good CICS contract programmer to write it.

icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 14, 2010 1:39 pm    Post subject:
Reply with quote

FYI

The Topic Starter Originally wrote:
I want to know is it necessary to write BCE208BT in assembler.
Can BCE208BT be written in COBOL? If yes, how?


The TS already has a COBOL program loading an Assembler Table.
He wants to know if the table, to be loaded by the CICS LOAD API,
can be written in COBOL......
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sat Aug 14, 2010 5:55 pm    Post subject:
Reply with quote

Truth be known, in a prior life I actually DID encounter one situation in which a CICS program did a CICS LOAD(xxxx) of a table where xxxx was a COBOL program. The "actual" data for the table, however was offset from the load point by some 200+ bytes. Reason? the stuff inherent in a COBOL module that exists prior to the actual WORKING-STORAGE data in the executable module.
Of course, every time the COBOL table program was recompiled, even if just to change an argument or result value, the offset had to be determined anew due to compiler differences, and the COPYBOOK for the table used by the CICS program had to be changed to reflect the new offset, followed by a recompile of the CICS program as well.

Needless to say, I re-wrote the table module in Assembler so that the table always started at offset zero. Then the COPYBOOK only had to be updated for layout changes.

That need to redetermine the offset in a COBOL table is why LOADed tables should be written in assembler and not COBOL.
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 How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm


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