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

How can we define a VSAM file in cobol?


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

New User


Joined: 03 Mar 2007
Posts: 17
Location: hyd

PostPosted: Thu May 22, 2008 4:18 pm
Reply with quote

Hi,

How can we define VSAM file in our COBOL program?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 22, 2008 4:20 pm
Reply with quote

How do you mean define ............

a) a physical define as in IDCAMS delete / define.
b) define the file as a VSAM file to the program.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 22, 2008 4:25 pm
Reply with quote

to use vsam files inside cobol programs
click on the programs link at the top of the page and scroll down to the cobol vsam samples

to define ( allocate ) a VSAM cluster
click on the JCLs link at the top of the page and scroll down to the
MVS utilities IDCAMS section
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu May 22, 2008 4:42 pm
Reply with quote

mastra,

Identify and define the files in the ENVIRONMENT and the DATADIVISION. Then you can read the records in the PROCEDURE DIVISION.

check the COBOL manual available in the manuals section.
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu May 22, 2008 4:49 pm
Reply with quote

This one is Basic query and you will find its solution in every COBOL Docs. Make a search on this FORUM or Googled it.

Yogeshwar
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 FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top