Solved

How CICS deals with data persistence DB2 or VSAM ?

Posted on 2011-02-16
3
1,122 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34906893
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
ID: 34907709
I've just start reading but I guess you've done another excellent stuff....
0
 

Author Closing Comment

by:Eduardo Fuerte
ID: 34915242
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Choosing a core focus or particular set of features and options can be tough. To help out, we’re going to highlight a handful of things your business needs on one of your social media pages. In other words, if one of these is missing, you should imp…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

617 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