Page 1 of 2

Access VSAM datasets from REXX

PostPosted: Fri Aug 27, 2010 11:39 am
by Vinayak
Hi all,
I need to access VSAM datasets from REXX but REXX doesn't support VSAM.
I googled this and got info about RXVSAM, i have aslo downloaded the zip for RXVSAM.
Please help me in using this package. I dont know how to include it in the existing system. i am using ZOS V1.4.

One more help, please tell me if VSAM support using REXX is available in ZOS v1.8 and above.

-vinayak

Re: Access VSAM datasets from REXX

PostPosted: Fri Aug 27, 2010 11:44 am
by expat
1) You will probably need a systems programmer to install RXVSAM, but that is something that you will need to check.

2) VSAM support still not available running z/OS 1.10 and not to my knowledge for any sucessor releases.

Why not tell us what you want to do with the VSAM file and maybe we can find a way to help.

Re: Access VSAM datasets from REXX

PostPosted: Fri Aug 27, 2010 3:11 pm
by Vinayak
Thanks expat for the reply.

I have already written some programs which use REPRO to copy vsam into PS and then use it.
But this process is too long and consumes lot of time. Also insert and delete operations are tidious.

I feel if i can use RXVSAM for file operations it will be more faster and easier.

for this reason i asked how to install RXVSAM.

-vinayak

Re: Access VSAM datasets from REXX

PostPosted: Fri Aug 27, 2010 3:17 pm
by prino
Vinayak wrote:for this reason i asked how to install RXVSAM.


Having had a very quick look at the package, it may be as simple as assembling the code and putting it into a library that is accessible to your TSO session. You probably need someone higher up to get the code into a STEPLIB, but you might be able to test it using TSOLIB.

Re: Access VSAM datasets from REXX

PostPosted: Fri Aug 27, 2010 3:19 pm
by prino
Additional: If you run TSO in batch, you can of course change the steplib!

Re: Access VSAM datasets from REXX

PostPosted: Mon Aug 30, 2010 5:41 am
by steve-myers
I, too, retrieved RXVSAM from www.cbttape.org, "file" 268. This will give you a .ZIP file on your PC. After you extract the contents of the ZIP file on your PC you will have one file, FILE268.XMI.

I then sent FILE268.XMI to a mainframe, and used the RECEIVE (RECEIVE INDATASET(FILE268.XMI) command to extract its contents. This creates a source type PDS; you will discover its name when you receive it.

Even by CBT standards the documentation in the source PDS is lousy. Its very verbose and poorly organized. You assemble one large member in the PDS, RXVSAM, and use the binder to create a load module from the object code. Fortunately there are no unusual macro libraries for the assembly, or SYSLIBs for the link edit step. The assembly requires both SYS1.MODGEN and SYS1.MACLIB. You then make this load module library available to your TSO session using the TSOLIB command as Mr, Prins suggested, or if you run TSO in batch you can use STEPLIB, again as Mr. Prins suggested.

Good luck with it.

Re: Access VSAM datasets from REXX

PostPosted: Mon Aug 30, 2010 2:26 pm
by prino
steve-myers wrote:I, too, retrieved RXVSAM from http://www.cbttape.org, "file" 268. This will give you a .ZIP file on your PC. After you extract the contents of the ZIP file on your PC you will have one file, FILE268.XMI.

I then sent FILE268.XMI to a mainframe, and used the RECEIVE (RECEIVE INDATASET(FILE268.XMI) command to extract its contents. This creates a source type PDS; you will discover its name when you receive it.

Even by CBT standards the documentation in the source PDS is lousy. Its very verbose and poorly organized. You assemble one large member in the PDS, RXVSAM, and use the binder to create a load module from the object code. Fortunately there are no unusual macro libraries for the assembly, or SYSLIBs for the link edit step. The assembly requires both SYS1.MODGEN and SYS1.MACLIB. You then make this load module library available to your TSO session using the TSOLIB command as Mr, Prins suggested, or if you run TSO in batch you can use STEPLIB, again as Mr. Prins suggested.

Good luck with it.


Actually, there are two RXVSAM packages. The one I looked at is on Sourceforge, and given that the OP also talked about a .ZIP file, I think this is the one he got. The description of this one says
Steven W. Scott wrote:Finally released!

RXVSAM represents a culmination of over 20 years of development and refinement of a certain s370 assembler VSAM io handler I built in the 80s. After years of refinement and enhancements, an assembly "stub" was created called RXVSAM to allow a easy to use interface between REXX and the underlying IO handler, primarily because I needed a method to create variable length records in a dataset. Thus, RXVSAM was born. This software is only found on sourceforge.net and is not available on the CBT tape for several reasons, but primarily to take advantage of SVN for version control and utilize the greater visibility that Sourceforge offers. If you find this software useful, please consider a donation! Steven W. Scott

posted by stevenwscott 440 days ago


FWIW, there is also an EXECIO equivalent for VSAM files, written by Piero Ronchi. It's called EXECIOVS and can be found here.

Finally, a general discussion about VSAM support for TSO, ISPF, REXX and CLIST can be found on Gilbert Saint-Flour's site.

Re: Access VSAM datasets from REXX

PostPosted: Fri Feb 25, 2011 8:28 am
by stevenwscott
It's pretty straightforward, just assemble VSAMIO and RXVSAM - VSAMIO must be in a lib under STEPLIB, but RXVSAM can be in a LIBDEF'd library. It should work on current z/os versions. Sorry if I missed any previous comm via Sorceforge - they have finally settled on a UI so I'll work on making the directions a bit easier to find and follow. Please let me know if you have any problems building/running. I'm happy to assist.

Re: Access VSAM datasets from REXX

PostPosted: Mon Mar 07, 2011 10:37 pm
by parthiban
Rexx code to Copy VSAM to SEQ file:
-----------------------------------------

/*rexx*/
"ALLOC FI(INDD) DA('R074443.VSAM.file') SHR REUSE"
"ALLOC FI(OUTDD) DA('R074443.Seq.file') SHR REUSE"
ADDRESS TSO ,
"REPRO INFILE(INDD) OUTFILE(OUTDD) COUNT(1)"
"FREE FI(INDD)"
"FREE FI(OUTDD)"
exit 0

Re: Access VSAM datasets from REXX

PostPosted: Tue Mar 08, 2011 1:07 am
by dick scherrer
Hello,

I have already written some programs which use REPRO to copy vsam into PS and then use it.
But this process is too long and consumes lot of time.

The question isn't about how to get vsam data into a ps file. It is about how to access vsam directly from rexx.

Also, i believe using the sort rather than repro will run much faster.