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
 

 

Easytrieve Process whole VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
jtwohig

New User


Joined: 24 Jul 2006
Posts: 18

PostPosted: Tue May 08, 2007 6:42 pm    Post subject: Easytrieve Process whole VSAM file
Reply with quote

Hi,

I've looked in the Ez manuals but can't seem to find an example of how to read a whole VSAM file sequentially. All I want to do is read the whole VSAM file, extract two fields and write them to a flat file.

Thanks,
J.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 08, 2007 9:28 pm    Post subject:
Reply with quote

Hello,

Declare the filename as VS in the file specification.

Use the same "JOB INPUT filename" syntax that you would use for a QSAM file.

Unless you terminate the code, it will read the whole file. . .
Back to top
View user's profile Send private message
jtwohig

New User


Joined: 24 Jul 2006
Posts: 18

PostPosted: Tue May 08, 2007 9:47 pm    Post subject:
Reply with quote

Thanks Dick !
How would I code the "READ" statement ?
I know if I'm doing a random lookup I code this:
READ VSAMFILE KEY VS-KEY
but how would I code to READ the whole file ?

Thanks!
J.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 1:54 am    Post subject:
Reply with quote

Hello J,

You should be able to
Quote:
Use the same "JOB INPUT filename"


As you are reading sequentially, you don't need the READ/KEY specification.

Sorry this didn't get sent earlier - thought i'd sent it, but was interrupted and had not.
Back to top
View user's profile Send private message
jtwohig

New User


Joined: 24 Jul 2006
Posts: 18

PostPosted: Wed May 09, 2007 11:16 pm    Post subject:
Reply with quote

Ok, here's what I have, but I keep getting errors:

JOB INPUT(VSAMFILE)
READ VSAMFILE
*******B054 NOT A VALID FILE - VSAMFILE
*******B026 REQUIRED PARAMETER IS NOT CODED - KEY

I define the file as:

1 FILE VSAMFILE VS
2 W-FIELD1 1 7 A
3 W-FIELD2 8 2 N

I'm not sure what I'm doing wrong...
Thanks,
J.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 11:21 pm    Post subject:
Reply with quote

Hello,

Try replacing this
Code:
JOB INPUT(VSAMFILE)
READ VSAMFILE
with
Code:
JOB INPUT VSAMFILE
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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