Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups 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
Author Message
anki

New User


Joined: 04 Apr 2008
Posts: 7
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
References
PostPosted: Fri Apr 04, 2008 11:47 am    Post subject: Re: How to read VSAM files to REXX STEM variable? Reply with quote

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3169
Location: Brussels once more ...

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: 7
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: 3169
Location: Brussels once more ...

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: 7
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: 3169
Location: Brussels once more ...

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: 7
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: 3169
Location: Brussels once more ...

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: 293
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1