Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us