|
|
| Author |
Message |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
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 |
|
 |
References
|
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
| Thanks Garry. |
|
| Back to top |
|
 |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
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 |
|
 |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
| 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 |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1633 Location: germany
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
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?
Garry |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1633 Location: germany
|
|
|
|
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 |
|
 |
Garry Carroll
Active User
Joined: 08 May 2006 Posts: 171 Location: Dublin, Ireland
|
|
|
|
Apologies, obviously replies are overlapping.....
Cheers,
Garry. |
|
| Back to top |
|
 |
raghav08 Warnings : 1 New User
Joined: 03 Jun 2008 Posts: 40 Location: Bangalore
|
|
|
|
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 |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1633 Location: germany
|
|
|
|
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 |
|
 |
|
|