View previous topic :: View next topic
|
Author |
Message |
anki
New User
Joined: 04 Apr 2008 Posts: 23 Location: Pune
|
|
|
|
How can we read VSAM file in to REXX STEM variable with/without use of temporary sequential file. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
You Can't - there, that was easy |
|
Back to top |
|
|
anki
New User
Joined: 04 Apr 2008 Posts: 23 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
FILEMGR is a pay for product I believe so not available at every shop, whereas IDCAMS REPRO is. |
|
Back to top |
|
|
anki
New User
Joined: 04 Apr 2008 Posts: 23 Location: Pune
|
|
|
|
So is option 2 is feasible? Please advise. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
anki
New User
Joined: 04 Apr 2008 Posts: 23 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Jump into CBTTAPE.ORG
http://www.cbttape.org/
Quote: |
//*+File 268: REXX function package to access VSAM files * DOC FILE
|
|
|
Back to top |
|
|
|