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
 

 

Converting a Taped seqential file to Indexed VSAM File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Wed Dec 07, 2005 11:04 pm    Post subject: Converting a Taped seqential file to Indexed VSAM File
Reply with quote

Guys
I need an urgent bit of help!
We have a VB sequential file on TAPE. The definition is as given below:
UNIT=VTAPE,
DCB=(BCSPN.MODEL,RECFM=VB,LRECL=940,BUFNO=40)

Question A:
I need to convert this to a VSAM file (for keyed reading) but keep the lengths/blocks intact. How do I do this? (will a normal IDCAMS do?)

Question B:
Once we have the VSAM, we need to read it and write the selected records in an output of the original sequential format. (RECFM=VB,LRECL=940). Is this possible? We are using normal COBOL370.

Help someone!
Back to top
View user's profile Send private message

Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Thu Dec 08, 2005 3:57 am    Post subject:
Reply with quote

Hi VG

I believe both the above tasks are possible with IDCAMS.

A) Define a new VSAM file with the length and blocks of your seq file using a IDCAMS step. The use another IDCAMS step to copy your seq file to the VSAM.

B) A DFSORT should be able to copy your selected records to seq file.

Correct me if I'm wrong.

Rgds,
Ramya
Back to top
View user's profile Send private message
naive

New User


Joined: 26 Apr 2005
Posts: 46
Location: LA

PostPosted: Thu Dec 08, 2005 2:37 pm    Post subject: Re: Converting a Taped seqential file to Indexed VSAM File
Reply with quote

hey ramya!
thanx for the reply but i need something more specific!
the seq file I have has a max record length of 940. But the length varies depending on the data in each row.
How do I get the average Rec L required to allocate the VSAM?
If i remember correctly, you need to give
a)Max Recl
b) Avg Recl
to specify the KSDS VSAM rite?

Is there any way I could allocate the VSAM without having to specify the avg length? If not, then what do i put in the avg length?

Or else, is there any way by which I can directly copy the seq to the variable length VSAM while maintaining each indiv rec l intact??
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Sat Dec 10, 2005 8:26 pm    Post subject:
Reply with quote

Hi VG

I tried to find any calculations to be followed for finding the average lrecl. But found none.

As far as my knowledge goes, in the DEFINE cluster, use the RECORDSIZE parameter to specify if it is VB or FB.

RECORDSIZE(average lrecl, max lrecl)

If both average and max are equal ==> FB
Else, VB

average may be calculated as the average between the minimum recl possible in your file and the maximum lrecl. I believe the value in the average clause may not make a difference in the VSAM allocation.

If I'm wrong let me know.

Rgds,
Ramya
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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