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
 

 

Need total count of records in a file using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
View previous topic :: :: View next topic  
Author Message
swapy_s

New User


Joined: 20 Nov 2008
Posts: 3
Location: Pune

PostPosted: Fri May 29, 2009 2:54 pm    Post subject: Need total count of records in a file using JCL
Reply with quote

Hi,
I have a file with huge number of records. i want to get a count of total number of records using IDCAMS utility.

Also count of number of records having SWAP at position starting 5 to 8.
Assuming the total record length is 80. can some one help me in getting the count in both the cases?
Back to top
View user's profile Send private message

bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Fri May 29, 2009 3:04 pm    Post subject:
Reply with quote

We can take the count of records using the SORT , is it fine for you..If so then search for the key word COUNT in SORT
Back to top
View user's profile Send private message
swapy_s

New User


Joined: 20 Nov 2008
Posts: 3
Location: Pune

PostPosted: Fri May 29, 2009 3:15 pm    Post subject:
Reply with quote

Ya that should be fine, but unable to navigate to tha page you are speaking about icon_sad.gif
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 May 29, 2009 3:44 pm    Post subject:
Reply with quote

Take a look at the DFSORT reference material thread in the DFSORT forum.
Back to top
View user's profile Send private message
swapy_s

New User


Joined: 20 Nov 2008
Posts: 3
Location: Pune

PostPosted: Fri May 29, 2009 4:53 pm    Post subject:
Reply with quote

CAn i get a example of how do i use this utility? I have spent a lot of time on this issue, but could not search anything that i wanted.

I am using

//STEP1 EXEC PGM=ICEMAN,REGION=5000K
//IN1 DD DSN=TEMP.IN,DISP=SHR
//TOOLIN DD *
COUNT FROM(IN1) WRITE(OUT1) DIGITS(10)
//OUT1 DD DSN=TEMP.OUT,DISP=SHR

but i get message
'DFSORT IS NOT LICENSED FOR USE ON THIS SYSTEM - RETURN CODE 12'
Back to top
View user's profile Send private message
chaky

New User


Joined: 28 May 2009
Posts: 20
Location: Bangalore

PostPosted: Fri May 29, 2009 6:06 pm    Post subject:
Reply with quote

You can try this way for your first problem.
Code:
//CTRCDS EXEC PGM=ICETOOL                               
//TOOLMSG DD SYSOUT=*                                   
//DFSMSG  DD SYSOUT=*                                   
//IN      DD DSN=.... input file,DISP=SHR
//OUT     DD SYSOUT=*                                   
//TOOLIN  DD *                                           
COUNT FROM(IN) WRITE(OUT) DIGITS(8)                     
/*

This will give you the count in SYSOUT from input dataset. You can have an output file also instead of SYSOUT and use further for your purpose.

For your second problem you can try as given below.
Code:
//CTRCDS EXEC PGM=ICETOOL                               
//TOOLMSG DD SYSOUT=*                                   
//DFSMSG  DD SYSOUT=*                                   
//IN      DD DSN=.... input file,DISP=SHR
//OUT     DD SYSOUT=*                                   
//TOOLIN  DD *                                           
COUNT FROM(IN) WRITE(OUT) DIGITS(8) USING(CTL1)                     
/*
//CTL1CNTL DD *
INCLUDE COND=(5,4,CH,EQ,C'SWAP')
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 -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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