Solved

How CICS deals with data persistence DB2 or VSAM ?

Posted on 2011-02-16
3
1,052 Views
Last Modified: 2012-05-11
Hi Experts !

Could you please resume how CICS deals with data persisntence in VSAM or DB2 ?

I'd like only an overview (it doesn't need to be extensive)

(I'm planning to connect this question with the previous - that I'm stiil studying)

Thanks in advance !
0
Comment
Question by:Eduardo Fuerte
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
Comment Utility
Hi again,

VSAM datasets are defined to CICS using the DFHFCT ("File Control Table") or, as you might have guessed via RDO.
This table contains filename, dataset name, organization, share options, record format, allowed access (read, write, update...) etc.
A typical RDO definition might look like this:

CEDA DEFINE FILE(VSAM10B)  GROUP(xxxxxx)
            DSNAME(DTGCAT.VSAM10B)
            DISPOSITION(SHARE)  ADD(YES)
            BROWSE(YES)  DELETE(YES)  READ(YES)
            UPDATE(NO)  RECORDFORMAT(F)
            STRINGS(8)  LSRPOOLID(NONE)
            RECOVERY(NONE)  NSRGROUP(GROUP1)
            INDEXBUFFERS(8)  DATABUFFERS(9)


VSAM files are usually opened during CICS startup and are thus available to the CICS application routines without explicit OPEN processing.
Using COBOL/CICS the files are processed via CICS COBOL commands, the usual "EXEC CICS ... END-EXEC" construct. There is READ, READNEXT, WRITE etc.
The prototype for READ looks like this:
EXEC CICS READ { DATASET(name) | FILE(name) } { INTO(data-area) | SET(pointer-ref) } [LENGTH(data-area)] RIDFLD(data-area) [KEYLENGTH(data-area) [GENERIC]] [SYSID(name)] [RBA | RRN] [GTEQ | EQUAL] [UPDATE] END-EXEC.

The COBOL program must pass through the COBOL/CICS precompiler ("Command Language Translator") which will turn "EXEC CICS ... END-EXEC." into COBOL "CALL" statements.
These statements along with the remainder of the COBOl program are then processed by the standard FCOBOL compiler, the called CICS routines are finally linked to the object code by LNKEDT to make up a CICS program ("Application Load Module")

DB2 works quite analoguous, but in addition to FCT (now RDO) a CICS DB2 attachment facility must be used which provides CICS applications with access to DB2 data while operating in the CICS environment, that's to say it creates an overall connection between CICS and DB2 which is used b CICS applications to issue commands and requests (SQL) to DB2.

The analoguous COBOl CICS statement is "EXEC SQL ... END-EXEC", and, as opposed to VSAM, a DBRM (see below) must be opened explicitly.

For COBOL programs two additional steps are needed: an initial DB2 precompiler run which will build a database request model (DBRM) that contains information about each of the program's SQL statements, and a final bind process which uses the DBRM to produce an application plan that enables the program to access DB2 data. Inbetween are the ususal CICS translation, COBOL compilation and LINK steps.

Hope I could give you an idea how the magic might work, but as you will have noticed, it's just impossible to put more than some horribly simplistic rudiments here.
 
wmp


0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
I've just start reading but I guess you've done another excellent stuff....
0
 

Author Closing Comment

by:Eduardo Fuerte
Comment Utility
Thank you for your efforts in making it so didatic as you could.
Now is up to me capture the meaning the better I could and then return back with more specific questions.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now