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

Converting a Taped seqential file to Indexed VSAM File


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 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
Search our Forums:

Back to Top