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
 

 

Partial Key - VSAM Read Issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Wed Mar 18, 2009 10:22 pm    Post subject: Partial Key - VSAM Read Issue
Reply with quote

I have a file with below format, File is of 80 bytes Record Length and all 80 bytes is

Code:
01 WS-KEY.
   05 WS-FIELD1      PIC X(10)
   05 FILLER         PIC X(1)
   05 WS-FIELD2      PIC X(10)
   05 FILLER         PIC X(1)
   05 WS-FIELD3      PIC X(10)
   05 FILLER         PIC X(48)


which is having values as below
Code:

AAA     .1111111111.9999999999...........
ABCDF   .2222222222.9999999999...........
AB      .3333333333.9999999999...........


In my program, i don't have values for WS-FIELD1. I would need to read the 3rd record based on WS-FIELD2. I tried to use START and READ NEXT as below, but it didn't work.

Code:
 
MOVE LOW-VALUES TO WS-KEY
MOVE '333333333' TO WS-FIELD2     
START FILE-NAME KEY IS >= WS-KEY
NOT INVALID
 READ FILE-NAME NEXT
.
.


But this is actually not working. After the READ, we tried to put a display of the VSAM file REC, that is always the first record.

We tried with different values passed into WS-FIELD2.

Is there any way to satisfy our requirement ?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Wed Mar 18, 2009 10:52 pm    Post subject:
Reply with quote

Build an alternate index on WS-FIELD2. Read the file based on it.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am


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