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: 210
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 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 DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
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


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