Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to read VSAM files to REXX STEM variable?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to read VSAM files to REXX STEM variable?
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: 8620
Location: Back in jolly old England

PostPosted: Fri Apr 04, 2008 11:48 am    Post subject:
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    Post subject:
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: 8620
Location: Back in jolly old England

PostPosted: Fri Apr 04, 2008 1:06 pm    Post subject:
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    Post subject:
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: 8620
Location: Back in jolly old England

PostPosted: Fri Apr 04, 2008 2:53 pm    Post subject:
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    Post subject:
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: 8620
Location: Back in jolly old England

PostPosted: Fri Apr 04, 2008 4:53 pm    Post subject:
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: 456
Location: Belgium

PostPosted: Fri Apr 04, 2008 6:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us