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
 

 

VSAM partial key read in CICS

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

New User


Joined: 30 Jan 2007
Posts: 6
Location: Chennai

PostPosted: Wed Apr 07, 2010 9:39 pm    Post subject: VSAM partial key read in CICS
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Wed Apr 07, 2010 9:42 pm    Post subject: Reply to: VSAM partial key read in CICS
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: 7931
Location: Bellevue, IA

PostPosted: Wed Apr 07, 2010 10:16 pm    Post subject:
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    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 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 INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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