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: 8165
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 VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

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