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
 

 

hi. can we convert a flat file to variable VSAM file?

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

New User


Joined: 19 Nov 2009
Posts: 2
Location: Chennai

PostPosted: Thu Nov 19, 2009 9:42 am    Post subject: hi. can we convert a flat file to variable VSAM file?
Reply with quote

Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) Try to post your query in the relevant forum category 3) Make sure your query is not already posted and solved in our forums, Use the Search facility and avoid Reposts! If you are following the above rules, delete this message and post your query here!
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 19, 2009 9:57 am    Post subject:
Reply with quote

Hello and welcome to the forum,

Well, you have the "meaningful title" . . . icon_smile.gif

It will help us help you if you provide some specifics. From what you have posted, i can only offer "yes" to answer the question.

What is it you really want to accomplish?

If you post some sample input data and what you want the output vsam to be, someone should have a more useful reply.

Enjoy the forum.
Back to top
View user's profile Send private message
Lakshmipriya Dhanaraj

New User


Joined: 19 Nov 2009
Posts: 2
Location: Chennai

PostPosted: Thu Nov 19, 2009 10:08 am    Post subject: Reply to: hi. can we convert a flat file to variable VSAM fi
Reply with quote

Actually i want to copy the contents of the flat file to a VSAM file. if the flat file is a variable file then VSAM file created should also be a variable file. if not then a Fixed VSAM file should be created.
how could his be done?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Nov 19, 2009 10:17 am    Post subject:
Reply with quote

In reality, all KSDS VSAM files are variable length, even if the records happen to all be the same length. Try creating your VSAM file by simply using your SORT product (OPTION COPY).
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 19, 2009 10:18 am    Post subject:
Reply with quote

Hello,

I believe you need to do a bit of research on how vsam files are defined and used.

If there is some unknown sequential data, how should it be written into a vsam file? What should be the key(s)?

If you have "a file" that file can defined as a vsam file and then loaded, but i'm not aware of something that automagically knows how to define a vsam file on the fly from some sequential data.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Nov 19, 2009 11:00 am    Post subject:
Reply with quote

Can't the basic attributes of a VSAM file be defined in the SORTOUT DD?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Nov 19, 2009 11:08 am    Post subject:
Reply with quote

Hello,

Quote:
Can't the basic attributes of a VSAM file be defined in the SORTOUT DD?
Sometimes, but i'm not sure of the rules.

I may have misunderstood, but i understood that the goal was to have this happen with no definition provided - more or less automatic.

Additional clarification will probably help.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Nov 19, 2009 11:22 am    Post subject:
Reply with quote

Who needs clarification when every day is psychic day? icon_lol.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 19, 2009 12:34 pm    Post subject:
Reply with quote

As it's psychic day, I know you would ask for it, so here's a link to the manual which will show you how to define a KSDS, and how to load it using REPRO. Although, sort is usually a more efficient option.

To read the IDCAMS manual, Click HERE
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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