Creating a sequential file in CICS

Tags:
CICS
CICS Sequential Files
GDG
VSAM
Initially I had VSAM in CICS, but now a client want to remove the VSAM files. I need to create a sequential file in CICS and store the data in a GDG. Is it possible and could you please suggest how can I achieve it?

Answer Wiki

Thanks. We'll let you know when a new response is added.

You didn’t indicate if this was an input or output file. To answer your question I’ll assume it’s for output. There are a couple of ways to do this.

The simplest thing to do is create a batch job to periodically REPRO the VSAM data set into the GDG flat file with IDCAMS. The command to do the REPRO is very easy and you just have to make sure flat file has the correct attributes (e.g., logical record length or LRECL).

The chief advantage to this technique is you won’t have to change anything in the CICS application. Instead you would just have to develop a job to REPRO to the flat file as well as delete and redefine the VSAM cluster. The disadvantages are the VSAM file has to be closed while the job is running and the fact that the GDG data will only be up to date as of the last batch run.

As an alternative, you can define an extrapartition transient data queue (TDQ) to create the flat file directly. In CICS you define this type of TDQ with a four-byte queue name and a corresponding eight-character DD name. You must add the DD name to the CICS JCL in which you also specify the GDG’s data set name. Note that the generation number will always be +1.

The advantage is the GDG will always be current without an additional batch processes.

There are a lot of reasons not to do it this way. First, extrapartition TDQs perform poorly when compared to VSAM. Second, you will have to close the TDQ or stop CICS to see all the records. Lastly, you will have to change the online application to write to the TDQ instead of the VSAM file.

You could also write an EXCI application where the CICS is reading the VSAM file and returning the record(s) to Batch and batch then writes the desired file.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following