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: 8593
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: 8593
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: 8593
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: 8593
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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