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

How to get count from a tape file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajnikanth.ch

New User


Joined: 04 Apr 2007
Posts: 2
Location: chennai

PostPosted: Fri Feb 29, 2008 11:12 am
Reply with quote

I want to a jcl hoe to get count from a tape file
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 29, 2008 5:51 pm
Reply with quote

Quote:
Rough estimate - take a look at the TMS report to see how many blocks are used, and then multiply by the number of records per block.

More accurate for FB than it is for VB though icon_confused.gif

My reply to the same thread raised by someone else in the JCL forum.

I puzzles me as to why you would actually want to know the number of records on a file, and would willingly waste resource just to find out ?

Let's face it, if the record count was that important then the program that creates the file should issue this information or some type of internal record reconciliation program / product implemented.
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: Fri Feb 29, 2008 9:52 pm
Reply with quote

If you want to use DFSORT to get the count, you can use the technique discussed in the "Display the number of input or output records" Smart DFSORT Trick at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Feb 29, 2008 10:58 pm
Reply with quote

expat wrote:
Let's face it, if the record count was that important then the program that creates the file should issue this information or some type of internal record reconciliation program / product implemented.
Hi,

expat's above point is quite logical. However, not sure though, if You would like to know characteristics such as
Code:
RECFM=XX   ; LRECL=   XXX; BLKSIZE= XXXXX 

You can use below JCL:
Code:
//**********************************************************************
//*THIS JOB WILL GIVE THE CHARACTERISTICS OF TAPE FILE, WITHOUT GETTING
//*IT ON DASD.                                                         
//**********************************************************************
//*                                                                     
//STEP010  EXEC PGM=ICETOOL                                           
//TOOLMSG  DD  SYSOUT=*                                                 
//DFSMSG   DD  SYSOUT=*                                                 
//DD01     DD  DSN=TAPE_FILE_NAME,                                     
//             DISP=SHR                                                 
//TOOLIN   DD  *                                                       
   COUNT FROM(DD01)                                                     
/*                                                                     
//*                                                                     

In S.ST check DFSMSG for DD01.

Hope this helps.
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 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