IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAM partial key read in CICS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
craig2020

New User


Joined: 30 Jan 2007
Posts: 7
Location: Chennai

PostPosted: Wed Apr 07, 2010 9:39 pm
Reply with quote

Hi,
I have a VSAM file with composite key which is the first 10 bytes in the file. The fields that forms the key are SSN number and the ACCOUNT number in the same order.

My requirement is to read the file using the second partial key Account number to get the associated SSN number.

ex
SSN ACCOUNT
12345 AAAAA

Do I require AIX defined on the partial key Account number to read the file based on account number?

P.S
I tried the following two commands, both giving resp as NOTFOUND

Code:
EXEC CICS STARTBR
          DATASET    (DATASET NAME)
          RIDFLD       (ACCT-NUM)
          KEYLENGTH (5)
          GENERIC
          EQUAL

EXEC CICS READ
          DATASET     (DATASET NAME)
          INTO           (OUTPUT-RECORD)
          RIDFLD        (ACCT-NUM)
          LENGTH       (FILE LENGTH)
          KEYLENGTH  (5)
          GENERIC
          GTEQ
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Apr 07, 2010 9:42 pm
Reply with quote

Quote:
Do I require AIX defined on the partial key Account number to read the file based on account number?
Yes!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 07, 2010 10:16 pm
Reply with quote

Generic reads work left to right -- if SSN is first, you must use it to do a GENERIC read. Therefore as enrico says you will need to define an alternate index to get to the account number.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top