View previous topic :: View next topic
|
Author |
Message |
noorkh
New User
Joined: 06 Mar 2006 Posts: 76 Location: Chennai
|
|
|
|
Hi,
I am copying INPUT to OUTPUT using some rules.
I would like to how many records are copied to OUTPUT. In other words, i would like to how many records are there in OUPUT.
Can i do this using SYNCSORT? |
|
Back to top |
|
|
kalukakkad
New User
Joined: 10 Mar 2005 Posts: 81
|
|
|
|
Here a sample JCL
//SORT EXEC PGM=SORT
//SORTIN DD *
1234
1234
2345
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTOF01 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
INCLUDE COND=(1,1,CH,EQ,C'1')
OUTFIL FILES=01,OUTREC=(1,80),REMOVECC,
TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9))
/*
In SORTOF01 you get the output as
1234
1234
TRR 2
You may change the trailer as per your need. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Even without the trailer, i believe the count of records processed will be in a jes output. |
|
Back to top |
|
|
vch
New User
Joined: 01 Feb 2008 Posts: 22 Location: chennai
|
|
|
|
Hi
Can anyone explain me TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9)) statement. i.e. M10 LENGTH words are for what purporse? |
|
Back to top |
|
|
kalukakkad
New User
Joined: 10 Mar 2005 Posts: 81
|
|
|
|
TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9))
COUNT --> Gives the count of records in the dataset
M10 --> Mask (how the count should be displayed e.g. with or without signs, supressing leading zeroes etc.)
M10 --> IIIIIIIIIIIIIIT --> if there are 2 records--> Count is displayed as bbbbbbbb2
For other masks refer manual (M0 - M25)
Length --> length of count (here 9 digits) |
|
Back to top |
|
|
vch
New User
Joined: 01 Feb 2008 Posts: 22 Location: chennai
|
|
|
|
Thank you kalukakkad |
|
Back to top |
|
|
|