There is nothing within standard TSO/E REXX that supports VSAM access. According to your post, you tried using "Rvopen", which is apparently a service of a third-party add-on package called RLX/VSAM by RAI.
You would need a third-party package, such as the above mentioned RLX/VSAM or REXX/TOOLS, so, if you do have the RLX/VSAM product, why not contact them with your specific problem.
Otherwise, you would need to write your own access modules in whatever language that would suit your purposes. An Internet search might turn up some freeware/shareware programs that would do this.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Aug 06, 2004 7:16 am Post subject:
LAKS,
The REXX language does not include any particular support for VSAM, and EXECIO does not support it.
Using the REPRO command and a temporary non-VSAM data set, a REXX exec can use EXECIO to retrieve and update VSAM data, as shown in this example:
Code:
"ALLOCATE DD(TEMPDD) NEW SPACE(1) TRACKS DSORG(PS) LRECL(4095) RECFM(V B)"
"REPRO IDS(TESTKSDS) OFILE(TEMPDD) FROMKEY('98040') COUNT(1)"
"EXECIO 1 DISKR TEMPDD"
PULL Record
"EXECIO 0 DISKR (FINIS"
"FREE DD(TEMPDD)"
<process data in "record" variable>
By combining the PRINT command and the OUTTRAP function, a REXX exec can retrieve VSAM records into a stem variable, as shown in the following example:
Code:
x=OUTTRAP('rec.')
"PRINT IDS(TESTKSDS) FROMKEY('98040') COUNT(5) CHAR"
x=OUTTRAP('off')
DO i=1 to rec.0
IF LEFT(rec.i,13) \= 'KEY OF RECORD' THEN
SAY rec.i
END
If REPRO and PRINT do not satisfy your VSAM access needs, you may use RXVSAM which is an Assembler language program, which was created to provide this ability. The RXVSAM program is called from a REXX EXEC as a function
Here is a REXX code fragment that invokes RXVSAM to write a single record into an ESDS:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum