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

How VSAM files are read in CICS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
iknow

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Wed Nov 16, 2005 8:53 am
Reply with quote

hi folks

Can anyone tell me like how VSAM files are read in CICS programs. Please give me a detailed explanation.
Back to top
View user's profile Send private message
batu544

New User


Joined: 21 Jul 2005
Posts: 17
Location: bangalore

PostPosted: Wed Nov 16, 2005 3:52 pm
Reply with quote

there are three types of file in VSAM .. which type of file you want to read ??
Back to top
View user's profile Send private message
dgrinch

New User


Joined: 16 Nov 2005
Posts: 4

PostPosted: Thu Nov 17, 2005 12:06 am
Reply with quote

Say it's KSDS you're referring to, then include your FD stament in file-section, may be create working storage layout as file data buffer. If you use partial ket then, fill in key values and use STARTBR command which will bring you to a relatively closer to your record, then do successive READNEXTs to get to your record. If a full VSAM key is used, then directly issue a READ statement. Don't forget to handle return codes from STARTBR, READNEXT & READ (use EVALUATE stmt) use the DFH???? variables to look for non-zero return codes. Hopes this helps.
Back to top
View user's profile Send private message
saran

New User


Joined: 21 Nov 2005
Posts: 2
Location: Chennai

PostPosted: Mon Nov 21, 2005 4:57 pm
Reply with quote

Hi dgrinch,
But in CICS there is no FD section correct...?

If u want to read a file with direct access then u can use READ with record key in RIDFLD, if u want to read the file sequentially then use STARTBR, READ NEXT, ENDBR options.
Back to top
View user's profile Send private message
Nithya

New User


Joined: 09 Sep 2005
Posts: 2
Location: b'lore

PostPosted: Mon Nov 28, 2005 3:34 pm
Reply with quote

Hi,

For Reading VSAM files, the logical file name should be given in the CICS command.
For Eg.,
EXEC CICS READ FILENAME(logical file name)
RIDFLD(key field)
UPDATE

For Updating the file...we read it with Update option..
For a seq read...START BROWSE With READNEXT...


This Logical file name will be related to the physical file name in the FCT..
this is done by Mainframe Admins...
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 -> CICS

 


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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top