Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to get count from a tape file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to get count from a tape file
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 29, 2008 5:51 pm    Post subject:
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 Moderator


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

PostPosted: Fri Feb 29, 2008 9:52 pm    Post subject:
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:

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

Senior Member


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

PostPosted: Fri Feb 29, 2008 10:58 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us