Access VSAM datasets from REXX



IBM's Command List programming language & Restructured Extended Executor

Access VSAM datasets from REXX

Postby Vinayak » Fri Aug 27, 2010 11:39 am

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
Vinayak
 
Posts: 18
Joined: Tue Feb 09, 2010 7:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Access VSAM datasets from REXX

Postby expat » Fri Aug 27, 2010 11:44 am

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.
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: Access VSAM datasets from REXX

Postby Vinayak » Fri Aug 27, 2010 3:11 pm

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
Vinayak
 
Posts: 18
Joined: Tue Feb 09, 2010 7:01 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Access VSAM datasets from REXX

Postby prino » Fri Aug 27, 2010 3:17 pm

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Access VSAM datasets from REXX

Postby prino » Fri Aug 27, 2010 3:19 pm

Additional: If you run TSO in batch, you can of course change the steplib!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Access VSAM datasets from REXX

Postby steve-myers » Mon Aug 30, 2010 5:41 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Access VSAM datasets from REXX

Postby prino » Mon Aug 30, 2010 2:26 pm

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Access VSAM datasets from REXX

Postby stevenwscott » Fri Feb 25, 2011 8:28 am

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.
stevenwscott
 
Posts: 1
Joined: Fri Feb 25, 2011 7:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: Access VSAM datasets from REXX

Postby parthiban » Mon Mar 07, 2011 10:37 pm

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
Parthiban jayaraman
mainframe rexxer,
Banglore
parthiban
 
Posts: 66
Joined: Mon Oct 20, 2008 7:54 pm
Location: Bangalore-India
Has thanked: 0 time
Been thanked: 0 time

Re: Access VSAM datasets from REXX

Postby dick scherrer » Tue Mar 08, 2011 1:07 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post