View previous topic :: View next topic
|
Author |
Message |
swapy_s
New User
Joined: 20 Nov 2008 Posts: 3 Location: Pune
|
|
|
|
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 |
|
|
bipinpeter
Active User
Joined: 18 Jun 2007 Posts: 213 Location: Cochin/Kerala/India
|
|
|
|
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 |
|
|
swapy_s
New User
Joined: 20 Nov 2008 Posts: 3 Location: Pune
|
|
|
|
Ya that should be fine, but unable to navigate to tha page you are speaking about |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Take a look at the DFSORT reference material thread in the DFSORT forum. |
|
Back to top |
|
|
swapy_s
New User
Joined: 20 Nov 2008 Posts: 3 Location: Pune
|
|
|
|
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 |
|
|
chaky
New User
Joined: 28 May 2009 Posts: 20 Location: Bangalore
|
|
|
|
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 |
|
|
|