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

How to convert VSAM file to Flat file (PS File)


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
afroz alam

New User


Joined: 02 Jul 2007
Posts: 13
Location: India

PostPosted: Tue Jan 25, 2011 11:35 pm
Reply with quote

I want to convert VSAM file to PS file. The record size of VSAM file is 60520. When i tried to convert this through JCL (using IDCAMS) by providing DCB parameter (LRECL=60520,RECFM=VB,BLKSIZE=0), it gives JCL error saying 'LRECL is too large'. I think it is because of LRECL should be max of 32768.

Can we do this through any programs or utility? How to convert VSAM of recordsize 60520 into PS File?

I have seen so may documents for this, all are mentioned this throgh IDCAMS but their record size was less. so there was no problem. But nowhere mentioned if the record size is bigger, then how to convert.

Thanks for the help in advance.

Thanks
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: Wed Jan 26, 2011 12:49 am
Reply with quote

Hello,

Write a bit of code or use a utility to split the large vsam records into multiple smaller records.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 26, 2011 12:51 am
Reply with quote

From the Access Method Services for Catalogs manual on the DEFINE CLUSTER record size:
Quote:
Restriction: With REPRO and EXPORT, you cannot use data sets with record sizes greater than 32 760.
So you can either (1) manually figure out how to split the VSAM records into records of no more than 32760 bytes so you can copy the VSAM file to a sequential file, or (2) give up on the idea of dumping the VSAM file to a sequential file. Your choice.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Wed Jan 26, 2011 1:02 am
Reply with quote

I've never tried it, but (if I interpret the JCL manual correctly) you "might" be able to use RECFM=VS (no B), with LRECL=X, and a BLKSIZE that is NOT equal to zero (suggest a BLKSIZE of just less than a half track for dasd, or 32760 for tape )

Worth a try?

Of course, the larger question remains - what is the purpose for copying the VSAM file to a PS file in the first place?
Is it just for "backup" purposes (if so, there are MUCH better ways to do it).
Will the output file be used as input to another process? If so, how will the recipient program handle such a large LRECL?
Back to top
View user's profile Send private message
afroz alam

New User


Joined: 02 Jul 2007
Posts: 13
Location: India

PostPosted: Wed Jan 26, 2011 10:40 pm
Reply with quote

Thanks to all for the response......

@Ronald Burr - I tried with VS with BLKSIZE=0, it did notwork...I will try with BLKSIZE not equal to zero. Will let you know.

As per your question, yes, VSAM to PS file is required as it will be used by another system to read it.

Once again, Thanks to All....
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: Wed Jan 26, 2011 10:47 pm
Reply with quote

Hello,

Quote:
VSAM to PS file is required as it will be used by another system to read it.
You need to consider how to split the records so the other system will be able to read the data. . .

Or simply create another vsam file for that system to read. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 26, 2011 11:23 pm
Reply with quote

The TS could look at LRECL=X, BFTEK=A, RECFM=VBS
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 -> PL/I & Assembler

 


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 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