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

How can I identify whther the file is empty or not


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rambabu
Currently Banned

New User


Joined: 18 Apr 2005
Posts: 67

PostPosted: Mon Jun 13, 2005 2:48 pm
Reply with quote

how can i identify whther the file is empty or not?u tell me in both cases vsam and flat file?
Back to top
View user's profile Send private message
ideas

New User


Joined: 25 May 2005
Posts: 52
Location: India

PostPosted: Mon Jun 13, 2005 3:01 pm
Reply with quote

use IDCAMS for this.
Back to top
View user's profile Send private message
Sangita

New User


Joined: 02 Jun 2005
Posts: 17

PostPosted: Mon Jun 13, 2005 4:21 pm
Reply with quote

Hi Ram,

You can use IDCAMS for the VSAM files or you check in the
DSLIST (3.4 OPT) ,%USED will be 0 for empty files.

Regards,
Sangita
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Jun 13, 2005 9:16 pm
Reply with quote

You could use DFSORT's ICETOOL to do that as described in this Smart DFSORT Trick:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t10
Back to top
View user's profile Send private message
ideas

New User


Joined: 25 May 2005
Posts: 52
Location: India

PostPosted: Wed Jun 15, 2005 6:27 pm
Reply with quote

Hi Frank & Ram,

this is the outline..how IDCAMS can be used:

Step 1: copy the file to a temp file using IDCAMS utility
If file empty this step may throw a RC 08,
Set MAXCC = 04, if it greater than 00.

Step 2: Check the condition, if the RC of previous step is NOT equal to 00, bypass the step.

Thanks.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
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
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top