IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COUNT of copied records using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Tue Apr 22, 2008 2:41 pm
Reply with quote

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
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Apr 22, 2008 3:18 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Apr 22, 2008 7:47 pm
Reply with quote

Hello,

Even without the trailer, i believe the count of records processed will be in a jes output.
Back to top
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Wed Apr 23, 2008 5:20 pm
Reply with quote

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
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Wed Apr 23, 2008 5:39 pm
Reply with quote

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
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Wed Apr 23, 2008 5:56 pm
Reply with quote

Thank you kalukakkad
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top