Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8280
Location: Dubuque, Iowa, 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 Procopt G -concurrent Read balacsv2 IMS DB/DC 1 Mon Apr 23, 2018 5:03 pm
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us