Solved

How CICS deals with data persistence DB2 or VSAM ?

Posted on 2011-02-16
3
1,093 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
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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
I receive an error when trying to run a JCL job that accesses a cobol DB2 database on zOS mainframe 19 29,088
db2 16 714
DB2 JCL unexplained error? What am I doing wrong here? 2 1,023
MAINFRAME 5 208
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

809 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