Count the number of records from the input file



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Count the number of records from the input file

Postby jvinoth » Tue May 29, 2012 4:35 pm

Hi,
I need to count the number of records from the input file using sort.I have used the below sort card in the jcl and it works fine.
but i need to change the result into Zoned decimal please tel me how to do it.
SORT FIELDS=COPY                                     
   OUTFIL REMOVECC,NODETAIL,                         
   TRAILER1=('NO OF RECORDS: ',COUNT=(M11,LENGTH=8))
 
and the output

=COLS> ----+----1----+----2----+----
****** *****************************
000001 NO OF RECORDS: 00000029     
****** ****************************

jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Count the number of records from the input file

 

Re: Count the number of records from the input file

Postby BillyBoyo » Tue May 29, 2012 4:39 pm

It is in Zoned Decimal. Unsigned.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Count the number of records from the input file

Postby jvinoth » Tue May 29, 2012 5:08 pm

jvinoth wrote:Hi,
I need to count the number of records from the input file using sort.I have used the below sort card in the jcl and it works fine.
but i need to change the result into packed decimal please tel me how to do it.
SORT FIELDS=COPY                                     
   OUTFIL REMOVECC,NODETAIL,                         
   TRAILER1=('NO OF RECORDS: ',COUNT=(M11,LENGTH=8))
 
and the output

=COLS> ----+----1----+----2----+----
****** *****************************
000001 NO OF RECORDS: 00000029     
****** ****************************

jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Count the number of records from the input file

Postby BillyBoyo » Tue May 29, 2012 6:54 pm

Have a look at the manual for TRAILER1, COUNT and see if it allows TO=PD,LENGTH=whatyou want
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Count the number of records from the input file

Postby jvinoth » Tue May 29, 2012 7:14 pm

i tried this but getting syntax error

TRAILER1=(3:COUNT=(M11,LENGTH=8),ZD,TO=PD)

jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Count the number of records from the input file

Postby dick scherrer » Tue May 29, 2012 9:10 pm

Hello,

Is there some reason you did not post the complete error messsage (including the message id)?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Count the number of records from the input file

Postby skolusu » Tue May 29, 2012 10:13 pm

Jvinoth,

Make up your mind. In one post you say zoned decimal and another you say Packed decimal. You just cannot make up your syntax and complain that it is not working.

Assuming you want packed decimal format, use the following DFSORT control cards.
//SYSIN    DD *                                     
  OPTION COPY                                       
  OUTFIL REMOVECC,NODETAIL,                         
  TRAILER1=('NO OF RECORDS: ',COUNT=(PD,LENGTH=8)) 
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

These users thanked the author skolusu for the post:
Raj2006 (Fri Mar 14, 2014 12:55 pm)
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post