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
 

 

What is the usage of LOAD command in CICS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 12:52 pm    Post subject: What is the usage of LOAD command in CICS
Reply with quote

Hi,

What is the usage of LOAD command in CICS? in what circumstance we need to use this. Please expalin in detail.
Back to top
View user's profile Send private message

Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 1:00 pm    Post subject:
Reply with quote

You can use EXEC CICS LOAD to load a program or user-table module into memory, or to find the address of a module. There is an option to make the module RESIDENT which might be of use if you don't want the PPT entry to specify residence.

Regards,
Garry.
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 1:14 pm    Post subject: Reply to: CICS LOAD usage
Reply with quote

Garry,

Could you please post a piece of code which having LOAD command, and just brief the usage of this code. Because would like to know the usage while developing the CICS application program.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 1:41 pm    Post subject:
Reply with quote

Hi Rai,

This code snippet demonstrates LOAD of a program which is an application table and makes it resident. The table entries are defined in DPT_TABLE_ITEM and are not updated. The table would mtypically be static as changes would require recoding of the table module.

Code:

   DCL SOME_INDEX                  BIN FIXED(31) INIT(1); 
   DCL TAB_PTR, DPT_PTR            POINTER;

   DCL 1       DPT_TABLE_ITEM      BASED(DPT_PTR),
              3   DPT_ID             CHAR(3),
              3   DPT_NAME           CHAR(20),               
                       .
                       .
              3   DPT_END            CHAR(0);
 

   /* determine the index somehow...   */
   SOME_INDEX = 2;
 
   /*  Load Table as resident - if not already loaded.  In any case, */
   /*  get the table's address...                                                   */

   EXEC CICS LOAD PROGRAM ('TABNAME') SET (TAB_PTR) HOLD;

   WRK_OFFSET = LENGTH(DPT_TABLE_ITEM) * SOME_INDEX;
   DPT_PTR = POINTERADD(TAB_PTR,WRK_OFFSET);

   /*  can now access details of the table entry      */




There are multiple entries in the program/table called TABNAME and it is necessary to calculate the offset into each. This could be done by looping through the table looking for a match. You could also map to the next entry by setting
Code:

 DPT_PTR = ADDR(DPT_END);


Regards,
Garry.
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 2:36 pm    Post subject: Reply to: CICS LOAD usage
Reply with quote

Thanks Garry.
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 3:00 pm    Post subject: Reply to: What is the usage of LOAD command in CICS
Reply with quote

Garry,

I have question for you.

Suppose the table DPT_TABLE_ITEM is loaded at task no.1 and your application program gave the control back to CICS. In task no.2 once again your program received the control back, during this can i access the table using the pointer which was loaded during the task no.1?

Basically i would like to know, using LOAD command can we access the data like DFHCOMMAREA?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 3:28 pm    Post subject:
Reply with quote

Rai,

The way LOAD works is that it sets the pointer to the address of the loaded program.

If the program is not already loaded, then the program is loaded and the address is set in the PPT and returned to the task. If the program is already loaded, the address in the PPT is returned to the task. In this way, any number of tasks can access the same copy of the loaded program.

It is possible to update the in-memory table but this is not recommended as the changes are not reflected back to the original load module or its source and so are lost if/when the program is re-loaded. If the program is not loaded with HOLD, re-loading can be random, being dependent on CICS memory management.

Regards,
Garry.
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 3:57 pm    Post subject: Reply to: What is the usage of LOAD command in CICS
Reply with quote

Garry,

To some extend i understood the concept of the LOAD. Correct in thinking that, If I load a application program using LOAD command the advantage is reduce system overhead on load and unload.


I saw a statement in our manual "To load program/table/map from the CICS DFHRPL concatenation library into the main storage"

Here DFHRPL does represents a macro to define the program in PPT?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 4:22 pm    Post subject:
Reply with quote

Quote:
If I load a application program using LOAD command the advantage is reduce system overhead on load and unload.

The overhead is only reduced if you specify HOLD. This is the same as making the program RESIDENT in the PPT. Both have the effect of keeping the program in storage once loaded.

Quote:
"To load program/table/map from the CICS DFHRPL concatenation library into the main storage"


DFHRPL is not a macro. If you look at the CIC execution JCL you will see ddname DFHRPL . This specifies the (concatenation of) load libraries where CICS expects application programs to be stored. This is separate from STEPLIB which is where CICS's own load modules are found.

CICS Program Control locates programs in the DFHRPL library/ies whenever a program is required. This may be from CICS starting a task or a task issuing EXEC CICS LINK, EXEC CICS XCTL, EXEC CICS LOAD .

Tasks/Programs are defined in the PCT/PPT using the online CEDA transaction or the offline DFHCSDUP utility.

