Solved

How CICS deals with data persistence DB2 or VSAM ?

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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