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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Nov 19, 2009 9:57 am
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
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
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

Moderator Emeritus


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

PostPosted: Thu Nov 19, 2009 10:18 am
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
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

Moderator Emeritus


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

PostPosted: Thu Nov 19, 2009 11:08 am
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Nov 19, 2009 12:34 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top