Page 1 of 4

How to access a VSAM?

PostPosted: Thu Aug 21, 2008 4:23 pm
by fazillatheef
How to access and process a VSAM file using REXX?

Re: How to access a VSAM?

PostPosted: Thu Aug 21, 2008 5:08 pm
by MrSpock
REXX doesn't support file I/O to/from VSAM datasets.

Re: How to access a VSAM?

PostPosted: Thu Aug 21, 2008 10:18 pm
by Pedro
rexx does not provide support. But you can google for REXX VSAM and find external packages that do.

Re: How to access a VSAM?

PostPosted: Fri Aug 22, 2008 5:17 pm
by expat
It depends on the processing that you want to do.

You can use REPRO from inside REXX to retrieve a record of a KSDS by key, perform whatever task within the REXX, and then once more invoke IDCAMS to replace the record into the KSDS.

Re: How to access a VSAM?

PostPosted: Wed Sep 24, 2008 10:12 pm
by rlilley
Mark Winges' RXVSAM is available on the CBT FILE268.
I have used this for many years and am very happy with it. I would check it out.

Re: How to access a VSAM?

PostPosted: Tue Dec 01, 2009 7:18 pm
by Jikesh Patel
Hello,

expat wrote:
You can use REPRO from inside REXX to retrieve a record of a KSDS by key, perform whatever task within the REXX, and then once more invoke IDCAMS to replace the record into the KSDS.


You mean to say to write the command:
ADDRESS TSO ,
"REPRO INFILE("VSAM_file") OUTFILE("Seq_file") COUNT(1)"
And then open a seq_file?

But how to edit the vsam record and save on the same VSAM file?

Re: How to access a VSAM?

PostPosted: Tue Dec 01, 2009 7:39 pm
by MrSpock
I think that question was already answered.

Why would you WANT to do such a process with REXX when there are other languages much better suited to this?

Re: How to access a VSAM?

PostPosted: Thu Dec 03, 2009 12:09 am
by Jikesh Patel
Thanks MrSpock,

REXX is used to make automat the processes so if we create REXX utility to copy a VSAM file to new VSAM file with same attribute. This is maily used to dump one regiion to other like production region to test region.

The same thing we can do by JCL but for that we have to run that JCL for every vsam file.

I am sure I will get very good suggestions for doing this.

Thanks,
-jd patel

Re: How to access a VSAM?

PostPosted: Thu Dec 03, 2009 4:17 am
by dick scherrer
Hello,

One of the best suggestions you will receive is that this is not a job for rexx. It is a job that should be run in a batch process. The batch process will probably be repeated many times, so there is a small investment to create the initial job(s) and then it is only a matter of running them.

If you want something more automated, you could condiser using rexx to create the batch jcl to be submitted. . .

Re: How to access a VSAM?

PostPosted: Thu Dec 03, 2009 12:57 pm
by expat
And it is untrue that you would need to run a Batch Job (NOT JCL) for every VSAM file.

Have you not looked at DFdss or even better if it is installed, FAVER.

You use ONE job to dump on the prod LPAR and ONE job to restore on the other LPAR