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
 
CICS with VSAM(KSDS) through COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
mosesanand

New User


Joined: 10 Mar 2007
Posts: 1
Location: Bangalore

PostPosted: Sat Mar 10, 2007 9:15 pm    Post subject: CICS with VSAM(KSDS) through COBOL
Reply with quote

I wanto to know how to get the last record's key present in a VSAM KSDS, through COBOL coding in CICS region.
Back to top
View user's profile Send private message

nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Sat Mar 10, 2007 9:48 pm    Post subject: Re: CICS with VSAM(KSDS) through COBOL
Reply with quote

Hi,

you can get the key value of last record in the vsam file by moving high values to the key field ,then start browse and read the file.

FOR EXAMPLE:

01 EMPREC.
02 EMP-NO PIC X(5).
02 EMP-NAME PIC X(10).

assuming EMP-NO as key and file name as EMP-FILE.

MOVE HIGH-VALUES TO EMP-NO.

START EMP-FILE KEY >= EMP-NO.

READ EMP-FILE.


Please let me know if I am wrong.


Thanks,
Nandakumar
Back to top
View user's profile Send private message
munikumar
Currently Banned

New User


Joined: 18 Apr 2007
Posts: 24
Location: India

PostPosted: Fri Apr 27, 2007 10:05 am    Post subject:
Reply with quote

Nandakumar your are absolutely right in normal COBOL batch environment.
Anand, I am just confused wit your question. You are asking for COBOL code to point the record then what do you mean by "in CICS region". Do you mean an on-line VSAM file? If so, you will have to use STARTBR and READNEXT.

Regards
Munikumar G
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

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