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: 7936
Location: Bellevue, IA

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 Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 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 Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am


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