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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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