IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to read VSAM files to REXX STEM variable?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Fri Apr 04, 2008 11:47 am
Reply with quote

How can we read VSAM file in to REXX STEM variable with/without use of temporary sequential file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 04, 2008 11:48 am
Reply with quote

You Can't - there, that was easy
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Fri Apr 04, 2008 11:58 am
Reply with quote

1. There is a FILEMGR command which can be used but it is not working in my case: "FILEMGR £VX DSNIN='MY.VSAM.FILE' VARNAME=STEMVAR."
Do you agree with me that we can use this command to read VSAM files?

2.I also think that we can read VSAM files by using temp Sequential file, by following below steps:
1. copy VSAM to temp seq file.
2. read seq file in to STEM Variable.

Let me know if you agree on this also. If yes, then can you share command to achieve the same.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 04, 2008 1:06 pm
Reply with quote

FILEMGR is a pay for product I believe so not available at every shop, whereas IDCAMS REPRO is.
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Fri Apr 04, 2008 2:41 pm
Reply with quote

So is option 2 is feasible? Please advise.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 04, 2008 2:53 pm
Reply with quote

Advise to read this

http://publib.boulder.ibm.com/cgi-bin/bookmgr/FINDBOOK?filter=access+method+services&Collection=0
Back to top
View user's profile Send private message
anki

New User


Joined: 04 Apr 2008
Posts: 23
Location: Pune

PostPosted: Fri Apr 04, 2008 3:55 pm
Reply with quote

I tried using REPRO command to read VSAM file in to STEM variable, shown below:
"ALLOC DD(OUTFILE) DUMMY REUSE"
"ALLOCATE FILE(VSAMFILE) DA('"VSAM_FILE"') SHR" /* 1 */
X = OUTTRAP("OUT.")
"REPRO INFILE(VSAMFILE) OUTFILE(OUTFILE)"
X = OUTTRAP("OFF")

But REPRO command is giving out following error.
IDC3300I ERROR OPENING NULLFILE
IDC3321I ** OPEN/CLOSE/EOV ABEND EXIT TAKEN
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC0014I LASTCC=12

Do you think above shown code is correct?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 04, 2008 4:53 pm
Reply with quote

You need to REPRO the VSAM to a REAL file, not a dummy file, and then use that real file as your input to the REXX program
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Fri Apr 04, 2008 6:09 pm
Reply with quote

Jump into CBTTAPE.ORG

http://www.cbttape.org/

Quote:
//*+File 268: REXX function package to access VSAM files * DOC FILE
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top