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

Need total count of records in a file using JCL


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
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
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
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
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: 8797
Location: Welsh Wales

PostPosted: Fri May 29, 2009 3:44 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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