Regards
Garry.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jul 16, 2008 4:30 pm    Post subject:
Reply with quote

I acept the need to 'LOAD' tables, etc.

But I don't see any advantage to loading an executable module before xctl/link. If there was, the documentation would indicate that one should.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 4:39 pm    Post subject:
Reply with quote

Dick,

What I meant to convey is that CICS itself will load the module, if needed, whenever a LINK, XCTL or LOAD is performed. Certainly having to perform a LOAD before a LOAD would be amusing! Which comes first, the LOAD or the LOAD?

icon_rolleyes.gif

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

Global Moderator


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

PostPosted: Wed Jul 16, 2008 4:47 pm    Post subject:
Reply with quote

Garry,

I was responding to this:
Quote:
Garry,

To some extend i understood the concept of the LOAD. Correct in thinking that, If I load a application program using LOAD command the advantage is reduce system overhead on load and unload.


I saw a statement in our manual "To load program/table/map from the CICS DFHRPL concatenation library into the main storage"

Here DFHRPL does represents a macro to define the program in PPT?


I interpreted the comments of the OP to mean that he figured he could reduce the time to xctl/link.

If the OP meant other than what he said, I misinterpreted his miss-statement.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 4:50 pm    Post subject:
Reply with quote

Apologies, obviously replies are overlapping.....

Cheers,
Garry.
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 5:07 pm    Post subject: Reply to: What is the usage of LOAD command in CICS
Reply with quote

Garry,

Yes I could see the DD name DFHRPL in my CICS job which concatenated with many load libraies.

Mean while please clarify me on NEW COPY. Whenever we do NEW COPY on CICS application program, internally the new version of load module copied to load library under DD name DFHRPL?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jul 16, 2008 5:19 pm    Post subject:
Reply with quote

raghav08,

my sympathy goes out to you, having to work in a one man shop, no one to ask, no one to talk to.

you keep asking very basic questions. The new copy has been covered previously.

CICS maintains its 'LOAD Library' in core (memory). A new copy simply reloads the module from the application load library (which changed when you compiled/linked your module) into CICS core.


This is a link to IBM's document server listing about every cics doc that they have: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=CICS&SUBMIT=Find

you could also visit the redbook site: http://www.redbooks.ibm.com/redbooks.nsf/redbooks/
to find (and then download and READ).
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 5:36 pm    Post subject: Reply to: What is the usage of LOAD command in CICS
Reply with quote

dbzTHEdinosauer,

Till now I knew that NEWCOPY will copy the new version of link edited load module of application program to CICS load libray, question i have is To which CICS load libary?

The load library under DD name DFHRPL? this what i want to confirm. My apologies, I'm not looking for what's the functionality of NEWCOPY.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 5:44 pm    Post subject:
Reply with quote

Quote:
Till now I knew that NEWCOPY will copy the new version of link edited load module of application program to CICS load libray,


Til now you have been wrong. NEWCOPY will copy the new version of the module FROM the first library in the DFHRPL concatenation.

It's the linkedit that puts the new version IN the load library.


As dbzTHEdinosaur says, this is very basic.


Regards,
Garry.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Wed Jul 16, 2008 5:49 pm    Post subject:
Reply with quote

Quote:
NEWCOPY will copy the new version of the module FROM the first library in the DFHRPL concatenation.
More precisely, NEWCOPY updates the internal CICS pointer to the program from the first library in the DFHRPL concatenation that contains the load module. If there's more than one copy of the load module in the DFHRPL concatenation libraries, the ones in the later libraries are ignored. If the load module only exists in the 17th library concatenated to DFHRPL, that's the one used for the NEWCOPY.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 16, 2008 5:57 pm    Post subject:
Reply with quote

Quote:
...that's the one used for the NEWCOPY.

hmmmmmm....

NEWCOPY invalidates the address in the PPT (internal CICS pointer) so that, when the program is next required, CICS finds it missing from storage and THEN searches the DFHRPL concatenation, selecting the first module of that name found.....

Garry
Back to top
View user's profile Send private message
raghav08
Currently Banned

New User


Joined: 03 Jun 2008
Posts: 94
Location: Bangalore

PostPosted: Wed Jul 16, 2008 6:13 pm    Post subject: Reply to: What is the usage of LOAD command in CICS
Reply with quote

Quote:
It's the linkedit that puts the new version IN the load library.


Garry,

Thanks for your posting.

Correct in thinking that,

1) When I changed the CICS program and link edited in TSO region, the new load module will reside in the first load library of DFHRPL

2) When I do NEWCOPY, the new load module copied FROM first libray of DFHRPL "TO" which load libray? [/quote]
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 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


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