Solved

How CICS deals with data persistence DB2 or VSAM ?

Posted on 2011-02-16
3
1,112 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to start a CICS region from SDSF, IBM Mainframe, z/OS ? 12 3,837
calling DB2 stored procedure from query tool 2 1,637
Macro in PC5250 2 835
RACF & IBM mainframe security audit 4 1,210
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

710 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