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

If the VSAM file is empty, the flat file should be empty


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohnish

New User


Joined: 22 Sep 2006
Posts: 4

PostPosted: Thu Jun 28, 2007 12:40 pm
Reply with quote

I've the following reqmnt.
Data from a VSAM file has to be extracted and put in a flat file. The VSAM file can be empty, say on weekends. If the VSAM file is empty, the flat file created should be empty as well.

What should be the approach to handle this requirement?
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 Jun 28, 2007 12:58 pm
Reply with quote

Hello,

Try IDCAMS REPRO or copy the vsam to flat using SORT.

If you need to do this in a COBOL program, just open the output file and close it. The open/close of the output flat file will create an empty but usable file.
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 -> COBOL Programming

 


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