Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us